Browse Source

Split player template from playlist

main
Matt Baer 4 years ago
parent
commit
de090b9b8f
2 changed files with 6 additions and 0 deletions
  1. +3
    -0
      templates.go
  2. +3
    -0
      templates/parts.tmpl

+ 3
- 0
templates.go View File

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

{{define "full-player"}}
{{template "player" .}}
{{template "playlist" .}}
{{template "playlist-js"}}
{{end}}



+ 3
- 0
templates/parts.tmpl View File

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

{{define "full-player"}}
{{template "player" .}}
{{template "playlist" .}}
{{template "playlist-js"}}
{{end}}



Loading…
Cancel
Save