grim/www.imfreedom.org

Add a minutes section template.

2019-06-18, Elliott Sales de Andrade
04a9879d915d
Parents d08b06f5fa83
Children b051590c373a
Add a minutes section template.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/minutes-list.html Tue Jun 18 00:52:31 2019 -0400
@@ -0,0 +1,37 @@
+<table>
+ {{ range .Pages }}
+ {{ $transcript := .Site.GetPage (path.Join "transcripts" .File.BaseFileName) }}
+ <tr>
+ <td>{{ .Date.Format "2006-01-02" }}</td>
+ <td>
+ <a href="{{ .Permalink }}">minutes</a>
+ </td>
+ <td>
+ {{ with $transcript }}
+ <div>
+ <a href="{{ .Permalink }}">transcript</a>
+ </div>
+ {{ end }}
+ {{ range .Param "audio" }}
+ <div>
+ <a href="{{ . }}" target="_blank">
+ audio ({{ path.Ext . }})
+ <i class="fas fa-external-link-alt fa-sm"></i>
+ </a>
+ </div>
+ {{ end }}
+ {{ range .Param "videos" }}
+ <div>
+ <a href="{{ . }}" target="_blank">
+ video ({{ path.Ext . }})
+ <i class="fas fa-external-link-alt fa-sm"></i>
+ </a>
+ </div>
+ {{ end }}
+ {{ if and (not $transcript) (not (.Param "audio")) (not (.Param "videos")) }}
+ <div>no transcript or recordings</div>
+ {{ end }}
+ </td>
+ </tr>
+ {{ end }}
+</table>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/section/minutes.html Tue Jun 18 00:52:31 2019 -0400
@@ -0,0 +1,5 @@
+{{ define "main" }}
+ {{ .Content }}
+
+ {{ partial "minutes-list.html" . }}
+{{ end }}