1 parent
06fa91c6f6
commit
2a2dc030b7
5 files changed
+76
-12
No files matched your search
@@ -1,18 +1,26 @@
|
||||
{{- $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)) }}
|
||||
{{- $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>
|
||||
<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 }}
|
||||
<h3>{{ $title }}</h3>
|
||||
{{ with .Params.location }}<p>{{ . }}</p>{{ else }}{{ if $tba }}<p>Ort folgt</p>{{ end }}{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
Reference in new issue
Block a user