ajout d'un toggle pour désactiver le bandeau du haut de la page

This commit is contained in:
antonin gallon 2026-01-27 16:11:17 +01:00
parent c5ae72945d
commit f771bb3f24
95 changed files with 22574 additions and 1 deletions

View file

@ -7,16 +7,31 @@ tabs:
columns:
- width: 1/1
fields:
infoBannerHeading:
type: headline
label: Bannière d'infos
infoBannerEnabled:
label: Afficher la bannière d'infos
type: toggle
text:
- Non
- Oui
default: false
infoBannerColor:
label: Couleur de fond
extends: fields/color
when:
infoBannerEnabled: true
infoBanner:
label: Messages
type: structure
help: Affichée en haut de la page d'accueil.
when:
infoBannerEnabled: true
fields:
message:
label: Message
@ -29,8 +44,12 @@ tabs:
options:
- url
- page
separator1:
type: line
when:
infoBannerEnabled: true
- width: 1/1
fields:
heroHeadline:

View file

@ -46,7 +46,8 @@
</style>
</head>
<body data-template="<?= $page->template() ?>">
<?php if ($page->isHomePage()): ?>
<?php if ($page->isHomePage() && $site->infoBannerEnabled()->toBool()): ?>
<?php snippet('info-banner') ?>
<?php endif ?>
<?php snippet('nav') ?>