bunteshaus.de/themes/buha/layouts/partials/structure/list_article.html
2022-04-04 03:35:13 +02:00

39 lines
1.1 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") }}
<div id="articleinner">
<div id="articledata">
{{- if .Resources.ByType "image" -}}
{{- $pic := index (.Resources.ByType "image") 0 -}}
{{ $thumb := "" }}
{{ if eq .Content "" }}
<div class="notext">
{{- $thumb = $pic.Resize "1024x" }}
{{ else }}
<div class="text">
{{- $thumb = $pic.Resize "2048x" }}
{{ end }}
<img src="{{- $thumb.Permalink -}}" style="border-radius: 15px;" />
</div>
{{- end }}
<div id="articletext">
{{- if .Truncated -}}
{{- .Summary -}}
{{- else -}}
{{- .Content -}}
{{- end }}
{{ if or .Truncated (eq ($.Scratch.Get "meta") "true") }}
<div id="readmore">{{- i18n "readmore" -}}..</div>
{{ end }}
</div>
</div>
</div>
</div>
</a></article>
{{ end }}