improve callout

This commit is contained in:
isUnknown 2024-11-04 17:32:12 +01:00
parent 83c51cc39e
commit f9016d703e
4 changed files with 12 additions and 8 deletions

View file

@ -7,6 +7,10 @@ section.callout {
text-align: center;
}
section.callout a {
display: inline-flex;
}
section.callout .ticket-link {
margin-top: calc(var(--padding-vertical) / 2);
}

View file

@ -1227,6 +1227,10 @@ section.callout {
text-align: center;
}
section.callout a {
display: inline-flex;
}
section.callout .ticket-link {
margin-top: calc(var(--padding-vertical) / 2);
}

View file

@ -16,10 +16,6 @@ fields:
extends: fields/color
width: 1/2
ticket:
label: Bouton de réservation
type: toggle
label: Lien de réservation
type: url
width: 1/3
help: Affiche le bouton ticket lié à la billetterie.
text:
false: affiché
true: masqué

View file

@ -1,8 +1,8 @@
<?php foreach($site->callout()->toStructure() as $callout): ?>
<section class="callout" style="--color: <?= $callout->color() ?>;">
<?= $callout->text() ?>
<?php if ($callout->ticket() == 'true'): ?>
<a class="ticket-link" href="<?= option('ticketingUrl') ?>" target="_blank" title="Aller à la billetterie"><?php snippet('ticket') ?> Billetterie</a>
<?php if ($callout->ticket()->isNotEmpty()): ?>
<a class="ticket-link" href="<?= $callout->ticket() ?>" target="_blank" title="Aller à la billetterie"><?php snippet('ticket') ?> Billetterie</a>
<?php endif ?>
</section>
<?php endforeach ?>