bunteshaus.de/themes/buha/layouts/partials/single/article.html
2022-04-04 12:06:53 +02:00

38 lines
992 B
HTML

<div id="articletitle">
<h1>{{- .Title -}}</h1>
</div>
{{- $pic := index (.Resources.ByType "image") 0 -}}
<article>
<div id="articlecontent">
{{ partial "structure/article_meta" (dict "context" . "visible" "all") }}
{{ $small := "solo" }}
{{ $big := "solo" }}
{{- if and (.Resources.ByType "image") (.Content) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
<div id="articleinner">
{{- if .Resources.ByType "image" -}}
{{- $pic := index (.Resources.ByType "image") 0 -}}
{{- $thumb := $pic.Resize "2048x" }}
{{ if ne .Content "" }}
{{- $thumb = $pic.Resize "1024x" }}
{{ end }}
<div id="articlepicture" class="{{ $small }} borderrad25">
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
</div>
{{ end }}
{{- if .Content -}}
<div id="articletext" class="{{ $big }}">
{{- .Content -}}
</div>
{{- end }}
</div>
</div>
</article>