1
0
mirror of https://github.com/thebaer/cdr.git synced 2024-11-15 01:31:01 +00:00

Split player template from playlist

This commit is contained in:
Matt Baer 2020-02-29 11:18:38 -05:00
parent bcd4094f09
commit de090b9b8f
2 changed files with 6 additions and 0 deletions

View File

@ -50,6 +50,8 @@ var files = map[string]string{
<source src="{{$x.Filename}}"> <source src="{{$x.Filename}}">
</audio> </audio>
{{end}} {{end}}
{{end}}
{{define "playlist"}}
<ol id="playlist"> <ol id="playlist">
{{range $i, $el := .}} {{range $i, $el := .}}
<li{{if eq $i 0}} class="active"{{end}}> <li{{if eq $i 0}} class="active"{{end}}>
@ -61,6 +63,7 @@ var files = map[string]string{
{{define "full-player"}} {{define "full-player"}}
{{template "player" .}} {{template "player" .}}
{{template "playlist" .}}
{{template "playlist-js"}} {{template "playlist-js"}}
{{end}} {{end}}

View File

@ -4,6 +4,8 @@
<source src="{{$x.Filename}}"> <source src="{{$x.Filename}}">
</audio> </audio>
{{end}} {{end}}
{{end}}
{{define "playlist"}}
<ol id="playlist"> <ol id="playlist">
{{range $i, $el := .}} {{range $i, $el := .}}
<li{{if eq $i 0}} class="active"{{end}}> <li{{if eq $i 0}} class="active"{{end}}>
@ -15,6 +17,7 @@
{{define "full-player"}} {{define "full-player"}}
{{template "player" .}} {{template "player" .}}
{{template "playlist" .}}
{{template "playlist-js"}} {{template "playlist-js"}}
{{end}} {{end}}