From 481db4e836be0b15cc9c70e41b1a23b6d801bef1 Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Thu, 16 Dec 2021 15:31:51 +0000 Subject: [PATCH] modified widget "server-status" --- assets/scss/custom.scss | 26 +++++++++++++++ i18n/zh-CN.yaml | 6 ++-- layouts/partials/widget/status.html | 52 ++++++++++++++++------------- 3 files changed, 58 insertions(+), 26 deletions(-) create mode 100644 assets/scss/custom.scss diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss new file mode 100644 index 0000000..7f17aa6 --- /dev/null +++ b/assets/scss/custom.scss @@ -0,0 +1,26 @@ +.widget.archives { + .widget-archive--list { + border-radius: var(--card-border-radius); + box-shadow: var(--shadow-l1); + background-color: var(--card-background); + } + + .status-item { + &:not(:last-of-type) { + border-bottom: 1.5px solid var(--card-separator-color); + } + font-size: 1.4rem; + padding: 18px 25px; + display: flex; + + span.year { + flex: 1; + color: var(--card-text-color-main); + font-weight: bold; + } + + span.count { + color: var(--card-text-color-tertiary); + } + } +} diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 0da1ed9..4ee2567 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -5,6 +5,6 @@ widget: status: title: 状态 - start: 博客建立自: - time: 已稳定运行: - postCount: 总文章数量: \ No newline at end of file + postCount: 文章数量 + start: 博客起始 + time: 稳定运行 \ No newline at end of file diff --git a/layouts/partials/widget/status.html b/layouts/partials/widget/status.html index f2e0197..1ffc474 100644 --- a/layouts/partials/widget/status.html +++ b/layouts/partials/widget/status.html @@ -1,39 +1,45 @@ -{{/*-- post count */}} -{{ $posts := (where .Site.RegularPages "Section" "==" "post") }} -{{ $postCount := len $posts }} +{{/*-- post count */}} {{ $posts := (where .Site.RegularPages "Section" "==" "post") }} {{ +$postCount := len $posts }} -
-
- {{ partial "helper/icon" "status" }} -
+
+
{{ partial "helper/icon" "status" }}

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

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