mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
✨Taxonomy add card view
This commit is contained in:
@@ -36,23 +36,25 @@
|
||||
{{ $jsPage := resources.Get "js/page.js" }}
|
||||
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
|
||||
|
||||
{{ if .Site.Params.taxonomy.cardView }}
|
||||
|
||||
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
|
||||
{{ range .Data.Terms }}
|
||||
<article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/4">
|
||||
<h2 class="flex items-center">
|
||||
<a
|
||||
class="text-xl font-medium decoration-primary-500 hover:underline hover:underline-offset-2"
|
||||
href="{{ .Page.RelPermalink }}"
|
||||
>{{ .Page.Title }}</a
|
||||
>
|
||||
{{ if $.Site.Params.taxonomy.showTermCount | default true }}
|
||||
<span class="px-2 text-base text-primary-500">·</span>
|
||||
<span class="text-base text-neutral-400">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</h2>
|
||||
</article>
|
||||
{{ partial "term-link/card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
|
||||
{{ range .Data.Terms }}
|
||||
{{ partial "term-link/text.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user