From c26beff32d64d4aaf6bcc5d4755ffeaa06ad994f Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 26 Feb 2020 00:02:57 -0500 Subject: [PATCH] Add mixtape templates --- mixtape.tmpl | 27 ++++++++++++++++++++ templates/parts.tmpl | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 mixtape.tmpl create mode 100644 templates/parts.tmpl diff --git a/mixtape.tmpl b/mixtape.tmpl new file mode 100644 index 0000000..415a234 --- /dev/null +++ b/mixtape.tmpl @@ -0,0 +1,27 @@ +{{define "mixtape"}} + + + Mixtape + + + + {{template "full-player" .Tracks}} + + +{{end}} \ No newline at end of file diff --git a/templates/parts.tmpl b/templates/parts.tmpl new file mode 100644 index 0000000..d5a381d --- /dev/null +++ b/templates/parts.tmpl @@ -0,0 +1,60 @@ +{{define "player"}} + {{with $x := index . 0}} + + {{end}} +
    + {{range $i, $el := .}} + + {{$el.Artist}} - {{$el.Title}} + + {{end}} +
+{{end}} + +{{define "full-player"}} + {{template "player" .}} + {{template "playlist-js"}} +{{end}} + +{{define "playlist-js"}} + + +{{end}} \ No newline at end of file