summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/components/_pages.scss3
-rw-r--r--i18n/en.yml1
-rw-r--r--i18n/zh.yml1
-rw-r--r--layouts/_default/taxonomy.html22
-rw-r--r--layouts/partials/components/postnav.html3
5 files changed, 22 insertions, 8 deletions
diff --git a/assets/css/components/_pages.scss b/assets/css/components/_pages.scss
index 3bc0de1c..9b5e10cd 100644
--- a/assets/css/components/_pages.scss
+++ b/assets/css/components/_pages.scss
@@ -2,11 +2,10 @@
#post-series-list {
display: flex;
- justify-content: center;
gap: 0.5rem;
@media screen and (min-width: 768px) {
- margin: 1rem;
+ margin: 2rem 0;
gap: 1rem;
}
diff --git a/i18n/en.yml b/i18n/en.yml
index a62b972a..cb40236c 100644
--- a/i18n/en.yml
+++ b/i18n/en.yml
@@ -13,3 +13,4 @@ searchInstruction: '⌘+K to search anywhere'
postNav:
latest: 'Latest'
categories: 'Categories'
+ tags: 'Tags'
diff --git a/i18n/zh.yml b/i18n/zh.yml
index 6273feb8..f8e4a3ca 100644
--- a/i18n/zh.yml
+++ b/i18n/zh.yml
@@ -13,3 +13,4 @@ searchInstruction: '⌘+K 在任何地方搜索'
postNav:
latest: '最新'
categories: '分类'
+ tags: '标签'
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 }}
diff --git a/layouts/partials/components/postnav.html b/layouts/partials/components/postnav.html
index 0d36d5b1..95f38a72 100644
--- a/layouts/partials/components/postnav.html
+++ b/layouts/partials/components/postnav.html
@@ -7,6 +7,9 @@
<li class="{{ if eq "/categories/" $.Page.RelPermalink }}active{{ end }}">
<a href="{{ .Site.LanguagePrefix }}/categories">{{ T "postNav.categories" }}</a>
</li>
+ <li class="{{ if eq "/tags/" $.Page.RelPermalink }}active{{ end }}">
+ <a href="{{ .Site.LanguagePrefix }}/tags">{{ T "postNav.tags" }}</a>
+ </li>
{{ end }}
<li id="search-instruction">
<span>{{ T "searchInstruction" }}</span>