Files
alphabreed/hugo/layouts/gameplays/list.html
2026-02-19 18:37:05 +01:00

47 lines
1.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{ define "title" }}{{ .Params.fullname }}, Folge 1 :: {{ .Site.Title }}{{ end }}
{{ define "main" }}
{{ $episodes := .Params.episodes }}
{{ $episodeCount := len $episodes }}
{{ $firstEpisode := index $episodes 0 }}
{{ $gameplayPage := . }}
<nav class="submenu box">
<h2>Bereiche:</h2>
<ul>
{{ range .Parent.Pages }}
{{ if .Eq $gameplayPage }}
<li class="active">
{{ else }}
<li>
{{ end }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</nav>
<h1>{{ .Params.fullname }}</h1>
{{ if $firstEpisode.title }}
<h2>{{ $firstEpisode.title }}</h2>
{{ end }}
{{ if $firstEpisode.description }}
<p>{{ $firstEpisode.description }}</p>
{{ end }}
<p><video src="{{ $firstEpisode.video }}" type="video/mp4" playsinline controls style="width:100%; aspect-ratio:16 / 9; display:block;"></video></p>
{{ if gt $episodeCount 1 }}
<div class="box videos">
{{ range $index, $episode := $episodes }}
{{ $episodeNum := math.Add $index 1 }}
{{ if eq $index 0 }}
<div class="active">
<a href="./">Folge 01 {{ $episode.title }}</a>
</div>
{{ else }}
<div>
<a href="{{ $episodeNum }}/">Folge {{ printf "%02d" $episodeNum }} {{ $episode.title }}</a>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ .Content }}
{{ end }}