Fediversity/themes/hugoplate/layouts/partials/components/blog-card.html

32 lines
1.1 KiB
HTML
Raw Normal View History

2024-03-26 16:28:28 +01:00
<div class="bg-body dark:bg-darkmode-body">
2024-03-27 12:24:18 +01:00
{{ $image:= .Params.image }} {{ if $image }} {{ partial "image" (dict "Src"
$image "Alt" .Title "Class" "mb-6 w-full rounded") }} {{ end }}
2024-03-26 16:28:28 +01:00
<h4 class="mb-3">
2024-03-27 12:24:18 +01:00
<a href="{{ .RelPermalink }}"> {{ .Title }} </a>
2024-03-26 16:28:28 +01:00
</h4>
2024-03-27 12:24:18 +01:00
{{ $categories:= .Params.categories }} {{ if $categories }}
<ul class="mb-4">
<li class="mr-4 inline-block">
<a href="{{ `authors/` | relLangURL }}{{ .Params.Author | urlize }}/">
<i class="fa-regular fa-circle-user mr-2"></i>{{ .Params.author }}
</a>
</li>
<li class="mr-4 inline-block">
<i class="fa-regular fa-folder mr-1"></i>
{{ range $i,$p:= $categories }}
<a
href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}/"
class="ms-1"
>{{ . | humanize }}{{ if ne $i (sub (len $categories) 1) }} {{ "," }} {{
end }}
</a>
{{ end }}
</li>
</ul>
2024-03-26 16:28:28 +01:00
{{ end }}
<p class="mb-6">{{ .Summary }}</p>
<a class="btn btn-outline-primary btn-sm" href="{{ .RelPermalink }}">
{{ i18n "read_more" }}
</a>
</div>