1
0
mirror of https://github.com/thebaer/cdr.git synced 2024-11-15 01:31:01 +00:00
cdr/mixtape.tmpl
Matt Baer 177f73cb49 Support additional track info in playlist
This allows the user-defined mixtape.tmpl to define track notes for each
individual track. By default, it only shows notes for the
currently-playing track.
2020-02-29 11:25:46 -05:00

44 lines
769 B
Cheetah

{{define "mixtape"}}
<html>
<head>
<title>Mixtape</title>
<style type="text/css">
body {
font-size: 1.2em;
margin: 1em;
}
#playlist {
list-style: decimal-leading-zero;
margin: 1em 0;
}
#playlist li {
margin: 0.5em 0;
}
li p {
display: none;
font-style: italic;
}
li.active a {
font-weight: bold;
}
li.active p {
display: block;
}
</style>
</head>
<body>
{{template "full-player" .Tracks}}
</body>
</html>
{{end}}
{{define "track-info"}}
{{if eq .Num 1}}
<p>[Here I might introduce this mix.]</p>
<p>[Some notes about track 1.]</p>
{{else if eq .Num 2}}
<p>[Some notes about track 2.]</p>
{{else if eq .Num 5}}
<p>[Some notes about track 5.]</p>
{{end}}
{{end}}