diff --git a/assets/icons/status.svg b/assets/icons/status.svg new file mode 100644 index 0000000..80f8ccf --- /dev/null +++ b/assets/icons/status.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/config.yaml b/config.yaml index 2335980..cfa9e01 100644 --- a/config.yaml +++ b/config.yaml @@ -139,6 +139,7 @@ params: - search - tag-cloud - archives + - status categoriesCloud: limit: 20 @@ -148,6 +149,10 @@ params: tagCloud: limit: 10 + + status: + start: 2018-08-04 + format: yyyy 年 MM 月 dd 日 opengraph: twitter: diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 5a1c2b5..0da1ed9 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -1,4 +1,10 @@ widget: categoriesCloud: title: - other: 分类 \ No newline at end of file + other: 分类 + + status: + title: 状态 + start: 博客建立自: + time: 已稳定运行: + postCount: 总文章数量: \ No newline at end of file diff --git a/layouts/partials/widget/status.html b/layouts/partials/widget/status.html new file mode 100644 index 0000000..f2e0197 --- /dev/null +++ b/layouts/partials/widget/status.html @@ -0,0 +1,52 @@ +{{/*-- post count */}} +{{ $posts := (where .Site.RegularPages "Section" "==" "post") }} +{{ $postCount := len $posts }} + +
+
+ {{ partial "helper/icon" "status" }} +
+

{{ T "widget.status.title" }}

+ +
+
{{ T "widget.status.postCount" }}{{ $postCount }}
+
{{ T "widget.status.start" }}
+
{{ T "widget.status.time" }}
+
+ + +