7
0
Fork 0

Toevoegen van announcements

This commit is contained in:
Michael Boelen 2023-06-27 10:33:26 +02:00
parent a303e6ddc4
commit 2d23a52eb5
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,26 @@
id: cfp-is-open
date_start: 2023-05-01
date_end: 2023-08-01
status:
- language: en
message: "Our CFP is active!"
links:
- id: 0
name: Event details
- id: 1
name: CFP portal
link_external: https://cfp.nluug.nl/
- id: 2
name: CFP tips
- language: nl
message: "Onze CFP is geopend!"
links:
- id: 0
name: Evenement
link: "evenementen/nluug/najaarsconferentie-2023/index.md"
- id: 1
name: Portaal
link_external: https://cfp.nluug.nl/
- id: 2
name: Tips
link: "evenementen/nluug/cfp/index.md"

View file

@ -5,6 +5,7 @@
<!-- Accessibility: skip-link voor mobiele apparaten -->
<a class="skip-link" href="#main">Ga naar hoofd</a>
<main id="main">
{{ partial "announcements.html" . }}
{{ partialCached "header.html" . }}
{{ partial "breadcrumb.html" . }}
<div class="content">

View file

@ -0,0 +1,23 @@
{{ $context := . }}
{{ range $.Site.Data.announcements }}
{{ $date_end := .date_end | time }}
{{ $date_start := .date_start | time }}
{{ if and
(ge now $date_start)
(le now $date_end)
}}
<div class="max-width ta-r">
{{ range $index,$key := .status }}
{{ if eq $.Site.Language.Lang .language }}
<span class="darkgreen bold">{{ .message }}</span>
{{ range .links }}
<small>
{{ if .link }}[<a href="{{ relref $context .link }}">{{ .name }}</a>]{{ end }}
{{ if .link_external }}[<a href="{{ .link_external }}" rel="nofollow noopener">{{ .name }}</a>]{{ end }}
</small>
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}