feat: add album handler

Serves a page including the album name, artist, track list, and credits.
Each of the tracks have links to the lyrics page, provided there is one
available.
This commit is contained in:
Jackson Taylor
2023-06-30 12:27:31 -04:00
parent ab19250c66
commit 273176a57c
4 changed files with 185 additions and 0 deletions

35
views/album.tmpl Normal file
View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title>{{.Artist}} - {{.Name}}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="/static/style.css" />
<script type="text/javascript" src="/static/script.js" defer></script>
</head>
<body>
{{template "navbar"}}
<div id="container">
<div id="metadata">
<img src="{{extractURL .Image}}"/>
<h2>{{.Artist}}</h2>
<h1>{{.Name}}</h1>
</div>
<div id="album-tracklist">
{{range .Tracks}}
<a href="{{.Url}}">
<p>{{.Title}}</p>
</a>
{{end}}
</div>
<div id="info">
<div id="about">
<h1 id="title">About</h1>
<p class="hidden" id="full_about">{{index .About 0}}</p>
<p id="summary">{{index .About 1}}</p>
</div>
</div>
</div>
{{template "footer"}}
</body>
</html>