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 @@