tracks can be edited! + major template overhaul

This commit is contained in:
ari melody 2024-08-31 15:25:44 +01:00
parent 99b6a21179
commit 63122eb428
Signed by: ari
GPG key ID: CF99829C92678188
21 changed files with 674 additions and 221 deletions

View file

@ -1,5 +1,5 @@
{{define "head"}}
<title>admin - ari melody 💫</title>
<title>Admin - ari melody 💫</title>
<link rel="shortcut icon" href="/img/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/admin/static/index.css">
{{end}}
@ -12,28 +12,8 @@
<a href="/admin/createrelease" class="create-btn" id="create-release">Create New</a>
</div>
<div class="card releases">
{{range $Release := .Releases}}
<div class="release">
<div class="release-artwork">
<img src="{{$Release.Artwork}}" alt="" width="128" loading="lazy">
</div>
<div class="release-info">
<h3 class="release-title">
{{$Release.Title}}
<small>
{{$Release.GetReleaseYear}}
{{if not $Release.Visible}}(hidden){{end}}
</small>
</h3>
<p class="release-artists">{{$Release.PrintArtists true true}}</p>
<p class="release-type-single">{{$Release.ReleaseType}}
({{len $Release.Tracks}} track{{if not (eq (len $Release.Tracks) 1)}}s{{end}})</p>
<div class="release-actions">
<a href="/admin/release/{{$Release.ID}}">Edit</a>
<a href="/music/{{$Release.ID}}" target="_blank">Gateway</a>
</div>
</div>
</div>
{{range .Releases}}
{{block "release" .}}{{end}}
{{end}}
{{if not .Releases}}
<p>There are no releases.</p>
@ -66,14 +46,13 @@
{{range $Track := .Tracks}}
<div class="track">
<h2 class="track-title">
{{$Track.Title}}
<a href="/admin/track/{{$Track.ID}}">{{$Track.Title}}</a>
{{if $Track.Release}}
<small class="track-album">{{$Track.Release.Title}}</small>
{{else}}
<small class="track-album empty">(no release)</small>
{{end}}
</h2>
<p class="track-id">{{$Track.ID}}</p>
{{if $Track.Description}}
<p class="track-description">{{$Track.Description}}</p>
{{else}}