diff --git a/assets/css/_common/components/pages/categories.scss b/assets/css/_common/components/pages/categories.scss index 130c58f..b79ac03 100644 --- a/assets/css/_common/components/pages/categories.scss +++ b/assets/css/_common/components/pages/categories.scss @@ -1,10 +1,14 @@ .category-all-page { + + min-height: 700px; + .category-all-title { + font-size: 1.35em; text-align: center; } .category-all { - margin-top: 20px; + margin-top: 40px; } .category-list { diff --git a/assets/css/_common/components/pages/tag-cloud.scss b/assets/css/_common/components/pages/tag-cloud.scss index 011834b..71bc6ad 100644 --- a/assets/css/_common/components/pages/tag-cloud.scss +++ b/assets/css/_common/components/pages/tag-cloud.scss @@ -1,5 +1,19 @@ .tag-cloud { text-align: center; + min-height: 700px; + + .tag-cloud-title { + text-align: center; + font-size: 1.35em; + + .tag-list-count { + font-size: 0.56em; + } + } + + .tag-cloud-tags { + margin-top: 40px; + } a { display: inline-block; @@ -12,6 +26,7 @@ .tag-cloud-#{$tag-cloud} { border-bottom-color: $tag-cloud-color; color: $tag-cloud-color; + font-size: #{0.85+($tag-cloud * 0.05)}em } } diff --git a/assets/css/_common/components/post/post-header.scss b/assets/css/_common/components/post/post-header.scss index 31e4e39..8be25e6 100644 --- a/assets/css/_common/components/post/post-header.scss +++ b/assets/css/_common/components/post/post-header.scss @@ -116,6 +116,6 @@ @if $busuanzi_enable and $busuanzi_post_views { #busuanzi_container_page_pv { - display: none; + display: inline-block; } } diff --git a/assets/css/_common/scaffolding/fontawesome/animation.scss b/assets/css/_common/scaffolding/fontawesome/animation.scss new file mode 100644 index 0000000..cedac48 --- /dev/null +++ b/assets/css/_common/scaffolding/fontawesome/animation.scss @@ -0,0 +1,4 @@ +.fa-spin { + -webkit-animation: fa-spin .8s infinite linear; + animation: fa-spin .8s infinite linear; +} \ No newline at end of file diff --git a/assets/css/_common/scaffolding/fontawesome/index.scss b/assets/css/_common/scaffolding/fontawesome/index.scss new file mode 100644 index 0000000..ed88f4c --- /dev/null +++ b/assets/css/_common/scaffolding/fontawesome/index.scss @@ -0,0 +1 @@ +@import 'animation'; \ No newline at end of file diff --git a/assets/css/_common/scaffolding/index.scss b/assets/css/_common/scaffolding/index.scss index aec7a8d..5cd24ed 100644 --- a/assets/css/_common/scaffolding/index.scss +++ b/assets/css/_common/scaffolding/index.scss @@ -10,3 +10,4 @@ @import 'tags'; @import 'pagination'; @import 'comments'; +@import 'fontawesome'; diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index b99368f..94bf85b 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -47,16 +47,13 @@ BackTopLabel: TagsCounterTitle: zero: 暂无标签 - one: 目前共计 1 个标签 - other: "目前共计 %d 个标签" + other: "目前共计 {{ .Count }} 个标签" CatesCounterTitle: zero: 暂无分类 - one: 目前共计 1 个分类 - other: "目前共计 %d 个分类" + other: "目前共计 {{ .Count }} 个分类" ArchiveCounterTitle: - zero: 暂无日志。 - one: 目前共计 1 篇日志 - other: "目前共计 {{ .Count }} 篇日志" + zero: 暂无日志 + other: "目前共计 {{ .Count }} 篇日志" PostArchiveCheersUm: other: 嗯.. @@ -92,7 +89,7 @@ PostReading: PostReadTime: other: "{{- .ReadingTime -}}分钟" PostViews: - other: 浏览数 + other: 浏览 PostCatgs: other: 分类 PostTags: diff --git a/layouts/404.html b/layouts/404.html index e69de29..1cb628e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + {{ i18n "404PageTitle" }} + + + +
+
+ 返回主页 +
+ \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index fedc777..eb99ade 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,3 +1,6 @@ +{{- .Scratch.Set "postsCount" (len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)) -}} +{{- .Scratch.Set "catsCount" (len .Site.Taxonomies.categories) -}} +{{- .Scratch.Set "tagsCount" (len .Site.Taxonomies.tags) -}} {{- $vendors := .Site.Data.resources.vendors -}} {{- $pluginVen := .Site.Params.vendors.plugins -}} {{- $pluginCDN := index $vendors $pluginVen -}} diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 631f0d3..a9bce65 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -7,7 +7,7 @@
{{- $cheers := "Um" }} - {{- $posts := .Scratch.Get "posts" }} + {{- $posts := .Scratch.Get "postsCount" }} {{- if gt $posts 210 }} {{- $cheers = "Excellent" }} {{- else if gt $posts 130 }} @@ -21,9 +21,9 @@ {{- end }} {{- T (printf "PostArchiveCheers%s" $cheers) }} - {{- T "SymbolComma"}} - {{- T "ArchiveCounterTitle" $posts }} - {{- T "SymbolComma"}} + {{- T "SymbolComma" }} + {{- T "ArchiveCounterTitle" $posts | safeHTML }} + {{- T "SymbolComma" }} {{- T "PostArchiveKeepOn" }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 07bd27f..4ef68bc 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,6 +1,22 @@ {{- define "title" -}} {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}} {{- end -}} +{{ define "main_inner_class" }}{{ .Data.Plural }} posts-collapse{{ end }} {{ define "main" }} - {{ .Data.Singular }} +
+
+
+ +

+ {{ .Title }} + {{ T .Data.Singular | default .Data.Singular }} +

+
+
+ + {{ .Render "list" }} + +
+
+{{- partial "pagination.html" . }} {{- end }} \ No newline at end of file diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index d434450..50992ab 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -1,6 +1,44 @@ {{- define "title" -}} - {{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "AllSome" }} - {{ .Site.Title -}} +{{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "AllSome" }} - {{ .Site.Title -}} {{- end -}} -{{ define "main" }} - {{ .Data.Terms }} -{{ end }} \ No newline at end of file +{{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}} +{{- define "main" }} +
+ + {{- if eq .Data.Plural "categories" }} + {{ $cats := .Site.Taxonomies.categories }} +
+
+ {{- T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML -}} +
+
+
    + {{- range $name, $items := $cats }} +
  • + {{ $name }} + {{ len $items }} +
  • + {{- end }} +
+
+
+ {{- end }} + {{- if eq .Data.Plural "tags" }} + {{ $tags := .Site.Taxonomies.tags }} +
+
+ {{- T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML -}} +
+
+ {{ $randNums := (seq 10) }} + {{- range $name, $items := $tags }} + {{ $name }} + ({{ len $items }}) + + {{- end }} +
+
+ {{- end }} +
+
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/header/menus.html b/layouts/partials/header/menus.html index 4f493b2..b286f3e 100644 --- a/layouts/partials/header/menus.html +++ b/layouts/partials/header/menus.html @@ -1,5 +1,3 @@ -{{ $posts := len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections) }} -{{- .Scratch.Set "posts" $posts -}} {{- $ms := .Site.Params.menuSets }} {{- $curP := .Page }}