From 855be4d3adea0b3085ec0eb258f5e60e909dbf30 Mon Sep 17 00:00:00 2001 From: ljy Date: Wed, 29 Jul 2026 22:43:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursor/rules/ui-and-sections.mdc | 1 + src/App.css | 30 ++++++++++++++++++++++++++++++ src/App.tsx | 4 +++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.cursor/rules/ui-and-sections.mdc b/.cursor/rules/ui-and-sections.mdc index 9879883..4cdb8bf 100644 --- a/.cursor/rules/ui-and-sections.mdc +++ b/.cursor/rules/ui-and-sections.mdc @@ -10,6 +10,7 @@ alwaysApply: false - `hero`~`system`:`.poetic-section`(宣纸/国风:`--paper`、`--ink`、`--red`、`--gold`) - `tech`~`contact`:`.tech-section`(深色科技:`--tech`、`--tech-card`、`--tech-line`) +- 普通模式 `activeIndex >= tech` 时顶栏加 `is-tech-theme`;展控(`?mode=stage`)不加 - 新增章节必须选对主题族;勿混用两套配色令牌 ## 改章节 diff --git a/src/App.css b/src/App.css index c55af93..b4a3809 100644 --- a/src/App.css +++ b/src/App.css @@ -65,6 +65,36 @@ a { box-shadow: 0 1.125rem 4.375rem rgba(83, 42, 18, 0.14); backdrop-filter: blur(1rem); transform: translateX(-50%); + transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; +} + +.topbar.is-tech-theme { + border-color: rgba(201, 154, 69, 0.28); + background: rgba(8, 9, 15, 0.78); + box-shadow: 0 1.125rem 4.375rem rgba(0, 0, 0, 0.35); +} + +.topbar.is-tech-theme .brand-lockup strong, +.topbar.is-tech-theme .brand-lockup small { + color: #fff4df; + transition: color 0.35s ease; +} + +.topbar.is-tech-theme .nav-links { + color: rgba(241, 217, 154, 0.82); + transition: color 0.35s ease; +} + +.topbar.is-tech-theme .nav-links a:hover, +.topbar.is-tech-theme .nav-cta:hover { + color: var(--gold-light); +} + +.topbar.is-tech-theme .nav-cta { + border-color: rgba(201, 154, 69, 0.42); + color: var(--gold-light); + background: rgba(255, 244, 223, 0.06); + transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease, transform 0.2s ease; } .brand-lockup { diff --git a/src/App.tsx b/src/App.tsx index 0cf0bdd..3499c50 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -223,10 +223,12 @@ function App() { }, [autoPlay, isStageMode]) const progress = ((activeIndex + 1) / sections.length) * 100 + const techSectionIndex = sections.findIndex((s) => s.id === 'tech') + const isTechTopbar = !isStageMode && techSectionIndex >= 0 && activeIndex >= techSectionIndex return (
-
+
goToSection(0)}> 杜康好客