Aggiunto banner di avviso importante (#210)

Risolve BgLUG/bglug.it#208

Co-authored-by: amreo <amreo0x+github@protonmail.com>
Reviewed-on: BgLUG/bglug.it#210
Reviewed-by: Paolo Asperti <paspo@noreply.libreschool.org>
Co-authored-by: amreo <amreo@noreply.libreschool.org>
Co-committed-by: amreo <amreo@noreply.libreschool.org>
This commit is contained in:
amreo 2024-09-09 07:22:09 +00:00 committed by Paolo Asperti
parent f97d771ca4
commit 151cb19b28
5 changed files with 20 additions and 3 deletions

View File

@ -10,10 +10,8 @@ copyright: 2024 © Bergamo Linux Users Group
paginate: 20 paginate: 20
timeout: 1800s timeout: 1800s
enableRobotsTXT: true enableRobotsTXT: true
params: params:
description: Bergamo Linux Users Group description: Bergamo Linux Users Group
social: social:
- title: Mattermost - title: Mattermost
icon: fa-comments icon: fa-comments

View File

@ -1,4 +1,8 @@
--- ---
importantWarning:
enabled: false
link: /en/where
message: "BGLUG is closed on 10 october"
banner: banner:
enable: true enable: true
image: homepage_banner.jpg image: homepage_banner.jpg

View File

@ -1,4 +1,8 @@
--- ---
importantWarning:
enabled: false
link: /it/dove-siamo
message: "Il BGLUG è chiuso il 10 ottobre"
banner: banner:
enable: true enable: true
image: homepage_banner.jpg image: homepage_banner.jpg

View File

@ -0,0 +1,9 @@
<div>
{{ with index ( index .Site.Data .Site.Language.Lang | default .Site.Data ) (.Param "homepage_data" | default "homepage") }}
{{ if .importantWarning.enabled}}
<div style="text-align: center; background-color: yellow; font-weight: bold; font-size: xx-large; padding-top: 10px; padding-bottom: 10px;">
<a href="{{ urls.AbsURL .importantWarning.link }}" style="color: blue; text-decoration: underline;">⚠️⚠️⚠️ {{ .importantWarning.message }} ⚠️⚠️⚠️</a>
</div>
{{- end -}}
{{ end }}
</div>

View File

@ -43,3 +43,5 @@
</ul> </ul>
</nav> </nav>
</div> </div>
{{- partial "head/important-warning.html" . }}