mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
refactor(list.html): make list.html formattable
This commit is contained in:
@@ -27,7 +27,6 @@ static
|
|||||||
|
|
||||||
layouts/_default/_markup/render-heading.html
|
layouts/_default/_markup/render-heading.html
|
||||||
layouts/_default/index.json
|
layouts/_default/index.json
|
||||||
layouts/_default/list.html
|
|
||||||
layouts/shortcodes/screenshot.html
|
layouts/shortcodes/screenshot.html
|
||||||
layouts/shortcodes/figure.html
|
layouts/shortcodes/figure.html
|
||||||
layouts/partials/hugo-embedded/shortcodes/figure-default.html
|
layouts/partials/hugo-embedded/shortcodes/figure-default.html
|
||||||
|
|||||||
@@ -81,17 +81,24 @@
|
|||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
{{ if $cardViewScreenWidth }}
|
{{ if $cardViewScreenWidth }}
|
||||||
<div class="relative w-screen max-w-[1600px] px-[30px] left-[calc(max(-50vw,-800px)+50%)]">
|
<div class="relative w-screen max-w-[1600px] px-[30px] left-[calc(max(-50vw,-800px)+50%)]">
|
||||||
{{ end }}
|
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||||
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
{{ .Key }}
|
||||||
{{ .Key }}
|
</h2>
|
||||||
</h2>
|
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 {{ if $cardViewScreenWidth }} xl:grid-cols-4 2xl:grid-cols-5 {{ end }}">
|
||||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 {{ if $cardViewScreenWidth }} xl:grid-cols-4 2xl:grid-cols-5 {{ end }}">
|
{{ range .Pages }}
|
||||||
{{ range .Pages }}
|
{{ partial "article-link/card.html" . }}
|
||||||
{{ partial "article-link/card.html" . }}
|
{{ end }}
|
||||||
{{ end }}
|
</section>
|
||||||
</section>
|
|
||||||
{{ if $cardViewScreenWidth }}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
|
||||||
|
{{ .Key }}
|
||||||
|
</h2>
|
||||||
|
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 {{ if $cardViewScreenWidth }} xl:grid-cols-4 2xl:grid-cols-5 {{ end }}">
|
||||||
|
{{ range .Pages }}
|
||||||
|
{{ partial "article-link/card.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@@ -99,24 +106,34 @@
|
|||||||
|
|
||||||
{{ if $cardViewScreenWidth }}
|
{{ if $cardViewScreenWidth }}
|
||||||
<div class="relative w-screen max-w-[1600px] px-[30px] left-[calc(max(-50vw,-800px)+50%)]">
|
<div class="relative w-screen max-w-[1600px] px-[30px] left-[calc(max(-50vw,-800px)+50%)]">
|
||||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
|
||||||
|
{{ if not $orderByWeight }}
|
||||||
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
{{ partial "article-link/card.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ range (.Paginate (.Pages.ByWeight)).Pages }}
|
||||||
|
{{ partial "article-link/card.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||||
{{ end }}
|
{{ if not $orderByWeight }}
|
||||||
{{ if not $orderByWeight }}
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{ range .Pages }}
|
||||||
{{ range .Pages }}
|
{{ partial "article-link/card.html" . }}
|
||||||
{{ partial "article-link/card.html" . }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ range (.Paginate (.Pages.ByWeight)).Pages }}
|
||||||
|
{{ partial "article-link/card.html" . }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
</section>
|
||||||
{{ else }}
|
|
||||||
{{ range (.Paginate (.Pages.ByWeight)).Pages }}
|
|
||||||
{{ partial "article-link/card.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</section>
|
|
||||||
{{ if $cardViewScreenWidth }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user