aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/index/incidents-monthly.html
diff options
context:
space:
mode:
authorMantas Vilčinskas <11616378+mistermantas@users.noreply.github.com>2019-12-21 21:25:21 +0200
committerGitHub <noreply@github.com>2019-12-21 21:25:21 +0200
commita8f60c31b75fe5a3c91a6595585738523f1cad25 (patch)
tree7528a3042e37765e286c9490f5b321e6799acb41 /layouts/partials/index/incidents-monthly.html
parent96394ffb854ec6b8f17aa1ef105eb9ff92e5e676 (diff)
parent12e885ad58d44d55603a64906d1dcf7f1d961b4c (diff)
cState v4.0 Final (#82)
cState v4.0 Final
Diffstat (limited to 'layouts/partials/index/incidents-monthly.html')
-rw-r--r--layouts/partials/index/incidents-monthly.html29
1 files changed, 29 insertions, 0 deletions
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") }}
+ <div class="padding"></div>
+ <hr>
+ <p class="center" id="archive-{{ range first 1 .Pages }}{{ .Date.Format "2006" }}{{ end }}-{{ .Key }}"><a href="#archive-{{ range first 1 .Pages }}{{ .Date.Format "2006" }}{{ end }}-{{ .Key }}" class="no-underline">
+ <b>
+ <!-- Hugo requires a '0' in the month
+ which is why this check exists -->
+ {{ 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 }}
+ </b><small class="faded">({{ len .Pages }})</small>
+ </a></p>
+ <hr>
+
+ {{ range .Pages }}
+ {{ .Render "small" }}
+ {{ end }}
+{{ end }}