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 | a809016e8aa4d27910186b0eea4e286821471f35 (patch) | |
| tree | 643485beed31b724739fb8e62381002135689efe /layouts/_partials | |
| parent | b58370a672748b5662044a68b3fdaa4f75efc200 (diff) | |
remove: remove cards from navigation and home
Diffstat (limited to 'layouts/_partials')
| -rw-r--r-- | layouts/_partials/home/latest-cards.html | 23 | ||||
| -rw-r--r-- | layouts/_partials/home/latest-posts.html | 2 |
2 files changed, 1 insertions, 24 deletions
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 |
