diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-06 11:19:13 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-06 11:19:13 +0800 |
| commit | b0ed60228bf156f49723e6f8d9eccad139debf34 (patch) | |
| tree | 5baacae750c108fc86762f9e73ce220d3a1fbbc3 | |
| parent | f1847aa7f1402c6be4fc261c262d8faf290d9829 (diff) | |
feat: replace term title with header title
Former-commit-id: 26c992ac57568b7253e12802e5a9d057a12b016e
| -rw-r--r-- | layouts/_partials/header.html | 3 | ||||
| -rw-r--r-- | layouts/_partials/term/term-header.html | 11 |
2 files changed, 3 insertions, 11 deletions
diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html index 9ef52b42..75410879 100644 --- a/layouts/_partials/header.html +++ b/layouts/_partials/header.html @@ -10,6 +10,9 @@ {{ if .IsHome }} {{ .Site.Title }} {{ else }} + {{ if eq .Kind "term" }} + {{ if eq .Data.Singular "tag" }}#{{ else }}+{{ end }} + {{ end }} {{ .Title }} {{ end }} </a diff --git a/layouts/_partials/term/term-header.html b/layouts/_partials/term/term-header.html index e0501b65..4155cfb9 100644 --- a/layouts/_partials/term/term-header.html +++ b/layouts/_partials/term/term-header.html @@ -1,17 +1,6 @@ <div class="term-header"> <h1 class="flex items-center justify-between" style="view-transition-name: category-{{ .Title }}"> - <!-- Tag/Category icon and name --> - <div> - {{ if or (hasPrefix .Page.Params.icon "http://") (hasPrefix .Page.Params.icon "https://") }} - <img src="{{ .Page.Params.icon }}" alt="{{ .Page.LinkTitle }}" - style="height:1em;width:1em"> - {{ else }} - {{ .Page.Params.icon }} - {{ end }} - {{ if and (eq .Data.Singular "tag") (not .Params.icon) }}#{{ end }} - {{ .Title }} - </div> <!-- Filter buttons --> <div> {{ if eq .Data.Singular "tag" }} |
