diff --git a/themes/ITStudioMainSite/assets/js/landing-hero-canvas.js b/themes/ITStudioMainSite/assets/js/landing-hero-canvas.js index 7b83c1b..68e3a51 100644 --- a/themes/ITStudioMainSite/assets/js/landing-hero-canvas.js +++ b/themes/ITStudioMainSite/assets/js/landing-hero-canvas.js @@ -818,24 +818,15 @@ stop(); resizeCanvas(); startAt = performance.now(); - if (reducedMotionQuery.matches) { - drawStatic(); - return; - } rafId = requestAnimationFrame(render); }; const onResize = () => { resizeCanvas(); - if (reducedMotionQuery.matches) { - drawStatic(); - } }; const themeObserver = new MutationObserver(() => { - if (reducedMotionQuery.matches) { - drawStatic(); - } + if (!rafId) render(performance.now()); }); themeObserver.observe(document.documentElement, { diff --git a/themes/ITStudioMainSite/functions.php b/themes/ITStudioMainSite/functions.php index ab494e1..fdca133 100644 --- a/themes/ITStudioMainSite/functions.php +++ b/themes/ITStudioMainSite/functions.php @@ -111,7 +111,7 @@ function itstudio_enqueue_scripts() { // 仅在首页加载首页样式 if (is_front_page() || is_home()) { wp_enqueue_style('itstudio-front-page', get_template_directory_uri() . '/assets/css/front-page.css', array('itstudio-style'), '2.1.2'); - wp_enqueue_script('itstudio-landing-hero-canvas', get_template_directory_uri() . '/assets/js/landing-hero-canvas.js', array(), '1.0.0', true); + wp_enqueue_script('itstudio-landing-hero-canvas', get_template_directory_uri() . '/assets/js/landing-hero-canvas.js', array(), '1.0.1', true); } // 仅在工作室介绍页加载(包含 /about fallback) diff --git a/themes/ITStudioMainSite/header.php b/themes/ITStudioMainSite/header.php index 50d0a84..37025a0 100644 --- a/themes/ITStudioMainSite/header.php +++ b/themes/ITStudioMainSite/header.php @@ -75,32 +75,15 @@ 'primary', + 'container' => false, + 'menu_class' => 'nav-menu', + 'fallback_cb' => false, + 'depth' => 1, + )); ?> - -