From 3d1cd48788992dfd0537b191db6ab842f02a5284 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Wed, 24 Sep 2025 22:16:01 +0800 Subject: remove: remove cards from navigation and home Former-commit-id: a809016e8aa4d27910186b0eea4e286821471f35 --- config/_default/params.zh.yaml | 3 --- layouts/_partials/home/latest-cards.html | 23 ----------------------- layouts/_partials/home/latest-posts.html | 2 +- layouts/home.html | 1 - 4 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 layouts/_partials/home/latest-cards.html diff --git a/config/_default/params.zh.yaml b/config/_default/params.zh.yaml index 9b5e0f26..8ffd285e 100644 --- a/config/_default/params.zh.yaml +++ b/config/_default/params.zh.yaml @@ -2,9 +2,6 @@ nav: - name: 议叙 link: /posts/ target: _self - - name: 卡片 - link: /cards/ - target: _self - name: 书目 link: /library/ target: _self diff --git a/layouts/_partials/home/latest-cards.html b/layouts/_partials/home/latest-cards.html deleted file mode 100644 index f7a7df78..00000000 --- a/layouts/_partials/home/latest-cards.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ if eq .Site.Language.Lang "zh" }} - -
-
- {{- $cards := .Site.GetPage "section" "cards" }} - {{- $paginator := .Paginate $cards.Pages 4 }} - {{- range $paginator.Pages }} -
- {{ partial "items/card" (dict - "context" . - "summary" true - "summaryClass" "text-base!") }} -
- {{- end }} -
- -
-{{ end }} diff --git a/layouts/_partials/home/latest-posts.html b/layouts/_partials/home/latest-posts.html index d98f9e1c..b6007c5c 100644 --- a/layouts/_partials/home/latest-posts.html +++ b/layouts/_partials/home/latest-posts.html @@ -2,7 +2,7 @@
{{ $firstPost := true }} - {{ range first 8 (where site.RegularPages "Type" "in" site.Params.mainSections) }} + {{ range first 12 (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ partial "items/post" (dict "ctx" . "showSummary" $firstPost diff --git a/layouts/home.html b/layouts/home.html index 19b9d21c..2e36c63d 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -3,7 +3,6 @@ {{ partial "header" . }} {{ partial "home/home-nav" . }} {{ partial "home/latest-posts" . }} - {{ partial "home/latest-cards" . }} {{ partial "footer.html" . }} {{ end }} -- cgit v1.2.3