refactor(frontend): replace toast system with zibll notyf
This commit is contained in:
@@ -62,6 +62,14 @@ trait ScriptsPart1c {
|
||||
'5.15.4'
|
||||
);
|
||||
|
||||
$notyf_css = get_template_directory() . '/assets/css/frontend/notyf.css';
|
||||
wp_enqueue_style(
|
||||
'aksrt-notyf',
|
||||
$base_uri . '/assets/css/frontend/notyf.css',
|
||||
[$core_dep, 'aksrt-font-awesome-5-v4-shims'],
|
||||
file_exists($notyf_css) ? (string) filemtime($notyf_css) : $version
|
||||
);
|
||||
|
||||
// ===== 7. JS =====
|
||||
|
||||
// Swiper.js(首页/归档/CMS 模块/单篇文章页加载)
|
||||
@@ -111,13 +119,22 @@ trait ScriptsPart1c {
|
||||
true
|
||||
);
|
||||
|
||||
// Runtime infrastructure: tbquire / notyf / confirm / scrollTopTo / [data-*] declarative
|
||||
$notyf_js = get_template_directory() . '/assets/js/notyf.js';
|
||||
wp_enqueue_script(
|
||||
'aksrt-notyf',
|
||||
$base_uri . '/assets/js/notyf.js',
|
||||
['jquery'],
|
||||
file_exists($notyf_js) ? (string) filemtime($notyf_js) : $version,
|
||||
true
|
||||
);
|
||||
|
||||
// Runtime infrastructure: tbquire / confirm / scrollTopTo / [data-*] declarative
|
||||
$runtime_js = get_template_directory() . '/assets/js/aksrt-runtime.js';
|
||||
if (file_exists($runtime_js)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-runtime',
|
||||
$base_uri . '/assets/js/aksrt-runtime.js',
|
||||
['aksrt-rehydrate'],
|
||||
['aksrt-rehydrate', 'aksrt-notyf'],
|
||||
(string) filemtime($runtime_js),
|
||||
true
|
||||
);
|
||||
@@ -309,7 +326,7 @@ trait ScriptsPart1c {
|
||||
);
|
||||
}
|
||||
|
||||
// ===== 全局 UI 增强(Toast、骨架屏、悬停动效、灯箱、滚动感知)=====
|
||||
// ===== 全局 UI 增强(骨架屏、悬停动效、灯箱、滚动感知)=====
|
||||
$enhancements_css = get_template_directory() . '/assets/css/frontend/enhancements.css';
|
||||
if (file_exists($enhancements_css)) {
|
||||
wp_enqueue_style(
|
||||
|
||||
Reference in New Issue
Block a user