diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-24 22:16:01 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-24 22:16:01 +0800 |
| commit | 3d1cd48788992dfd0537b191db6ab842f02a5284 (patch) | |
| tree | e985b8082caeadda39f4e63844c9c9f17a91d0a7 | |
| parent | 0d03ec03dd566d4f2f4079a57fc2d25cbe2a717c (diff) | |
remove: remove cards from navigation and home
Former-commit-id: a809016e8aa4d27910186b0eea4e286821471f35
| -rw-r--r-- | config/_default/params.zh.yaml | 3 | ||||
| -rw-r--r-- | layouts/_partials/home/latest-cards.html | 23 | ||||
| -rw-r--r-- | layouts/_partials/home/latest-posts.html | 2 | ||||
| -rw-r--r-- | layouts/home.html | 1 |
4 files changed, 1 insertions, 28 deletions
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" }} -<!-- Latest Cards --> -<section class="my-4"> - <div class="p-[5px] flex w-full overflow-x-auto gap-4 items-stretch"> - {{- $cards := .Site.GetPage "section" "cards" }} <!-- 获取 "cards" 部分的内容 --> - {{- $paginator := .Paginate $cards.Pages 4 }} <!-- 对该部分内容进行分页 --> - {{- range $paginator.Pages }} - <div class="flex-shrink-0 w-5/6 md:w-1/2"> - {{ partial "items/card" (dict - "context" . - "summary" true - "summaryClass" "text-base!") }} - </div> - {{- end }} - </div> - <div class="py-4"> - <a href="/cards" class="small-button" - data-umami-event="➕ Click more cards link"> - {{ T "moreLinks.cards" }} → - </a> - </div> -</section> -{{ 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 @@ <section class="pagefind-exclude"> <div class="flex flex-col my-4"> {{ $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" . }} </article> {{ partial "footer.html" . }} {{ end }} |
