From e5e8cad6caf1a1568365360eb7701e3d14a56336 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 4 Nov 2024 14:53:28 +0100 Subject: [PATCH] callout : enable multiple callout. Turn fields into structured field. #15 --- site/blueprints/fields/callout.yml | 41 +++++++++++++++++------------- site/snippets/callout.php | 14 +++++----- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/site/blueprints/fields/callout.yml b/site/blueprints/fields/callout.yml index ca76eab..bdf08ef 100644 --- a/site/blueprints/fields/callout.yml +++ b/site/blueprints/fields/callout.yml @@ -1,20 +1,25 @@ type: group fields: - calloutHeadline: - type: headline - label: Brève - calloutText: - label: Texte - type: writer - width: 1/3 - calloutTicket: - label: Bouton de réservation - type: toggle - width: 1/6 - text: - false: affiché - true: masqué - calloutColor: - label: Couleur de fond - extends: fields/color - width: 1/2 + callout: + label: Brève(s) + type: structure + fields: + headline: + type: headline + label: Brève + text: + label: Texte + type: writer + width: 1/2 + color: + label: Couleur de fond + extends: fields/color + width: 1/2 + ticket: + label: Bouton de réservation + type: toggle + width: 1/3 + help: Affiche le bouton ticket lié à la billetterie. + text: + false: affiché + true: masqué diff --git a/site/snippets/callout.php b/site/snippets/callout.php index d8419a6..7639561 100644 --- a/site/snippets/callout.php +++ b/site/snippets/callout.php @@ -1,6 +1,8 @@ -
- calloutText() ?> - calloutTicket()->exists() && $site->calloutTicket() == 'true'): ?> - Billetterie - -
\ No newline at end of file +callout()->toStructure() as $callout): ?> +
+ text() ?> + ticket() == 'true'): ?> + Billetterie + +
+ \ No newline at end of file