bunteshaus.de/themes/buha/layouts/partials/single/article.html
2022-04-03 21:08:42 +02:00

43 lines
1.1 KiB
HTML

<div id="articletitle">
<h1>{{- .Title -}}</h1>
</div>
<article>
<div id="articlecontent">
{{ partial "structure/article_meta" (dict "context" .) }}
<div id="articleinner">
<div id="articledata">
{{- if .Resources.ByType "image" -}}
{{ if eq .Content "" }}
<div class="notext">
{{ else }}
<div class="text">
{{ end }}
{{ range .Resources.ByType "image" }}
{{- $pic := . -}}
{{- $thumb := $pic.Resize "1024x" }}
<a href="{{ . }}"><img src="{{- $thumb.Permalink -}}" style="border-radius: 15px;" /></a>
{{ end }}
</div>
{{- end }}
<div id="articletext">
{{- .Content -}}
</div>
</div>
</div>
</div>
</article>
{{ define "sidebar" }}
<h3>{{ T "tags" }}</h3>
<div class="tags-list" style="display: flex; flex-direction: column;">
{{- with .Params.tags -}}
{{- if ge (len .) 1 -}}
{{- range . -}}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}/">#{{ . }}</a>
{{ end -}}
{{- end -}}
{{- end -}}
</div>
{{ end }}