hugo-internet-weblog/layouts/partials/preview_post.html
2025-01-28 13:02:01 +01:00

32 lines
1.1 KiB
HTML

<article class="post">
{{ if (not (isset .Params "externalurl")) }}
<h2><a rel="full-article" href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ else }}
<h2><a rel="remote-article" href="{{ .Params.externalurl }}">→ {{ .Title }}</a> <a href="{{ .Permalink }}"></a></h2>
{{ end }}
<div class="postmeta">Geschrieben am <time datetime='{{ .Date.Format "02.01.2006" }}' pubdate="">{{ .Date.Format "2. Januar 2006" }}</time>
{{ if (isset .Params "categories") }}
in
<span class="categories">
{{ range $i, $v := .Params.categories }}
<a class="category" href="/categories/{{ $v | urlize }}">{{ $v }}</a>{{ if ne (len $.Params.categories) (add $i 1) }}, {{ end }}
{{ end }}
</span>
{{ end }}
</div>
<p>
{{ if (not (isset .Params "externalurl")) }}
{{ .Summary }}
{{ else }}
{{ .Content }}
{{ end }}
</p>
{{ if .Truncated }}
{{ if (not (isset .Params "externalurl")) }}
<a class="continue" rel="full-article" href="{{ .Permalink }}">Weiterlesen »</a>
{{ end }}
{{ end }}
</article>