aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/index/announcements.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/index/announcements.html')
-rw-r--r--layouts/partials/index/announcements.html30
1 files changed, 27 insertions, 3 deletions
diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html
index 25a1719..e33c262 100644
--- a/layouts/partials/index/announcements.html
+++ b/layouts/partials/index/announcements.html
@@ -1,9 +1,32 @@
{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}
{{ $active := where $incidents "Params.resolved" "=" false }}
+{{ $activeIncidents := where $incidents "Params.informational" "=" false }}
+{{ $pinned := where $incidents "Params.pin" "=" true }}
-{{ if $active }}
+{{ if or ($activeIncidents) ($pinned) }}
<div class="announcement-box" style="border-bottom: 0">
- {{ range $active }}
+ {{ range $activeIncidents }}
+ <div class="padding">
+ <p>
+ <a href="{{ .RelPermalink }}"><strong class="bold">{{ .Title }} →</strong></a>
+ </p>
+
+ <p><small>
+ {{ range .Params.Affected }}
+
+ <a href="{{ printf "/affected/%s/" (. | urlize) | relURL }}" class="tag no-underline">{{ . }}</a>
+
+ {{ end }}
+ </small></p>
+
+ {{ .Content | safeHTML | truncate 500 "…" }} <a href="{{ .RelPermalink }}"><b>→</b></a>
+ <p></p>
+ </div>
+ <hr class="clean announcement-box">
+ {{ end }}
+
+ {{ range $pinned }}
+ {{ if .Params.informational }}
<div class="padding">
<p>
<a href="{{ .RelPermalink }}"><strong class="bold">{{ .Title }} →</strong></a>
@@ -21,6 +44,7 @@
<p></p>
</div>
<hr class="clean announcement-box">
+ {{ end }}
{{ end }}
</div>
-{{ end }} \ No newline at end of file
+{{ end }}