diff --git a/site/blueprints/site.yml b/site/blueprints/site.yml index b83ebd0..2e52c57 100644 --- a/site/blueprints/site.yml +++ b/site/blueprints/site.yml @@ -65,38 +65,37 @@ tabs: options: event: Événement custom: Personnalisé - heroText: - label: Text + heroTextLeft: + label: Texte gauche type: blocks when: heroMode: custom fieldsets: - hero-heading - hero-text - heroLinkUrl: + - width: 1/2 + fields: + heroEvent: + label: Spectacle + type: pages + multiple: false + query: page('programme').grandChildren + when: + heroMode: event + heroTextRight: + label: Texte droite + type: writer + when: + heroMode: custom + heroLink: label: Lien type: link - width: 1/2 options: - url - page help: Optionnel. Laisser vide pour ne pas afficher de lien dans le hero. when: heroMode: custom - heroLinkText: - label: Texte du Lien - type: text - width: 1/2 - when: - heroMode: custom - - width: 1/2 - fields: - heroEvent: - label: Événement - type: pages - query: page('programme').grandChildren - when: - heroMode: event heroImage: label: Image type: files diff --git a/site/templates/home.php b/site/templates/home.php index aa0de81..d3b57d2 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -1,22 +1,14 @@
heroMode() == 'custom'): ?> -
-
- heroText()->toBlocks() ?> -
- heroLinkUrl()->isNotEmpty() == 'true'): ?> - heroLinkText()->isNotEmpty() == 'true', $site->heroLinkText(), $site->heroLinkUrl()->toUrl()) ?> - -
- heroLinkUrl()->isNotEmpty() == 'true'): ?> - + heroLink()->isNotEmpty()): ?> +
heroImage()->toFiles()->count() > 1): ?> $site->heroImage()->toFiles()->first(), + 'file' => $site->heroImage()->toFiles()->first(), 'class' => 'image-cover', 'size' => 60 ]) ?> @@ -24,23 +16,22 @@ $site->heroImage()->toFiles()->count() > 1 ? $site->heroImage()->toFiles()->nth(1) : $site->heroImage()->toFiles()->first(), 'lazy' => false, 'size' => 60]) ?>
+
+
+ heroTextLeft()->toBlocks() ?> +
+
+ heroTextRight() ?> +
+
heroEvent()->toPage(); ?> -
-
-

- title() ?> -

- chapo() ?> -
- Découvrir -
gallery()->toFiles()->count() > 1): ?> $heroEvent->gallery()->toFiles()->first(), + 'file' => $heroEvent->gallery()->toFiles()->first(), 'class' => 'image-cover', 'size' => 60 ]) ?> @@ -48,6 +39,28 @@ $heroEvent->gallery()->toFiles()->count() > 1 ? $heroEvent->gallery()->toFiles()->nth(1) : $heroEvent->gallery()->toFiles()->first(), 'lazy' => false, 'size' => 60]) ?>
+
+
+

title() ?>

+

authors() ?>

+
+
+ schedule(); ?> + + isMapadoEvent() == 'true') { + $bookingUrl = $heroEvent->url(); + } elseif ($heroEvent->bookingUrl()->isNotEmpty()) { + $bookingUrl = $heroEvent->bookingUrl()->url(); + } else { + $bookingUrl = null; + } + ?> + $bookingUrl] : []) ?> + + +
+