forked from laurens/fediversity_website
Toevoegen van announcements
This commit is contained in:
parent
a303e6ddc4
commit
2d23a52eb5
26
data/announcements/cfp-is-open.yaml
Normal file
26
data/announcements/cfp-is-open.yaml
Normal 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"
|
|
@ -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">
|
||||
|
|
23
themes/nluug/layouts/partials/announcements.html
Normal file
23
themes/nluug/layouts/partials/announcements.html
Normal 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 }}
|
Reference in a new issue