From 151cb19b2862927cbdb74fd05a92dd507837dd57 Mon Sep 17 00:00:00 2001 From: amreo Date: Mon, 9 Sep 2024 07:22:09 +0000 Subject: [PATCH] Aggiunto banner di avviso importante (#210) Risolve https://git.libreschool.org/BgLUG/bglug.it/issues/208 Co-authored-by: amreo Reviewed-on: https://git.libreschool.org/BgLUG/bglug.it/pulls/210 Reviewed-by: Paolo Asperti Co-authored-by: amreo Co-committed-by: amreo --- config.yml | 4 +--- data/en/homepage.yml | 4 ++++ data/it/homepage.yml | 4 ++++ layouts/partials/head/important-warning.html | 9 +++++++++ layouts/partials/header.html | 2 ++ 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 layouts/partials/head/important-warning.html diff --git a/config.yml b/config.yml index 606897e..7e1b87d 100644 --- a/config.yml +++ b/config.yml @@ -10,10 +10,8 @@ copyright: 2024 © Bergamo Linux Users Group paginate: 20 timeout: 1800s enableRobotsTXT: true - -params: +params: description: Bergamo Linux Users Group - social: - title: Mattermost icon: fa-comments diff --git a/data/en/homepage.yml b/data/en/homepage.yml index ac1d045..2005d7b 100644 --- a/data/en/homepage.yml +++ b/data/en/homepage.yml @@ -1,4 +1,8 @@ --- +importantWarning: + enabled: false + link: /en/where + message: "BGLUG is closed on 10 october" banner: enable: true image: homepage_banner.jpg diff --git a/data/it/homepage.yml b/data/it/homepage.yml index 93ed582..9d35264 100644 --- a/data/it/homepage.yml +++ b/data/it/homepage.yml @@ -1,4 +1,8 @@ --- +importantWarning: + enabled: false + link: /it/dove-siamo + message: "Il BGLUG è chiuso il 10 ottobre" banner: enable: true image: homepage_banner.jpg diff --git a/layouts/partials/head/important-warning.html b/layouts/partials/head/important-warning.html new file mode 100644 index 0000000..f589a1c --- /dev/null +++ b/layouts/partials/head/important-warning.html @@ -0,0 +1,9 @@ +
+ {{ with index ( index .Site.Data .Site.Language.Lang | default .Site.Data ) (.Param "homepage_data" | default "homepage") }} + {{ if .importantWarning.enabled}} + + {{- end -}} + {{ end }} +
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5194d2a..b160d73 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -43,3 +43,5 @@ + +{{- partial "head/important-warning.html" . }}