summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/term-link/card.html
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
committerChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
commite77051ccc4b47951bfa4fde2be436b1bb2fb113b (patch)
treef0b75ee3521da9c8cd39dac4359212348f70e4e8 /themes/blowfish/layouts/partials/term-link/card.html
parent4b355837824ac2422d371acef790f0f4249255c7 (diff)
use https://github.com/nunocoracao/blowfish.git
Diffstat (limited to 'themes/blowfish/layouts/partials/term-link/card.html')
-rw-r--r--themes/blowfish/layouts/partials/term-link/card.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/partials/term-link/card.html b/themes/blowfish/layouts/partials/term-link/card.html
new file mode 100644
index 0000000..7f2e8ad
--- /dev/null
+++ b/themes/blowfish/layouts/partials/term-link/card.html
@@ -0,0 +1,54 @@
+<a href="{{ .Page.RelPermalink }}" class="min-w-full">
+ <div
+ class="border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
+
+ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
+
+ {{- with site.Params.images -}}
+ {{- range first 6 . }}
+ <meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
+ {{- else -}}
+ {{- $images := .Page.Resources.ByType "image" -}}
+ {{- $featured := $images.GetMatch "*feature*" -}}
+ {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
+ {{- with $featured -}}
+ {{ if $disableImageOptimization }}
+ {{ with . }}
+ <div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
+ {{ end }}
+ {{ else }}
+ {{ with .Resize "600x" }}
+ <div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
+ {{ end }}
+ {{ end }}
+ {{- else -}}
+ {{- with site.Params.images }}
+ <meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
+ {{- end -}}
+ {{- end -}}
+
+
+ {{ if site.Params.taxonomy.showTermCount | default true }}
+ <span class="absolute bottom-0 right-0 m-2">
+ <span class="flex">
+ <span
+ class="rounded-md border border-primary-400 px-1 py-[1px] text-xl font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
+ >
+ {{ .Count }}
+ </span>
+ </span>
+ </span>
+ {{ end }}
+
+ <div class="px-6 py-4">
+
+ <div
+ class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
+ >{{ .Page.Title | emojify }}</div>
+
+ </div>
+ <div class="px-6 pt-4 pb-2">
+
+ </div>
+ </div>
+</a> \ No newline at end of file