From 56f6b868a508ed6ce37afbbe46449ea7b6044ad1 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 2 Oct 2021 21:38:12 +0300 Subject: #205 - add pinned informational posts --- layouts/partials/index/announcements.html | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html index 25a1719..01b353d 100644 --- a/layouts/partials/index/announcements.html +++ b/layouts/partials/index/announcements.html @@ -1,7 +1,8 @@ {{ $incidents := where .Site.RegularPages "Params.section" "issue" }} {{ $active := where $incidents "Params.resolved" "=" false }} +{{ $pinned := where $incidents "Params.pin" "=" true }} -{{ if $active }} +{{ if or ($active) ($pinned) }}
{{ range $active }}
@@ -17,10 +18,30 @@ {{ end }}

- {{ .Content | safeHTML | truncate 500 "…" }} + {{ .Content | safeHTML | truncate 500 "…" }} +

+
+
+ {{ end }} + + {{ range $pinned }} +
+

+ {{ .Title }} → +

+ +

+ {{ range .Params.Affected }} + + {{ . }} + + {{ end }} +

+ + {{ .Content | safeHTML | truncate 500 "…" }}


{{ end }}
-{{ end }} \ No newline at end of file +{{ end }} -- cgit v1.2.3-70-g09d2