Addedf Releases Site
Deploy Hugo Site / deploy (push) Canceled after 0s

This commit is contained in:
lucashahmann committed 2026-10-19 21:23:17 +02:00
1 parent 09a4754d51
commit 44866d1b87
6 files changed
+118 -64

No files matched your search

+35 -17
View File
@@ -1,37 +1,55 @@
{{ define "main" }}
{{ $releases := partial "releases.html" . }}
{{/* Hervorgehoben wird das neueste Album, ohne Album das neueste Release. */}}
{{ $featured := false }}
{{ with where $releases "kind" "Album" }}{{ $featured = index . 0 }}{{ else }}{{ with $releases }}{{ $featured = index . 0 }}{{ end }}{{ end }}
<header class="page-head wrap">
<h1 class="display display--xl">{{ .Title }}</h1>
{{ with .Content }}<div class="page-head__lead">{{ . }}</div>{{ end }}
</header>
<section class="wrap release">
{{ with .Params.album }}
<div class="release__album">
<p class="release__kind">{{ .kind }}, {{ .year }}</p>
<h2 class="release__title">{{ .title }}</h2>
{{ with .text }}<p class="release__text">{{ . }}</p>{{ end }}
{{ with $featured }}
<section class="wrap album" aria-labelledby="album-title">
<div class="album__sleeve">
<div class="album__vinyl" aria-hidden="true"></div>
<div class="album__cover">
{{ partial "img.html" (dict "res" .cover "alt" (printf "Cover von %s" .title) "sizes" "(min-width: 900px) 30rem, 80vw" "widths" (slice 480 800) "eager" true) }}
</div>
</div>
<div class="album__info">
<p class="album__kind">{{ .kind }}, erschienen am {{ .date | time.Format "2. January 2006" }}</p>
<h2 id="album-title" class="album__title">{{ .title }}</h2>
{{ with $.Params.albumText }}<p class="album__text">{{ . }}</p>{{ end }}
<a class="button button--bolt" href="{{ site.Params.spotify }}" target="_blank" rel="noopener">Auf Spotify hören</a>
</div>
{{ end }}
<div class="release__player">
{{ partial "spotify.html" . }}
</div>
</section>
{{ end }}
{{ with .Params.singles }}
<section class="wrap singles" aria-labelledby="singles">
<h2 id="singles" class="display">Singles</h2>
<ol class="tracklist">
{{ $rest := slice }}
{{ range $releases }}{{ if or (not $featured) (ne .key $featured.key) }}{{ $rest = $rest | append . }}{{ end }}{{ end }}
{{ with $rest }}
<section class="wrap discography" aria-labelledby="diskografie">
<h2 id="diskografie" class="display">Diskografie</h2>
<ol class="covers">
{{ range . }}
<li>
<span class="tracklist__title">{{ .title }}</span>
{{ with .year }}<span class="tracklist__year">{{ . }}</span>{{ end }}
<li class="cover">
<div class="cover__img">
{{ partial "img.html" (dict "res" .cover "alt" (printf "Cover von %s" .title) "sizes" "(min-width: 900px) 22rem, 45vw" "widths" (slice 400 800)) }}
</div>
<h3 class="cover__title">{{ .title }}</h3>
<p class="cover__meta">{{ .kind }}, <time datetime="{{ .date.Format "2006-01-02" }}">{{ .date | time.Format "2. January 2006" }}</time></p>
</li>
{{ end }}
</ol>
</section>
{{ end }}
<section class="wrap listen" aria-labelledby="reinhoeren">
<h2 id="reinhoeren" class="display">Reinhören</h2>
{{ partial "spotify.html" . }}
</section>
<section class="wrap elsewhere" aria-labelledby="elsewhere">
<h2 id="elsewhere" class="display">Mehr von uns</h2>
<ul class="elsewhere__list">