bunteshaus.de/themes/buha/layouts/partials/structure/list_article.html

40 lines
1.2 KiB
HTML
Raw Normal View History

2022-04-03 21:08:42 +02:00
{{ if .Title }}
<article class="articlebgcol1 borderrad25"><a href="{{- .Permalink -}}">
<div id="articletitle">
<h2>{{- .Title -}}</h2>
</div>
<div id="articlecontent">
2022-04-04 03:35:13 +02:00
{{ $.Scratch.Set "meta" "false" }}
{{ partial "structure/article_meta" (dict "context" . "visible" "price") }}
2022-04-04 11:21:48 +02:00
{{ $small := "solo" }}
{{ $big := "solo" }}
{{- if and (.Resources.ByType "image") (.Summary) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
2022-04-03 21:08:42 +02:00
<div id="articleinner">
2022-04-04 11:21:48 +02:00
{{- 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 -}}
2022-04-04 03:35:13 +02:00
{{ if or .Truncated (eq ($.Scratch.Get "meta") "true") }}
2022-04-03 21:08:42 +02:00
<div id="readmore">{{- i18n "readmore" -}}..</div>
{{ end }}
</div>
2022-04-04 11:21:48 +02:00
{{- end }}
2022-04-03 21:08:42 +02:00
</div>
</div>
</a></article>
2022-04-04 03:35:13 +02:00
{{ end }}