💄 Add categories & tags page's title.

This commit is contained in:
凡梦星尘 2022-06-13 15:04:06 +08:00
parent 7ab696887c
commit 52426b4cef
3 changed files with 31 additions and 12 deletions

View File

@ -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 }}"

View File

@ -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 }}"

View File

@ -4,7 +4,16 @@
{{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}}
{{- define "main" }}
<div class="post-block" lang="{{ .Site.LanguageCode }}">
<dive class="post-body">
<div class="post-header">
<h1>
{{- if eq .Data.Plural "categories" }}
{{- T "CateTitle" }}
{{- else if eq .Data.Plural "tags" }}
{{- T "TagTitle" }}
{{- end }}
</h1>
</div>
<div class="post-body">
{{- if eq .Data.Plural "categories" }}
{{ $cats := .Site.Taxonomies.categories }}
<div class="category-all-page">
@ -33,7 +42,9 @@
{{ $randNums := (seq 10) }}
{{- range $name, $items := $tags }}
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ $name }}
<span class="tag-list-count"><sup>({{ len $items }})</sup></span>
<span class="tag-list-count">
<sup>({{ len $items }})</sup>
</span>
</a>
{{- end }}
</div>