2022-06-08 00:38:13 +02:00
|
|
|
{{ $title := .title }}
|
2022-06-15 02:27:58 +02:00
|
|
|
{{ $link := .link }}
|
2022-06-07 13:36:28 +02:00
|
|
|
{{ $p := .pages }}
|
|
|
|
{{ if and (.limit) (not .paginate) }}
|
|
|
|
{{ $p = first .limit .pages }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ $paginator := .pages }}
|
|
|
|
{{ if .paginate }}
|
|
|
|
{{ $paginator = .context.Paginate $p }}
|
|
|
|
{{ $p = $paginator.Pages }}
|
|
|
|
{{ end }}
|
|
|
|
|
2022-06-12 13:50:06 +02:00
|
|
|
|
2022-06-07 13:36:28 +02:00
|
|
|
|
|
|
|
{{ if $p }}
|
|
|
|
<div class="gen_list">
|
2022-06-15 02:27:58 +02:00
|
|
|
{{ if $title }}
|
|
|
|
<h2>
|
|
|
|
{{ if $link }}
|
|
|
|
<a href="{{ $link | relLangURL }}">
|
|
|
|
{{ end }}
|
|
|
|
{{ $title }}
|
|
|
|
{{ if $link }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</h2>
|
|
|
|
{{ end }}
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ range $p }}
|
2022-06-12 14:22:25 +02:00
|
|
|
<div class="list_item">
|
2022-06-14 23:01:19 +02:00
|
|
|
{{ $metas := dict "when" .Params.when "price" .Params.price }}
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ $banner := slice }}
|
|
|
|
{{ $image := slice }}
|
|
|
|
{{ $images := slice }}
|
|
|
|
{{ if .Resources.GetMatch "banner*" }}
|
|
|
|
{{ $banner = slice (.Resources.GetMatch "banner*") }}
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Resources.ByType "image" }}
|
|
|
|
{{ $image = .Resources.ByType "image" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ $images = complement $banner $image }}
|
|
|
|
{{ $image = (index (complement $banner $image) 0) }}
|
|
|
|
{{ $banner = (index $banner 0) }}
|
|
|
|
<a href="{{ .Permalink }}">
|
|
|
|
<section>
|
|
|
|
{{ if $title }}<h3>{{ else }}<h2>{{ end }}
|
2022-06-14 23:01:19 +02:00
|
|
|
{{ if .Params.events }}
|
|
|
|
{{ index .Params.events 0 }}:
|
2022-06-14 23:21:24 +02:00
|
|
|
{{ else if .Params.recurrent }}
|
|
|
|
{{ if i18n "recurrent"}}
|
|
|
|
{{ i18n "recurrent"}}:
|
|
|
|
{{ else }}
|
|
|
|
{{ "Recurrent"}}:
|
|
|
|
{{ end }}
|
|
|
|
{{ else if .Params.categories }}
|
|
|
|
{{ if in .Params.categories "Buha" }}
|
|
|
|
In eigener Sache:
|
|
|
|
{{ end }}
|
2022-06-14 23:01:19 +02:00
|
|
|
{{ end }}
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ .Title }}
|
|
|
|
{{ if $title }}</h3>{{ else }}</h2>{{ end }}
|
|
|
|
{{ with .Resources.GetMatch $banner }}
|
2022-06-12 17:50:30 +02:00
|
|
|
{{ $good_w := "1920"}}
|
|
|
|
{{ $good_h := "550"}}
|
2022-06-12 18:34:24 +02:00
|
|
|
{{ $b := true }}
|
2022-06-15 13:46:50 +02:00
|
|
|
{{ if or (lt (int .Width) $good_w) (gt (int .Width) $good_w) (lt (int .Height) $good_h) (gt (int .Height) $good_h) }}
|
|
|
|
<div style="margin: 1rem;">
|
|
|
|
Banner not shown, because:<br>
|
|
|
|
{{ if lt (int .Width) $good_w }}
|
|
|
|
{{ $b = false }}
|
|
|
|
{{ if eq hugo.Environment "development" }}
|
|
|
|
Width: {{ .Width }}px: too small, must be {{ $good_w -}}px in width<br>
|
|
|
|
{{ end }}
|
|
|
|
{{ else if gt (int .Width) $good_w }}
|
|
|
|
{{ $b = false }}
|
|
|
|
{{ if eq hugo.Environment "development" }}
|
|
|
|
Width: {{ .Width }}px: too big, must be {{ $good_w -}}px in width<br>
|
|
|
|
{{ end }}
|
2022-06-12 18:34:24 +02:00
|
|
|
{{ end }}
|
2022-06-15 13:46:50 +02:00
|
|
|
{{ if lt (int .Height) $good_h }}
|
|
|
|
{{ $b = false }}
|
|
|
|
{{ if eq hugo.Environment "development" }}
|
|
|
|
Height: {{ .Height }}px: too small, must be {{ $good_h -}}px in height<br>
|
|
|
|
{{ end }}
|
|
|
|
{{ else if gt (int .Height) $good_h }}
|
|
|
|
{{ $b = false }}
|
|
|
|
{{ if eq hugo.Environment "development" }}
|
|
|
|
Height: {{ .Height }}px: too big, must be {{ $good_h -}}px in height<br>
|
|
|
|
{{ end }}
|
2022-06-12 18:34:24 +02:00
|
|
|
{{ end }}
|
2022-06-15 13:46:50 +02:00
|
|
|
</div>
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ end }}
|
2022-06-12 17:50:30 +02:00
|
|
|
<!--<div class="img" style="background-image: url({{ .Permalink }})">
|
|
|
|
</div>-->
|
2022-06-12 18:34:24 +02:00
|
|
|
{{ if eq $b true }}
|
2022-06-15 02:08:16 +02:00
|
|
|
<img src="{{ .Permalink }}" alt="Banner Image." />
|
2022-06-12 18:34:24 +02:00
|
|
|
{{ end }}
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ end }}
|
2022-06-14 23:01:19 +02:00
|
|
|
{{ partial "snippets/article_metadata" $metas }}
|
2022-06-08 04:42:32 +02:00
|
|
|
<div class="text">
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ if .Description }}
|
2022-06-08 04:56:35 +02:00
|
|
|
<p>{{ .Description }}</p>
|
2022-06-15 11:11:43 +02:00
|
|
|
{{ else if .Content }}
|
|
|
|
{{ $summary := "" }}
|
|
|
|
{{ if in .RawContent "<!--more-->" }}
|
|
|
|
{{ $tmp := split .RawContent "<!--more-->" }}
|
|
|
|
{{ index $tmp 0 | markdownify }}
|
2022-06-08 04:56:35 +02:00
|
|
|
{{ else }}
|
2022-06-15 11:11:43 +02:00
|
|
|
{{ if hasPrefix .Summary "<p>" }}
|
|
|
|
{{ .Summary }}
|
|
|
|
{{ else }}
|
|
|
|
<p>{{ .Summary }} </p>
|
|
|
|
{{ end }}
|
2022-06-08 04:56:35 +02:00
|
|
|
{{ end }}
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ else if $image }}
|
|
|
|
{{ $i := (.Resources.GetMatch $image).Permalink }}
|
2022-06-12 23:48:26 +02:00
|
|
|
<img src="{{ $i }}" />
|
2022-06-07 20:15:31 +02:00
|
|
|
{{ end }}
|
2022-06-08 04:42:32 +02:00
|
|
|
</div>
|
2022-06-08 00:38:13 +02:00
|
|
|
</section>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2022-06-07 13:36:28 +02:00
|
|
|
|
2022-06-08 00:38:13 +02:00
|
|
|
{{ if .paginate }}
|
|
|
|
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
|
|
|
|
{{ end }}
|
2022-06-07 13:36:28 +02:00
|
|
|
</div>
|
|
|
|
{{ end }}
|