From 9c1d9f8f85f8ec7d3aa0cbe3329aef221d9d6761 Mon Sep 17 00:00:00 2001 From: WitcherCheung <1178902213@qq.com> Date: Tue, 25 Aug 2026 17:15:05 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=AE=8C=E6=88=90=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E4=B8=AA=E6=80=A7=E5=8C=96=E4=BF=AE=E6=94=B9=E3=80=82?= =?UTF-8?q?=201.=20=E6=96=B0=E5=A2=9E=E5=BC=95=E7=94=A8=E6=96=87=E5=AD=97?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E5=92=8C=E6=96=87=E7=AB=A0=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=A2=9C=E8=89=B2=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E8=83=BD=E5=A4=9F=E5=8D=95=E7=8B=AC=E4=BF=AE=E6=94=B9=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E6=96=87=E7=AB=A0=E6=97=B6=E9=97=B4=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=BC=95=E7=94=A8=E9=83=A8=E5=88=86=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E3=80=82=202.=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BB=E9=A2=98=E5=90=8D=E7=A7=B0=203.=20=E9=A1=B5?= =?UTF-8?q?=E5=A4=B4=E7=AB=96=E7=BA=BF=E4=BF=AE=E6=94=B9=E6=88=90=E6=96=9C?= =?UTF-8?q?=E7=BA=BF=204.=20=E8=8F=9C=E5=8D=95=E6=A0=8F=E7=88=B6=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=95=B4=E4=B8=AA=E9=83=BD=E4=BC=9A=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95=E6=A0=8F=205.=20=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E6=96=87=E7=AB=A0=E5=9C=A8=E5=8F=B3=E4=BE=A7=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E6=98=BE=E7=A4=BA=E5=B0=81=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 10 ++++++ src/styles/header.scss | 4 +-- src/styles/main.scss | 3 +- src/styles/menu.scss | 34 ++++++++------------ src/styles/post.scss | 56 ++++++++++++++++++++++++++++++++ src/styles/scheme.scss | 1 + templates/index.html | 60 ++++++++++++++++++++--------------- templates/layout.html | 8 +++++ templates/modules/header.html | 32 +++++++++---------- theme.yaml | 20 ++++++------ 10 files changed, 154 insertions(+), 74 deletions(-) diff --git a/settings.yaml b/settings.yaml index 4794234..a00ce47 100644 --- a/settings.yaml +++ b/settings.yaml @@ -566,6 +566,16 @@ spec: key: scheme-code-background name: code_background label: 代码背景颜色 + - $formkit: color + if: "$value.advanced === true" + key: scheme-blockquote-text + name: blockquote_text + label: 引用文字颜色 + - $formkit: color + if: "$value.advanced === true" + key: scheme-post-title-time + name: post_title_time + label: 文章标题时间颜色 - group: global_style label: 全局样式 formSchema: diff --git a/src/styles/header.scss b/src/styles/header.scss index 512ab99..8f2ee34 100644 --- a/src/styles/header.scss +++ b/src/styles/header.scss @@ -92,10 +92,10 @@ &::after { content: ""; - background: repeating-linear-gradient(90deg, var(--color-theme-control), var(--color-theme-control) var(--width-theme-border), transparent 0, transparent calc(var(--size-theme-font) * 0.625)); + background: repeating-linear-gradient(135deg, var(--color-theme-control), var(--color-theme-control) var(--width-theme-border), transparent 0, transparent calc(var(--size-theme-font) * 0.625)); display: block; width: 100%; - right: calc(var(--size-theme-font) * 0.625); + right: calc(var(--size-theme-font) * 0.996); } a { diff --git a/src/styles/main.scss b/src/styles/main.scss index a5e928b..3cd8368 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -442,6 +442,7 @@ blockquote { border-left: var(--width-theme-border) var(--style-theme-border) var(--color-theme-border-accent); margin: calc(var(--size-theme-font) * 0.625) 0 calc(var(--size-theme-font) * 0.625) 0; padding: calc(var(--size-theme-font) * 0.625) calc(var(--size-theme-font) * 1.25); + color: var(--color-theme-blockquote-text); } blockquote p:first-child { @@ -504,7 +505,7 @@ blockquote.twitter-tweet { position: relative; background: var(--color-theme-background); font: inherit; - color: inherit; + color: var(--color-theme-blockquote-text); border: calc(var(--width-theme-border) / 2) var(--style-theme-border) var(--color-theme-border-accent); padding-top: calc(var(--size-theme-font) * 3.75); } diff --git a/src/styles/menu.scss b/src/styles/menu.scss index 7f9b379..0527752 100644 --- a/src/styles/menu.scss +++ b/src/styles/menu.scss @@ -86,25 +86,23 @@ } } + .menu-wrapper { + display: flex; + align-items: center; + cursor: pointer; + + > a { + text-decoration: none; + color: var(--color-theme-navigation); + } + } + .menu-trigger { - all: unset; cursor: pointer; background-color: var(--color-theme-background); - margin-right: 0; - padding-left: calc(var(--size-theme-font) * 0.3125); - padding-right: calc(var(--size-theme-font) * 0.3125); + margin-left: calc(var(--size-theme-font) * 0.3125); color: var(--color-theme-navigation); user-select: none; - border: none; - display: inline-flex; - - @media (max-width: $phone-max-width) { - padding-left: calc(var(--size-theme-font) * 0.625); - padding-right: calc(var(--size-theme-font) * 0.625); - margin-bottom: 0; - outline: none; - -webkit-tap-highlight-color: transparent; - } } .menu-dropdown { @@ -136,12 +134,8 @@ text-decoration: none; } - .sub-menu { - display: flex; - } - - .sub-menu:hover .menu-dropdown, - .sub-menu:active .menu-dropdown { + .menu:hover .menu-dropdown, + .menu:active .menu-dropdown { display: flex; opacity: 1; visibility: visible; diff --git a/src/styles/post.scss b/src/styles/post.scss index c88ae21..a00246f 100644 --- a/src/styles/post.scss +++ b/src/styles/post.scss @@ -27,6 +27,49 @@ padding: calc(var(--size-theme-font) * 1.5) 0; } +.post-wrapper { + display: flex; + gap: calc(var(--size-theme-font) * 1.5); + align-items: stretch; +} + +.post-content-wrapper { + flex: 1; + min-width: 0; +} + +.post-cover-wrapper { + flex-shrink: 0; + width: calc(var(--size-theme-font) * 10); + height: calc(var(--size-theme-font) * 10); + overflow: hidden; + border-radius: calc(var(--size-theme-font) * 0.125); +} + +.post-cover-image { + width: 100%; + height: 100%; + object-fit: cover; + margin: 0; + transition: transform 0.3s ease; +} + +.post-cover-wrapper:hover .post-cover-image { + transform: scale(1.05); +} + +@media (max-width: $phone-max-width) { + .post-wrapper { + flex-direction: column-reverse; + gap: calc(var(--size-theme-font) * 0.75); + } + + .post-cover-wrapper { + width: 100%; + height: calc(var(--size-theme-font) * 8); + } +} + .post-meta { font-size: calc(var(--size-theme-font) * 0.96); margin-bottom: calc(var(--size-theme-font) * 0.3125); @@ -40,6 +83,19 @@ margin-right: 1ch; } +.post-title-time { + font-size: calc(var(--size-theme-font) * 0.96); + margin-bottom: calc(var(--size-theme-font) * 0.3125); + color: var(--color-theme-post-title-time); +} + +.post-title-time > *:not(:first-child):not(:empty)::before { + content: var(--content-theme-post-meta-divider); + color: var(--color-theme-post-title-time); + display: inline-block; + margin-right: 1ch; +} + .post-title { position: relative; color: var(--color-theme-text-accent); diff --git a/src/styles/scheme.scss b/src/styles/scheme.scss index acf4b2e..0a9940d 100644 --- a/src/styles/scheme.scss +++ b/src/styles/scheme.scss @@ -26,6 +26,7 @@ --color-theme-code-text: var(--color-theme-text); --color-theme-code-background: var(--color-theme-surface-strong); --color-theme-caret: #970b16; + --color-theme-blockquote-text: var(--color-theme-text-secondary); } html[data-theme-color-scheme] { diff --git a/templates/index.html b/templates/index.html index ffd1736..99e12dc 100644 --- a/templates/index.html +++ b/templates/index.html @@ -17,32 +17,42 @@
-
-

- - - - - - - - - Post Title -

-
-
- Post Excerpt... -
-
- READ MORE >
diff --git a/templates/layout.html b/templates/layout.html index 63ec78b..a6534a6 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -147,6 +147,14 @@ [# th:if="${not #strings.isEmpty(scheme.code_background)}"] --color-theme-code-background: [(${scheme.code_background})]; [/] + + [# th:if="${not #strings.isEmpty(scheme.blockquote_text)}"] + --color-theme-blockquote-text: [(${scheme.blockquote_text})]; + [/] + + [# th:if="${not #strings.isEmpty(scheme.post_title_time)}"] + --color-theme-post-title-time: [(${scheme.post_title_time})]; + [/] } [/] diff --git a/templates/modules/header.html b/templates/modules/header.html index ff7d543..bed91dc 100644 --- a/templates/modules/header.html +++ b/templates/modules/header.html @@ -218,23 +218,23 @@