From 48b656c949000ec88d6e46afbdb8d2d6adf10d70 Mon Sep 17 00:00:00 2001 From: Verdant Date: Sat, 28 Mar 2026 15:47:16 +0800 Subject: style: refactor CSS style --- layouts/archives/single.html | 125 ++++++++++++++++++++++++++++++++----------- 1 file changed, 95 insertions(+), 30 deletions(-) (limited to 'layouts/archives/single.html') diff --git a/layouts/archives/single.html b/layouts/archives/single.html index efafdca..be44c9f 100644 --- a/layouts/archives/single.html +++ b/layouts/archives/single.html @@ -1,42 +1,107 @@ {{ define "main" }} -
{{- partial "header.html" . -}}
+
+{{- partial "header.html" . -}} +
+ {{ if .Data.Singular }} +

Filtering for "{{ .Title }}"

+ + Remove filter + + {{ end }} + + {{ if .Site.Params.postSearch }} + + + {{ end }} + {{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }} {{ $excludePosts := where $allPosts "Params.categories" "intersect" (slice "1") }} - {{ $postPages := $allPosts | complement $excludePosts }} + {{ $postPages := ($allPosts | complement $excludePosts) }} {{ if .Site.Params.showPostCount }} -

共 {{ len $postPages }} 篇文章

+

There {{ if le (len $postPages) 1 }} is {{ len $postPages }} piece. {{ else }} are {{ len $postPages }} pieces. {{ end }}

{{ end }} -
- {{ if gt (len $postPages) 0 }} - {{ range $postPages.GroupByDate "2006" }} -
- -

{{ .Key }} 年 ({{ len .Pages }})

-
- -
    - {{ range .Pages }} -
  • - - - - - - {{ .Title }} -
  • - {{ end }} -
-
+
    + {{ $currentYear := 0 }} + {{ range $postPages }} + {{ if .Site.Params.groupByYear }} + {{ $year := .Date.Year }} + {{ if ne $year $currentYear }} +

    {{ $year }}

    + {{ $currentYear = $year }} + {{ end }} {{ end }} +
  • + + + + + + {{ .Title }} +
  • {{ else }} -

    暂无文章

    +
  • No posts yet
  • {{ end }} -
+ + + {{ if .Data.Singular }} + {{ else }} + +
+ {{ range .Site.Taxonomies.tags }} + #{{ .Page.Title }}  + {{ end }} +
+
+ {{ end }}
-
-{{ end }} \ No newline at end of file +{{ end }} -- cgit v1.2.3