27 lines
1.4 KiB
HTML
27 lines
1.4 KiB
HTML
{{- $r := "" -}}
|
|
{{- $tba := .Params.tba -}}
|
|
{{- with .Params.poster }}{{ if not $tba }}{{ $r = resources.Get (strings.TrimPrefix "/" .) }}{{ end }}{{ end -}}
|
|
{{- $title := .Title | default "Neue Show" -}}
|
|
<article class="flyer{{ if $tba }} flyer--tba{{ else if not $r }} flyer--blank{{ end }}">
|
|
{{- if $tba }}
|
|
<div class="flyer__poster tba" aria-hidden="true">
|
|
<svg class="tba__bolt" viewBox="0 0 64 64" focusable="false"><path d="M30 6h18L36 28h12L28 58l6-24H20z"/></svg>
|
|
<span class="tba__big">TBA</span>
|
|
<span class="tba__band"><span>To be announced soon</span></span>
|
|
</div>
|
|
{{- else 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>{{ else }}{{ if $tba }}<p>Ort folgt</p>{{ end }}{{ end }}
|
|
</div>
|
|
</article>
|