From 90b6b45189b3976d43cc4913c985d20dbfca2fcb Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 18 Jul 2025 19:27:23 +0800 Subject: refactor: reduce CSS with UnoCSS in some partials Former-commit-id: 4c3be51635a89d055059836e6e26ddb4cbd9ebfa --- layouts/_partials/posts/banner.html | 20 ++------ layouts/_partials/stats/word-count-chart.html | 67 ++++----------------------- 2 files changed, 15 insertions(+), 72 deletions(-) (limited to 'layouts/_partials') diff --git a/layouts/_partials/posts/banner.html b/layouts/_partials/posts/banner.html index 7ab4c826..218a4c05 100644 --- a/layouts/_partials/posts/banner.html +++ b/layouts/_partials/posts/banner.html @@ -1,17 +1,7 @@ {{ with .Params.banner }} -
- -
- + {{ end }} diff --git a/layouts/_partials/stats/word-count-chart.html b/layouts/_partials/stats/word-count-chart.html index 10513922..ad7347db 100644 --- a/layouts/_partials/stats/word-count-chart.html +++ b/layouts/_partials/stats/word-count-chart.html @@ -1,54 +1,3 @@ - - {{/* Group word counts per month */}} {{ $monthly := dict }} {{ range .Site.RegularPages }} @@ -75,19 +24,23 @@ {{ if gt $val $max }}{{ $max = $val }}{{ end }} {{ end }} -
+
{{ range $month := $months }} {{ $val := index $monthly $month }} {{ $height := mul (div (float $val) (float $max)) 100 }} {{ $opacity := add 0.5 (div $height 200) }} -
-
-
{{ $val }}
-
+
+
{{ $val }}
+
-
{{ $month }}
+
{{ $month }}
{{ end }}
-- cgit v1.2.3