bunteshaus.de/themes/buha/layouts/partials/structure/list_article.html
2022-04-04 11:21:48 +02:00

40 lines
1.2 KiB
HTML

{{ if .Title }}
<article class="articlebgcol1 borderrad25"><a href="{{- .Permalink -}}">
<div id="articletitle">
<h2>{{- .Title -}}</h2>
</div>
<div id="articlecontent">
{{ $.Scratch.Set "meta" "false" }}
{{ partial "structure/article_meta" (dict "context" . "visible" "price") }}
{{ $small := "solo" }}
{{ $big := "solo" }}
{{- if and (.Resources.ByType "image") (.Summary) -}}
{{ $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 .Summary -}}
<div id="articletext" class="{{ $big }}">
{{- .Summary -}}
{{ if or .Truncated (eq ($.Scratch.Get "meta") "true") }}
<div id="readmore">{{- i18n "readmore" -}}..</div>
{{ end }}
</div>
{{- end }}
</div>
</div>
</a></article>
{{ end }}