[feat] 完成了一些个性化修改。
1. 新增引用文字颜色和文章标题时间颜色配置,能够单独修改主页文章时间以及文章引用部分的字体颜色。 2. 修改主题名称 3. 页头竖线修改成斜线 4. 菜单栏父菜单整个都会触发下拉菜单栏 5. 主页文章在右侧可以显示封面
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+14
-20
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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] {
|
||||
|
||||
+14
-4
@@ -17,6 +17,8 @@
|
||||
</section>
|
||||
<section class="posts">
|
||||
<article class="post on-list" th:each="post : ${posts.items}">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-content-wrapper">
|
||||
<header>
|
||||
<h2 class="post-title">
|
||||
<span class="pin" th:classappend="${theme.config?.index_page?.pin_pos}" th:if="${post.spec.pinned} and ${theme.config?.index_page?.show_pin}">
|
||||
@@ -29,20 +31,28 @@
|
||||
</span>
|
||||
<a data-pjax th:text="${post.spec.title}" th:href="@{${post.status.permalink}}">Post Title</a>
|
||||
</h2>
|
||||
<div class="post-meta">
|
||||
<div class="post-title-time">
|
||||
<time class="post-date"
|
||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.general.time_style == 'custom' ?
|
||||
theme.config.general.custom_time_style : theme.config.general.time_style}__')}">Publish Time</time>
|
||||
<span class="post-author"
|
||||
th:with="contributor = ${post.contributors[0]}"
|
||||
th:text="${contributor.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
||||
th:text="${contributor.displayName}">Author</span>
|
||||
<th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-excerpt">
|
||||
<span th:text="${post.status.excerpt}">Post Excerpt...</span>
|
||||
</div>
|
||||
<div>
|
||||
<a data-pjax class="read-more button inline" th:href="@{${post.status.permalink}}" th:text="#{page.post.more} + ' >'">READ MORE ></a>
|
||||
</div>
|
||||
<div class="post-cover-wrapper" th:if="${post.spec.cover}">
|
||||
<img class="post-cover-image"
|
||||
th:src="${post.spec.cover}"
|
||||
th:srcset="|${thumbnail.gen(post.spec.cover, 's')} 400w, ${thumbnail.gen(post.spec.cover, 'm')} 800w, ${thumbnail.gen(post.spec.cover, 'l')} 1200w|"
|
||||
sizes="(max-width: 800px) 100vw, 400px"
|
||||
th:alt="${post.spec.title}"
|
||||
loading="lazy"/>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -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})];
|
||||
[/]
|
||||
}
|
||||
[/]
|
||||
</style>
|
||||
|
||||
@@ -218,13 +218,14 @@
|
||||
</div>
|
||||
|
||||
<div th:if="${not #lists.isEmpty(menuItem.children)}" class="menu">
|
||||
<div class="menu-wrapper">
|
||||
<a data-pjax
|
||||
th:href="@{${menuItem.status.href}}"
|
||||
th:target="${menuItem.spec.target?.value}">
|
||||
<span th:text="${menuItem.status.displayName}"></span>
|
||||
</a>
|
||||
<div class="sub-menu">
|
||||
<div class="menu-trigger">▾</div>
|
||||
<span class="menu-trigger">▾</span>
|
||||
</div>
|
||||
<ul class="menu-dropdown">
|
||||
<li th:each="childMenuItem : ${menuItem.children}">
|
||||
<a data-pjax
|
||||
@@ -235,7 +236,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
+10
-10
@@ -1,23 +1,23 @@
|
||||
apiVersion: theme.halo.run/v1alpha1
|
||||
kind: Theme
|
||||
metadata:
|
||||
name: theme-terminal-ez
|
||||
name: theme-terminal-witcher
|
||||
annotations:
|
||||
"store.halo.run/app-id": "app-ehsrxtbn"
|
||||
spec:
|
||||
displayName: Terminal-EZ
|
||||
displayName: Terminal-Witcher
|
||||
author:
|
||||
name: Erzbir
|
||||
website: https://erzbir.com
|
||||
name: WitcherCheung
|
||||
website: https://witchercheung.cn
|
||||
description: 一款简洁复古的 Halo 主题 / A simple, retro theme for Halo
|
||||
logo: https://halo.run/logo
|
||||
homepage: https://www.halo.run/store/apps/app-ehsrxtbn
|
||||
repo: https://github.com/Erzbir/halo-theme-terminal.git
|
||||
issues: https://github.com/Erzbir/halo-theme-terminal/issues
|
||||
settingName: "theme-terminal-ez-setting"
|
||||
configMapName: "theme-terminal-ez-configMap"
|
||||
version: 3.0.0
|
||||
repo: https://github.com/z1178902213/halo-theme-terminal.git
|
||||
issues: https://github.com/z1178902213/halo-theme-terminal/issues
|
||||
settingName: "theme-terminal-witcher-setting"
|
||||
configMapName: "theme-terminal-witcher-configMap"
|
||||
version: 3.1.0
|
||||
requires: ">=2.22.0"
|
||||
license:
|
||||
- name: "MIT"
|
||||
url: "https://github.com/Erzbir/halo-theme-terminal/blob/main/LICENSE"
|
||||
url: "https://github.com/z1178902213/halo-theme-terminal/blob/main/LICENSE"
|
||||
|
||||
Reference in New Issue
Block a user