From cb960d90e234a4b76d471d352ffed8a1982b36cc Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 25 Apr 2025 23:06:54 +0800 Subject: =?UTF-8?q?chore:=20rename=20=E5=88=86=E7=B1=BB=20to=20=E4=B8=93?= =?UTF-8?q?=E6=A0=8F=20and=20style=20uncategorized=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 9ff8c08731833841b81671df0d7ceae008a4b5ef --- assets/css/components/_postlist.scss | 7 +++++-- content/categories/_index.md | 2 +- content/categories/uncategorized.md | 4 +++- i18n/zh.yml | 2 +- layouts/_default/taxonomy.html | 7 ++++--- layouts/_default/uncategorized.html | 33 +++++++++++++++++++++------------ 6 files changed, 35 insertions(+), 20 deletions(-) diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss index 5cc30856..785d9f7d 100644 --- a/assets/css/components/_postlist.scss +++ b/assets/css/components/_postlist.scss @@ -106,11 +106,13 @@ .term-list { .term-list-posts { - list-style: none; + &:not(ol) { + list-style: none; + } padding-inline-start: 0; display: flex; flex-direction: column; - gap: 0.5rem; + gap: 1rem; li { display: flex; justify-content: space-between; @@ -119,6 +121,7 @@ font-size: 0.9rem; font-family: var(--mono-font-family); color: var(--secondary-text-color); + flex-shrink: 0; } .posts-subtitle { color: var(--secondary-text-color); diff --git a/content/categories/_index.md b/content/categories/_index.md index 1080d041..6bfa05ea 100644 --- a/content/categories/_index.md +++ b/content/categories/_index.md @@ -1,3 +1,3 @@ --- -title: 分类 +title: 专栏 --- diff --git a/content/categories/uncategorized.md b/content/categories/uncategorized.md index bfb38ee7..47beb44b 100644 --- a/content/categories/uncategorized.md +++ b/content/categories/uncategorized.md @@ -1,4 +1,6 @@ --- -title: 未分类文章 +title: 随笔 layout: uncategorized --- + +这里列出了所有不属于任何专栏的文章,也就是随笔。 diff --git a/i18n/zh.yml b/i18n/zh.yml index a827365d..a354fc09 100644 --- a/i18n/zh.yml +++ b/i18n/zh.yml @@ -12,7 +12,7 @@ footer: searchInstruction: '⌘+K 在任何地方搜索' postNav: latest: '最新' - categories: '分类' + categories: '专栏' tags: '标签' cards: 最近在学 moreLinks: diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index ad1179e2..14be0c9a 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -71,10 +71,11 @@ {{ end }} {{ end }} + + {{ end }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/_default/uncategorized.html b/layouts/_default/uncategorized.html index 1f777025..afec928a 100644 --- a/layouts/_default/uncategorized.html +++ b/layouts/_default/uncategorized.html @@ -2,19 +2,28 @@
{{ partial "components/post-page-header.html" . }} {{ partial "components/breadcrumbs.html" . }} -
- - {{ $uncategorized := where (where .Site.RegularPages "Section" "posts") "Params.categories" "==" nil }} - {{ if $uncategorized }} -
-
    - {{ range $uncategorized }} -
  1. {{ .Title }}
  2. - {{ end }} -
-
- {{ end }} +
+

{{ .Content }}

+ + {{ $uncategorized := where (where .Site.RegularPages "Section" "posts") "Params.categories" "==" nil }} + {{ if $uncategorized }} +
+
    + {{ range $uncategorized }} +
  1. + + {{ .Title }}{{ with .Params.subtitle }}:{{. }} + {{ end }} + + +
  2. + {{ end }} +
+
+ {{ end }}
{{ partial "footer.html" . }} {{ end }} -- cgit v1.2.3