From 19d5be70f84c21011869b6c8340a0589f353beb8 Mon Sep 17 00:00:00 2001 From: Mantas VilĨinskas Date: Sat, 5 Oct 2019 19:43:56 +0300 Subject: Added API for index, fully added #43 with tweaks to yrly archive --- layouts/partials/index/incidents-monthly.html | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 layouts/partials/index/incidents-monthly.html (limited to 'layouts/partials/index/incidents-monthly.html') diff --git a/layouts/partials/index/incidents-monthly.html b/layouts/partials/index/incidents-monthly.html new file mode 100644 index 0000000..263bc52 --- /dev/null +++ b/layouts/partials/index/incidents-monthly.html @@ -0,0 +1,29 @@ +{{ $incidents := where .Site.RegularPages "Params.section" "issue" }} + + + +{{ range ($incidents.GroupByDate "1") }} +
+
+

+ + + {{ if gt .Key 9 }} + {{ $month := printf "2006-%s-02" .Key }} + {{ $monthDate := $month | time }} + {{ $monthDate.Format "January" }} + {{ else }} + {{ $month := printf "2006-0%s-02" .Key }} + {{ $monthDate := $month | time }} + {{ $monthDate.Format "January" }} + {{ end }} + {{ range first 1 .Pages }}{{ .Date.Format "2006" }}{{ end }} + ({{ len .Pages }}) +

+
+ + {{ range .Pages }} + {{ .Render "small" }} + {{ end }} +{{ end }} -- cgit v1.2.3-70-g09d2