Spostato la configurazione dell'avviso da config in data
All checks were successful
Linting markdown on PR / unicode-check (pull_request) Successful in 1m1s

This commit is contained in:
amreo 2024-09-09 00:55:30 +02:00
parent ca6242a573
commit b290578291
4 changed files with 17 additions and 11 deletions

View File

@ -12,8 +12,6 @@ timeout: 1800s
enableRobotsTXT: true enableRobotsTXT: true
params: params:
description: Bergamo Linux Users Group description: Bergamo Linux Users Group
enableImportantWarning: false
importantWarningLink: dove-siamo
social: social:
- title: Mattermost - title: Mattermost
icon: fa-comments icon: fa-comments
@ -62,8 +60,6 @@ languages:
languageCode: it-IT languageCode: it-IT
languageDirection: ltr languageDirection: ltr
languageName: Italiano languageName: Italiano
params:
importantWarningMessage: "Il BGLUG è chiuso il 10 ottobre"
permalinks: permalinks:
page: page:
posts: /posts/:year/:month/:slug/ posts: /posts/:year/:month/:slug/
@ -131,8 +127,6 @@ languages:
languageCode: en-US languageCode: en-US
languageDirection: ltr languageDirection: ltr
languageName: English languageName: English
params:
importantWarningMessage: "BGLUG is closed il 11 ottobre"
permalinks: permalinks:
page: page:
posts: /posts/:year/:month/:slug/ posts: /posts/:year/:month/:slug/

View File

@ -1,4 +1,8 @@
--- ---
importantWarning:
enabled: true
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: true
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

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