19 lines
901 B
HTML
19 lines
901 B
HTML
{{- $r := "" -}}
|
|
{{- with .Params.poster }}{{ $r = resources.Get (strings.TrimPrefix "/" .) }}{{ end -}}
|
|
<article class="flyer{{ if not $r }} flyer--blank{{ end }}">
|
|
{{- if $r }}
|
|
<a class="flyer__poster" href="{{ .Params.poster }}" target="_blank" rel="noopener" aria-label="Plakat {{ .Title }} in voller Größe öffnen">
|
|
{{ partial "img.html" (dict "src" .Params.poster "alt" (printf "Plakat: %s" .Title) "sizes" "(min-width: 900px) 280px, 45vw" "widths" (slice 320 640)) }}
|
|
</a>
|
|
{{- else }}
|
|
<div class="flyer__poster flyer__poster--type" aria-hidden="true">
|
|
<span>{{ .Title }}</span>
|
|
</div>
|
|
{{- end }}
|
|
<div class="flyer__caption">
|
|
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date | time.Format "2. January 2006" }}</time>
|
|
<h3>{{ .Title }}</h3>
|
|
{{ with .Params.location }}<p>{{ . }}</p>{{ end }}
|
|
</div>
|
|
</article>
|