diff --git a/README.md b/README.md index 17c0e322b..8a965bcf3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ --- -![English Coverage](https://img.shields.io/badge/en_coverage-89%25-green.svg) 494/552 docs translated +![English Coverage](https://img.shields.io/badge/en_coverage-97%25-green.svg) 494/510 docs translated ## 这是什么项目 diff --git a/site/.vitepress/config/shared.ts b/site/.vitepress/config/shared.ts index 88adfb5df..0e250a67c 100644 --- a/site/.vitepress/config/shared.ts +++ b/site/.vitepress/config/shared.ts @@ -66,6 +66,9 @@ export const sharedBase = { head: [ ['link', { rel: 'icon', href: '/Tutorial_AwesomeModernCPP/favicon.ico' }], + // 浏览器地址栏/壁纸融合(明暗双值,与站点暖中性底一致) + ['meta', { name: 'theme-color', content: '#F7F3EC' }], + ['meta', { name: 'theme-color', content: '#17120E', media: '(prefers-color-scheme: dark)' }], // 首屏立即应用字号档(从 localStorage 读,默认 medium),防刷新闪烁。 // 与 FontSizeSwitcher.vue 的 STORAGE_KEY('vp-font-size')保持一致。 [ diff --git a/site/.vitepress/theme/components/HomeHeroVisual.vue b/site/.vitepress/theme/components/HomeHeroVisual.vue index 7ef2586b7..cff899178 100644 --- a/site/.vitepress/theme/components/HomeHeroVisual.vue +++ b/site/.vitepress/theme/components/HomeHeroVisual.vue @@ -148,12 +148,12 @@ onBeforeUnmount(() => { .terminal { position: relative; box-sizing: border-box; - border: 1px solid rgba(99, 102, 241, 0.35); + border: 1px solid var(--term-border); border-radius: 14px; overflow: hidden; - background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%); + background: linear-gradient(135deg, var(--term-bg-from) 0%, var(--term-bg-to) 100%); box-shadow: - 0 22px 56px rgba(15, 52, 96, 0.4), + 0 22px 56px var(--term-shadow), 0 6px 14px rgba(0, 0, 0, 0.22); animation: terminal-glow 4s ease-in-out infinite; } @@ -179,7 +179,7 @@ onBeforeUnmount(() => { .terminal__title { margin-left: 10px; - color: rgba(226, 232, 240, 0.55); + color: var(--term-title); font-family: var(--vp-font-family-mono); font-size: 13px; letter-spacing: 0.3px; @@ -200,17 +200,17 @@ onBeforeUnmount(() => { min-height: 1.75em; } -.ln--code { color: #cbd5e1; } -.ln--cmd { color: #42a5f5; } /* shell prompt */ -.ln--ok { color: #009688; } /* 编译成功 / brand teal */ -.ln--save { color: #fbbf24; } /* 保存提示 */ -.ln--out { color: #e2e8f0; } /* 程序输出 */ -.ln--prompt { color: #009688; } +.ln--code { color: var(--term-code); } +.ln--cmd { color: var(--term-cmd); } /* shell prompt */ +.ln--ok { color: var(--term-ok); } /* 编译成功(语义绿) */ +.ln--save { color: var(--term-save); } /* 保存提示 */ +.ln--out { color: var(--term-out); } /* 程序输出 */ +.ln--prompt { color: var(--term-ok); } .cursor { display: inline-block; margin-left: 2px; - color: #009688; + color: var(--term-ok); animation: blink 1.05s step-end infinite; } @@ -223,15 +223,15 @@ onBeforeUnmount(() => { @keyframes terminal-glow { 0%, 100% { box-shadow: - 0 22px 56px rgba(15, 52, 96, 0.4), + 0 22px 56px var(--term-shadow), 0 6px 14px rgba(0, 0, 0, 0.22), - 0 0 0 0 rgba(99, 102, 241, 0); + 0 0 0 0 rgba(96, 165, 250, 0); } 50% { box-shadow: - 0 22px 56px rgba(15, 52, 96, 0.45), + 0 22px 56px var(--term-shadow), 0 6px 14px rgba(0, 0, 0, 0.25), - 0 0 26px 3px rgba(99, 102, 241, 0.24); + 0 0 26px 3px var(--term-glow); } } diff --git a/site/.vitepress/theme/components/HomeRoadmap.vue b/site/.vitepress/theme/components/HomeRoadmap.vue index 4aa66a7d9..18e3bdf0c 100644 --- a/site/.vitepress/theme/components/HomeRoadmap.vue +++ b/site/.vitepress/theme/components/HomeRoadmap.vue @@ -166,7 +166,7 @@ const t = computed(() => } .rm-chip--done .rm-chip__mark { color: var(--vp-c-green-1); } -.rm-chip--doing .rm-chip__mark { color: #ffc107; } +.rm-chip--doing .rm-chip__mark { color: var(--vp-c-yellow-1, #f59e0b); } .rm-chip--todo .rm-chip__mark { color: var(--vp-c-text-3); } .home-roadmap__next { diff --git a/site/.vitepress/theme/components/OnlineCompilerDemo.vue b/site/.vitepress/theme/components/OnlineCompilerDemo.vue index 4fde2dcf5..2b3c3c188 100644 --- a/site/.vitepress/theme/components/OnlineCompilerDemo.vue +++ b/site/.vitepress/theme/components/OnlineCompilerDemo.vue @@ -27,7 +27,76 @@ -
+ +
+
+ + +
+ +
+
+
{{ displaySource }}
+
+ +

+ {{ sourceLoadState === 'error' ? '源码加载失败,可点上方源码链接查看' : '加载源码中…' }} +

+ + +
+ + + +
+