Match the top label to the article breadcrumb

This commit is contained in:
2026-11-15 20:12:35 +08:00
parent 7fda08046a
commit 2decef4ab3
6 changed files with 14 additions and 10 deletions
+5
View File
@@ -80,6 +80,11 @@ kbd {
text-indent: 0; text-indent: 0;
} }
/* /blog/ 列表:标签与第一篇之间留一点距离(原先是 <br> 撑开的) */
.blog-index {
margin-top: 1.25rem;
}
/* 正文小标题:比主题默认小一号,h2 30px→24px,h3 24px→20px,保持层级差 */ /* 正文小标题:比主题默认小一号,h2 30px→24px,h3 24px→20px,保持层级差 */
.content h2 { .content h2 {
font-size: 1.5rem; font-size: 1.5rem;
+1 -3
View File
@@ -3,9 +3,7 @@ draft: false
poet: | poet: |
驾驶教练机拉杆起飞的那一刻/宇治城的小溪边被斜阳刺痛双眼的那一刻/在广汕国道上骑自行车听到路旁大爷大喊加油的那一刻/我清楚的感受到我是我自己 驾驶教练机拉杆起飞的那一刻/宇治城的小溪边被斜阳刺痛双眼的那一刻/在广汕国道上骑自行车听到路旁大爷大喊加油的那一刻/我清楚的感受到我是我自己
--- ---
{{< hextra-hero-subtitle >}} {{< crumb >}}Fukun.Net/about{{< /crumb >}}
Fukun.Net/about
{{< /hextra-hero-subtitle >}}
我是傅堃。 我是傅堃。
+1 -3
View File
@@ -1,6 +1,4 @@
--- ---
linkTitle: FuKun.Net/Blog linkTitle: FuKun.Net/Blog
--- ---
{{< hextra-hero-subtitle >}} {{< crumb >}}Fukun.Net/blog{{< /crumb >}}
Fukun.Net/blog
{{< /hextra-hero-subtitle >}}
+1 -2
View File
@@ -7,10 +7,9 @@
> >
<main <main
id="content" id="content"
class="hx:w-full hx:min-w-0 hextra-max-content-width hx:px-6 hx:pt-4 hx:md:px-12" class="hx:w-full hx:min-w-0 hextra-max-content-width hx:px-6 hx:pt-0 hx:md:px-12"
> >
{{ partial "breadcrumb.html" (dict "page" . "enable" false) }} {{ partial "breadcrumb.html" (dict "page" . "enable" false) }}
<br class="hx:mt-1.5 hx:text-sm" />
{{ if .Title }} {{ if .Title }}
<h1 <h1
class="hx:text-center hx:mt-2 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100" class="hx:text-center hx:mt-2 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100"
+1 -2
View File
@@ -10,7 +10,6 @@
class="hx:w-full hx:min-w-0 hextra-max-content-width hx:px-6 hx:pt-0 hx:md:px-12" class="hx:w-full hx:min-w-0 hextra-max-content-width hx:px-6 hx:pt-0 hx:md:px-12"
> >
{{ partial "breadcrumb.html" (dict "page" . "enable" false) }} {{ partial "breadcrumb.html" (dict "page" . "enable" false) }}
<br class="hx:mt-1.5 hx:text-sm" />
<div class="content">{{ .Content }}</div> <div class="content">{{ .Content }}</div>
{{- $pages := partial "utils/sort-pages" (dict "page" . "by" {{- $pages := partial "utils/sort-pages" (dict "page" . "by"
@@ -19,7 +18,7 @@
site.Params.blog.list.pagerSize | default 10 }} {{- $total := len site.Params.blog.list.pagerSize | default 10 }} {{- $total := len
$pages }} $pages }}
<div id="post-list"> <div id="post-list" class="blog-index">
{{- range $i, $p := $pages }} {{- range $i, $p := $pages }}
{{- /* 整块卡片即一个链接:框内任意位置点击都进入文章; {{- /* 整块卡片即一个链接:框内任意位置点击都进入文章;
标签放在卡片外面,保证标签本身仍是可点链接 */}} 标签放在卡片外面,保证标签本身仍是可点链接 */}}
+5
View File
@@ -0,0 +1,5 @@
{{- /*
页面顶部的小标签(如 Fukun.Net/blog)。
直接用文章页 breadcrumb 那套 utility,字号、颜色、上边距保持一致。
*/ -}}
<div class="page-crumb hx:mt-1.5 hx:text-sm hx:text-gray-500 hx:dark:text-gray-400">{{ .Inner }}</div>