mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-10-14 14:30:50 +00:00
Merge remote-tracking branch 'upstream/main' into chore/bump-dependencies
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -23,4 +23,5 @@ node_modules
|
||||
|
||||
.gradle
|
||||
build
|
||||
dist
|
||||
templates/assets/dist
|
||||
dist
|
@@ -110,6 +110,19 @@ spec:
|
||||
value: github
|
||||
- label: Tailwind CSS Typography
|
||||
value: tailwind
|
||||
- $formkit: select
|
||||
name: title_position
|
||||
label: 标题位置
|
||||
value: "content"
|
||||
options:
|
||||
- value: "content"
|
||||
label: "正文中"
|
||||
- value: "cover"
|
||||
label: "封面中"
|
||||
- $formkit: text
|
||||
name: cover_height
|
||||
label: 封面图高度
|
||||
value: "24rem"
|
||||
- $formkit: checkbox
|
||||
name: show_upvote_button
|
||||
label: 显示点赞按钮
|
||||
|
5
templates/assets/dist/main.iife.js
vendored
5
templates/assets/dist/main.iife.js
vendored
File diff suppressed because one or more lines are too long
1
templates/assets/dist/style.css
vendored
1
templates/assets/dist/style.css
vendored
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
||||
<span class="text-sm opacity-80 dark:text-slate-50" th:text="${category.spec.displayName}"> </span>
|
||||
<span
|
||||
class="rounded bg-gray-100 px-1 py-0.5 text-xs tabular-nums opacity-70 group-hover:bg-white dark:bg-slate-600 dark:text-slate-50 dark:group-hover:bg-slate-500"
|
||||
th:text="${category.status.visiblePostCount}"
|
||||
th:text="${category.status.visiblePostCount ?: 0}"
|
||||
>
|
||||
</span>
|
||||
</a>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
th:classappend="(${tag} and ${tag.metadata.name == tagItem.metadata.name}) or (not ${tag} and ${tagStat.index == 0}) ? '!border-indigo-400 dark:!border-indigo-200' : ''"
|
||||
>
|
||||
<th:block th:text="|#${tagItem.spec.displayName}|" />
|
||||
<sup th:text="${tagItem.status.visiblePostCount}"></sup>
|
||||
<sup th:text="${tagItem.status.visiblePostCount ?: 0}"></sup>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
class="inline-flex items-center gap-x-1.5 rounded-full border border-gray-200 bg-white px-2.5 py-1 text-xs font-medium text-gray-800 shadow-sm hover:border-indigo-400 dark:border-slate-800 dark:bg-slate-700 dark:text-slate-200 dark:hover:border-indigo-200"
|
||||
>
|
||||
<th:block th:text="|#${tag.spec.displayName}|" />
|
||||
<sup th:text="${tag.status.visiblePostCount}"></sup>
|
||||
<sup th:text="${tag.status.visiblePostCount ?: 0}"></sup>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -7,9 +7,20 @@
|
||||
<link rel="stylesheet" th:href="@{/assets/styles/github-markdown.css?v={version}(version=${theme.spec.version})}" />
|
||||
</th:block>
|
||||
<th:block th:fragment="hero">
|
||||
<th:block
|
||||
th:replace="~{modules/hero :: hero(isHome = false, cover = ${singlePage.spec.cover}, title = ${singlePage.spec.title})}"
|
||||
/>
|
||||
<section th:unless="${#strings.isEmpty(singlePage.spec.cover)}">
|
||||
<div class="relative flex items-center" th:styleappend="|height:${theme.config.post.cover_height ?: '24rem'}|">
|
||||
<div
|
||||
class="before:z-1 relative size-full bg-cover bg-center bg-no-repeat before:absolute before:inset-0 before:bg-black/40"
|
||||
th:style="|background-image: url('${singlePage.spec.cover}')|"
|
||||
></div>
|
||||
<header
|
||||
class="pattern-header-text absolute top-1/3 mx-auto flex w-full flex-col items-center justify-center gap-3"
|
||||
th:if="${theme.config.post.title_position == 'cover'}"
|
||||
>
|
||||
<h1 class="text-center text-2xl text-white sm:text-5xl" th:text="${singlePage.spec.title}"></h1>
|
||||
</header>
|
||||
</div>
|
||||
</section>
|
||||
</th:block>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4 dark:bg-slate-800">
|
||||
@@ -81,7 +92,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="my-3 text-2xl font-medium dark:text-slate-50" th:text="${singlePage.spec.title}"></h1>
|
||||
<h1
|
||||
th:if="${#strings.isEmpty(singlePage.spec.cover)} or ${theme.config.post.title_position == 'content'}"
|
||||
class="my-3 text-3xl font-medium dark:text-slate-50"
|
||||
th:text="${singlePage.spec.title}"
|
||||
></h1>
|
||||
|
||||
<article
|
||||
class="!max-w-none break-words"
|
||||
th:classappend="${theme.config.post.content_style == 'github' ? 'markdown-body' : 'tailwind-typography'}"
|
||||
|
@@ -4,12 +4,27 @@
|
||||
th:replace="~{modules/layout :: html(title = ${post.spec.title} + ' - ' + ${site.title}, hero = ~{::hero}, content = ~{::content}, head = ~{::head}, footer = ~{::footer}, sidebar = ~{::sidebar}, contentClass = ${theme.config.layout.content_header} and ${not #strings.isEmpty(post.spec.cover)} ? '!-mt-20' : '')}"
|
||||
>
|
||||
<th:block th:fragment="head">
|
||||
<link rel="stylesheet" th:href="@{/assets/styles/github-markdown.css?v={version}(version=${theme.spec.version})}" />
|
||||
<link
|
||||
th:if="${theme.config.post.content_style == 'github'}"
|
||||
rel="stylesheet"
|
||||
th:href="@{/assets/styles/github-markdown.css?v={version}(version=${theme.spec.version})}"
|
||||
/>
|
||||
</th:block>
|
||||
<th:block th:fragment="hero">
|
||||
<th:block
|
||||
th:replace="~{modules/hero :: hero(isHome = false, cover = ${post.spec.cover}, title = ${post.spec.title})}"
|
||||
/>
|
||||
<section th:unless="${#strings.isEmpty(post.spec.cover)}">
|
||||
<div class="relative flex items-center" th:styleappend="|height:${theme.config.post.cover_height ?: '24rem'}|">
|
||||
<div
|
||||
class="before:z-1 relative size-full bg-cover bg-center bg-no-repeat before:absolute before:inset-0 before:bg-black/40"
|
||||
th:style="|background-image: url('${post.spec.cover}')|"
|
||||
></div>
|
||||
<header
|
||||
class="pattern-header-text absolute top-1/3 mx-auto flex w-full flex-col items-center justify-center gap-3"
|
||||
th:if="${theme.config.post.title_position == 'cover'}"
|
||||
>
|
||||
<h1 class="text-center text-2xl text-white sm:text-5xl" th:text="${post.spec.title}"></h1>
|
||||
</header>
|
||||
</div>
|
||||
</section>
|
||||
</th:block>
|
||||
<th:block th:fragment="footer">
|
||||
<script>
|
||||
@@ -128,8 +143,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="my-3 text-2xl font-medium dark:text-slate-50" th:text="${post.spec.title}"></h1>
|
||||
<div class="flex gap-2">
|
||||
<h1
|
||||
th:if="${#strings.isEmpty(post.spec.cover)} or ${theme.config.post.title_position == 'content'}"
|
||||
class="mt-3 text-3xl font-medium dark:text-slate-50"
|
||||
th:text="${post.spec.title}"
|
||||
></h1>
|
||||
<div class="mt-3 flex gap-2">
|
||||
<a
|
||||
th:each="tag : ${post.tags}"
|
||||
th:href="@{${tag.status.permalink}}"
|
||||
|
Reference in New Issue
Block a user