diff options
Diffstat (limited to 'templates/topics.html')
-rw-r--r-- | templates/topics.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/templates/topics.html b/templates/topics.html new file mode 100644 index 0000000..5c3667f --- /dev/null +++ b/templates/topics.html @@ -0,0 +1,13 @@ +{{ define "topics" }} +{{ $categoryCount := len .Papers.List }} +{{ if gt $categoryCount 0 }} + <p>Topics: + {{ $first := true -}} + {{- range $category, $paper := .Papers.List -}} + {{- if $first -}}{{- $first = false -}}{{- else -}}, {{ end -}} + <a href="#{{ $category }}">{{ $category }}</a> + {{- end -}}.</p> +{{ else }} + <p>nothing here yet.</p> +{{ end }} +{{ end }} |