aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/index
diff options
context:
space:
mode:
authorMantas Vilčinskas <hi@mnts.lt>2021-10-10 16:48:20 +0300
committerGitHub <noreply@github.com>2021-10-10 16:48:20 +0300
commit6b8f7c09adf6bfc19741c10f8b7bb1982c24419b (patch)
tree582e15b78dd994537d24d6fbdd3e850f3dbb49a8 /layouts/partials/index
parented34380788a977f7a7519d37ed064a9eaeb79ff6 (diff)
fix bug so same post doesn't show up twice
Diffstat (limited to 'layouts/partials/index')
-rw-r--r--layouts/partials/index/announcements.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html
index 5f425fc..e33c262 100644
--- a/layouts/partials/index/announcements.html
+++ b/layouts/partials/index/announcements.html
@@ -1,10 +1,11 @@
{{ $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 or ($active) ($pinned) }}
+{{ 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>
@@ -39,7 +40,7 @@
{{ end }}
</small></p>
- {{ .Content | safeHTML | truncate 500 "…" }} <a href="{{ .RelPermalink }}"><b>→</b></a>
+ {{ .Content | safeHTML | truncate 500 "…" }}
<p></p>
</div>
<hr class="clean announcement-box">