From a279b29df45335608bf0f2f992dcc8ac808b80e4 Mon Sep 17 00:00:00 2001 From: Jiashen Ren <123482025+GaAs9000@users.noreply.github.com> Date: Tue, 4 Feb 2025 08:59:15 +0800 Subject: [PATCH] Delete _sass/_dark-theme.scss --- _sass/_dark-theme.scss | 124 ----------------------------------------- 1 file changed, 124 deletions(-) delete mode 100644 _sass/_dark-theme.scss diff --git a/_sass/_dark-theme.scss b/_sass/_dark-theme.scss deleted file mode 100644 index b8aeb10..0000000 --- a/_sass/_dark-theme.scss +++ /dev/null @@ -1,124 +0,0 @@ -// _sass/_dark-theme.scss - -// 亮色主题变量 -:root { - --bg-primary: #ffffff; - --bg-secondary: #f8f9fa; - --text-primary: #24292e; - --text-secondary: #586069; - --border-color: #e1e4e8; - --link-color: #0366d6; - --header-bg: #f8f9fa; - --code-bg: #f6f8fa; - --blockquote-border: #dfe2e5; - --table-border: #dfe2e5; - --table-stripe: #f6f8fa; -} - -// 暗色主题变量 -[data-theme="dark"] { - --bg-primary: #0d1117; - --bg-secondary: #161b22; - --text-primary: #c9d1d9; - --text-secondary: #8b949e; - --border-color: #30363d; - --link-color: #58a6ff; - --header-bg: #161b22; - --code-bg: #1f2428; - --blockquote-border: #30363d; - --table-border: #30363d; - --table-stripe: #161b22; -} - -// 应用主题颜色 -body { - background-color: var(--bg-primary); - color: var(--text-primary); -} - -.masthead { - background-color: var(--header-bg); - border-bottom: 1px solid var(--border-color); -} - -.page__content { - a { - color: var(--link-color); - } - - code { - background-color: var(--code-bg); - } - - blockquote { - border-left-color: var(--blockquote-border); - color: var(--text-secondary); - } - - table { - border: 1px solid var(--table-border); - - tr:nth-child(even) { - background-color: var(--table-stripe); - } - } -} - -// 主题切换按钮样式 -.theme-toggle { - position: fixed; // 固定位置 - top: 1rem; // 距离顶部 - right: 1rem; // 距离右侧 - background: transparent; - border: none; - padding: 0.5rem; - cursor: pointer; - color: var(--text-primary); - z-index: 1000; // 确保按钮在其他元素之上 - border-radius: 50%; // 圆形按钮 - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - box-shadow: 0 2px 5px rgba(0,0,0,0.2); - - &:hover { - background: var(--bg-secondary); - } - - svg { - width: 20px; - height: 20px; - fill: currentColor; - } - - .moon-icon { - display: none; - } -} - -[data-theme="dark"] .theme-toggle { - .sun-icon { - display: none; - } - .moon-icon { - display: block; - } -} - -// 添加媒体查询以适应移动设备 -@media screen and (max-width: 768px) { - .theme-toggle { - top: 0.5rem; - right: 0.5rem; - padding: 0.3rem; - width: 35px; - height: 35px; - } -} - -// 添加过渡效果 -body, a, button { - transition: background-color 0.3s ease, color 0.3s ease; -}