Files
blog/layouts/partials/tiles-cover.html
T
2022-02-20 20:00:01 +01:00

31 lines
884 B
HTML

{{ range where .Site.RegularPages "Type" "tiles" }}
{{ $count := partial "func/count_posts.html" ( dict "context" . "term" .Params.CorrespondingTagName ) }}
<figure >
{{if .Params.Cover }}
<!-- Cover image found -- found in tiles -->
<a href="https://{{ .Params.urlLink }}">
<img src="{{ .Params.Cover }}"
alt="{{ .Title | plainify | default " " }}"
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" /></a>
{{ else }}
<!-- No cover image found -->
<a href="https://{{ .Params.urlLink }}">
{{ .Title | plainify | default " " }} </a>
{{ end }}
<figcaption >
{{ if gt $count 0 }}
<a href="tags/{{ .Params.CorrespondingTagName }}">
#{{ .Params.CorrespondingTagName | plainify }} <small>({{ $count }})</small> </a>
{{ end }}
</figcaption >
</figure>
{{ end }}