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,61 +77,40 @@
{{ 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 }}
{{ if $cardViewScreenWidth }}
<div class="relative w-screen max-w-[1600px] px-[30px]" style="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"> <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 }}
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3"> {{ if $cardViewScreenWidth }}
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ range .Pages }}
{{ partial "article-link/card.html" . }}
{{ end }}
{{ end }}
</section>
{{ 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%);"> <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"> <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 }} {{ else }}
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
<div class="relative w-screen max-w-[1600px] px-[30px]" style="left: calc(max(-50vw,-800px) + 50%);"> {{ end }}
<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 (.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>
</div> {{ if $cardViewScreenWidth }} </div> {{ end }}
{{ end }} {{ end }}