refactor: move music admin to /admin/music; keep /admin generic
This commit is contained in:
parent
ddbf3444eb
commit
bd2dc806d5
31 changed files with 1079 additions and 906 deletions
|
@ -6,65 +6,19 @@
|
|||
|
||||
{{define "content"}}
|
||||
<main>
|
||||
|
||||
<h1>Admin Dashboard</h1>
|
||||
<div class="card-title">
|
||||
<h1>Releases</h1>
|
||||
<a class="button new" id="create-release">Create New</a>
|
||||
<h2>Music</h2>
|
||||
<a class="button" href="/admin/music/">Browse All</a>
|
||||
</div>
|
||||
<div class="card releases">
|
||||
{{range .Releases}}
|
||||
{{block "release" .}}{{end}}
|
||||
{{end}}
|
||||
{{if not .Releases}}
|
||||
<div class="card" id="music">
|
||||
{{if .LatestRelease}}
|
||||
<h3>Latest Release</h3>
|
||||
{{block "release" .LatestRelease}}{{end}}
|
||||
{{else}}
|
||||
<p>There are no releases.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="card-title">
|
||||
<h1>Artists</h1>
|
||||
<a class="button new" id="create-artist">Create New</a>
|
||||
</div>
|
||||
<div class="card artists">
|
||||
{{range $Artist := .Artists}}
|
||||
<div class="artist">
|
||||
<img src="{{$Artist.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar">
|
||||
<a href="/admin/artist/{{$Artist.ID}}" class="artist-name">{{$Artist.Name}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .Artists}}
|
||||
<p>There are no artists.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="card-title">
|
||||
<h1>Tracks</h1>
|
||||
<a class="button new" id="create-track">Create New</a>
|
||||
</div>
|
||||
<div class="card tracks">
|
||||
<p><em>"Orphaned" tracks that have not yet been bound to a release.</em></p>
|
||||
<br>
|
||||
{{range $Track := .Tracks}}
|
||||
<div class="track">
|
||||
<h2 class="track-title">
|
||||
<a href="/admin/track/{{$Track.ID}}">{{$Track.Title}}</a>
|
||||
</h2>
|
||||
{{if $Track.Description}}
|
||||
<p class="track-description">{{$Track.GetDescriptionHTML}}</p>
|
||||
{{else}}
|
||||
<p class="track-description empty">No description provided.</p>
|
||||
{{end}}
|
||||
{{if $Track.Lyrics}}
|
||||
<p class="track-lyrics">{{$Track.GetLyricsHTML}}</p>
|
||||
{{else}}
|
||||
<p class="track-lyrics empty">There are no lyrics.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .Artists}}
|
||||
<p>There are no artists.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<script type="module" src="/admin/static/admin.js"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue