list-template: lil house keeping

This commit is contained in:
Manjunath Mohan 2024-06-12 10:11:14 +05:30
parent 0a91156191
commit afb206e5db

View file

@ -77,64 +77,43 @@
{{ end }} {{ end }}
</section> </section>
{{ else if and $cardView (not $cardViewScreenWidth) }} {{ else }}
{{ if $groupByYear }} {{ if $groupByYear }}
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300"> {{ if $cardViewScreenWidth }}
{{ .Key }} <div class="relative w-screen max-w-[1600px] px-[30px]" style="left: calc(max(-50vw,-800px) + 50%);">
</h2> {{ end }}
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3"> <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 }} {{ range .Pages }}
{{ partial "article-link/card.html" . }} {{ partial "article-link/card.html" . }}
{{ end }} {{ end }}
</section> </section>
{{ if $cardViewScreenWidth }} </div> {{ end }}
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ if $cardViewScreenWidth }}
<div class="relative w-screen max-w-[1600px] px-[30px]" style="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">
{{ 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 }}
{{ 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 }}
{{ end }} {{ end }}
</section> </section>
{{ if $cardViewScreenWidth }} </div> {{ end }}
{{ end }} {{ end }}
{{ else if and $cardView $cardViewScreenWidth }}
{{ if $groupByYear }}
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<div class="relative w-screen max-w-[1600px] px-[30px]" style="left: calc(max(-50vw,-800px) + 50%);">
<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 xl:grid-cols-4 2xl:grid-cols-5">
{{ range .Pages }}
{{ partial "article-link/card.html" . }}
{{ end }}
</section>
</div>
{{ end }}
{{ else }}
<div class="relative w-screen max-w-[1600px] px-[30px]" style="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">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ range .Pages }}
{{ partial "article-link/card.html" . }}
{{ end }}
{{ end }}
</section>
</div>
{{ end }}
{{end}} {{end}}
{{ else }} {{ else }}