summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-07 15:16:26 +0800
committerEltrac <hi@guhub.cn>2025-04-07 15:16:26 +0800
commit23cde7acee45fa6cd9a95a68cd2ba92c5a5218cf (patch)
treea8b09179ecc2f79f751b01758ac8e87351f982e0 /layouts/_default
parent6810323ca4a59068c584f497e5e844e67e50ba15 (diff)
feat: separate tags and categories page
also add footer to both taxonomy pages
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/taxonomy.html22
1 files changed, 16 insertions, 6 deletions
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index f0dd979a..5e0dbdeb 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -2,17 +2,22 @@
<article class="taxonomy">
{{ partial "header.html" . }}
{{ partial "components/postnav.html" . }}
+
<!-- Display Tags -->
+ {{ if eq .Type "tags" }}
<section class="taxonomy taxonomy-tags">
- {{ range sort .Site.Taxonomies.tags "Count" "desc" }}
- <a href="{{ .Page.RelPermalink }}" class="taxonomy-tags-item">
- <span class="tag-name">#{{ .Page.LinkTitle }}</span>
- <span class="tag-count">{{ .Count }}</span>
- </a>
- {{ end }}
+ {{ range sort .Site.Taxonomies.tags "Count" "desc" }}
+ <a href="{{ .Page.RelPermalink }}" class="taxonomy-tags-item">
+ <span class="tag-name">#{{ .Page.LinkTitle }}</span>
+ <span class="tag-count">{{ .Count }}</span>
+ </a>
+ {{ end }}
</section>
+ {{ end }}
<!-- Display Categories -->
+ {{ if eq .Type "categories" }}
+ {{ partial "components/welcome.html" . }}
<section class="taxonomy taxonomy-categories row">
{{ range .Site.Taxonomies.categories.Alphabetical }}
<div class="taxonomy-categories-item col-xs-12 col-sm-6">
@@ -22,9 +27,14 @@
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
+ {{ if gt .Count 3 }}
<a href="{{ .Page.RelPermalink }}">阅读所有 {{ .Count }} 篇文章</a>
+ {{ end }}
</div>
{{ end }}
</section>
+ {{ end }}
+
</article>
+{{ partial "footer.html" . }}
{{ end }}