From 52426b4cefb0fab3df44227f6d23616585f5ac20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 13 Jun 2022 15:04:06 +0800 Subject: [PATCH] :lipstick: Add categories & tags page's title. --- i18n/en.yaml | 14 +++++++++----- i18n/zh-cn.yaml | 14 +++++++++----- layouts/_default/terms.html | 15 +++++++++++++-- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 2c969d6..0299c79 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,16 +1,20 @@ #-------------------------------------- # English Version #-------------------------------------- -posts: +Posts: other: Posts -tag: +Tag: other: Tag -tags: +Tags: other: Tags -category: +TagTitle: + other: Tag Collection +Category: other: Category -categories: +Categories: other: Categories +CateTitle: + other: Classify Management AllSome: other: "All {{ .Some }}" diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 94bf85b..0bacd1f 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -2,16 +2,20 @@ # 中文版本 #-------------------------------------- -posts: +Posts: other: 文章 -tag: +Tag: other: 标签 -tags: +Tags: other: 标签 -category: +TagTitle: + other: 标签集锦 +Category: other: 分类 -categories: +Categories: other: 分类 +CateTitle: + other: 分类管理 AllSome: other: "所有 {{ .Some }}" diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 50992ab..a4b5e10 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -4,7 +4,16 @@ {{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}} {{- define "main" }}
- +
+

+ {{- if eq .Data.Plural "categories" }} + {{- T "CateTitle" }} + {{- else if eq .Data.Plural "tags" }} + {{- T "TagTitle" }} + {{- end }} +

+
+
{{- if eq .Data.Plural "categories" }} {{ $cats := .Site.Taxonomies.categories }}
@@ -33,7 +42,9 @@ {{ $randNums := (seq 10) }} {{- range $name, $items := $tags }} {{ $name }} - ({{ len $items }}) + + ({{ len $items }}) + {{- end }}