add playlist concept

This commit is contained in:
sakrecoer 2026-08-16 23:09:07 +02:00
parent 4df2e1fa37
commit 4f6779e968
3 changed files with 363 additions and 183 deletions

View file

@ -1,6 +1,76 @@
{{ define "header" }}
{{ $displayName := "" }}
{{ $name := "" }}
{{ $picture := "" }}
{{ $banner := "" }}
{{ $about := "" }}
{{ $website := "" }}
{{ $nip05 := "" }}
{{ $lud16 := "" }}
{{ range hugo.Data.profile }}
{{ range . }}
{{ range .tags }}
{{ if eq (index . 0) "display_name" }}
{{ $displayName = index . 1 }}
{{ else if eq (index . 0) "name" }}
{{ $name = index . 1 }}
{{ else if eq (index . 0) "picture" }}
{{ $picture = index . 1 }}
{{ else if eq (index . 0) "banner" }}
{{ $banner = index . 1 }}
{{ else if eq (index . 0) "about" }}
{{ $about = index . 1 }}
{{ else if eq (index . 0) "website" }}
{{ $website = index . 1 }}
{{ else if eq (index . 0) "nip05" }}
{{ $nip05 = index . 1 }}
{{ else if eq (index . 0) "lud16" }}
{{ $lud16 = index . 1 }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
<!-- If display_name is empty, use name -->
{{ if not $displayName }}
{{ $displayName = $name }}
{{ end }}
<!-- Main Header -->
<header class="playlist-header" style="min-height: unset;max-height:25vh;">
<!-- Background image -->
{{ if $banner }}
<div id="bannerino" style="background-image:url('{{ $banner }}');"></div>
<!-- Dark overlay for readability -->
<div id="texture"></div>
{{ end }}
<!-- Decorative '>' -->
<div></div>
<div class="header-content">
<div class="header-profile">
{{ if $picture }}
<a href="/" alt="home page"><img src="{{ $picture }}" alt="{{ $displayName }}'s profile picture'" class="profile-picture" loading="lazy"></a>
{{ end }}
</div>
</div>
</header>
{{ end }}
{{ define "main" }}
<section class="section playlists-list">
<h1>Playlists</h1>
<h2>Playlists</h2>
<p class="section-description">Explore all my curated playlists from the Nostr network</p>
<div class="playlists-grid">
@ -27,11 +97,11 @@
</div>
<div class="playlist-hover-overlay">
<span class="playlist-view-btn">View Playlist</span>
<span class="playlist-view-btn">Listen</span>
</div>
</a>
</div>
{{ end }}
</div>
</section>
{{ end }}
{{ end }}