diff --git a/assets/css/panel.css b/assets/css/panel.css index 0b58785..685c903 100644 --- a/assets/css/panel.css +++ b/assets/css/panel.css @@ -35,5 +35,5 @@ body, text-align: right; } .k-field-name-herotext .k-block-type-heading-input[data-level="h2"] .k-text { - text-align: center; + text-align: left; } diff --git a/assets/css/src/hero.css b/assets/css/src/hero.css index 7d7f829..eab97dd 100644 --- a/assets/css/src/hero.css +++ b/assets/css/src/hero.css @@ -15,6 +15,10 @@ margin-bottom: var(--padding-vertical); } +.hero__text h2.big { + font-size: var(--font-size-xxl); +} + .hero__text h3 { color: var(--color-salmon); font-size: var(--font-size-h2); diff --git a/assets/css/src/variables.css b/assets/css/src/variables.css index ab6fd21..712d9d5 100644 --- a/assets/css/src/variables.css +++ b/assets/css/src/variables.css @@ -10,6 +10,7 @@ --font-size-h2: 1.875rem; --font-size-h1: 2.8125rem; --font-size-xl: 3.75rem; + --font-size-xxl: 4.5rem; --shift-large: 7vw; --shift-medium: calc(var(--shift-large) / 2); diff --git a/site/blueprints/blocks/hero-heading.yml b/site/blueprints/blocks/hero-heading.yml index 63628d8..425b5a7 100644 --- a/site/blueprints/blocks/hero-heading.yml +++ b/site/blueprints/blocks/hero-heading.yml @@ -3,16 +3,6 @@ icon: title wysiwyg: true preview: heading fields: - leftMargin: - label: ⇥ Marge gauche - type: radio - columns: 4 - default: false - options: - false: Aucune - small: Petite - medium: Moyenne - large: Grande level: label: field.blocks.heading.level type: toggles @@ -31,3 +21,10 @@ fields: type: writer inline: true placeholder: field.blocks.heading.placeholder + isBig: + label: XL + type: toggle + help: Augmente la taille du texte + width: 1/3 + when: + level: h2 diff --git a/site/blueprints/blocks/hero-text.yml b/site/blueprints/blocks/hero-text.yml index a5c23a5..f412e82 100644 --- a/site/blueprints/blocks/hero-text.yml +++ b/site/blueprints/blocks/hero-text.yml @@ -3,16 +3,6 @@ icon: text wysiwyg: true preview: text fields: - leftMargin: - label: ⇥ Marge gauche - type: radio - columns: 4 - default: false - options: - false: Aucune - small: Petite - medium: Moyenne - large: Grande text: type: writer nodes: false diff --git a/site/snippets/blocks/hero-heading.php b/site/snippets/blocks/hero-heading.php index f4ff4bd..5f10b5d 100644 --- a/site/snippets/blocks/hero-heading.php +++ b/site/snippets/blocks/hero-heading.php @@ -1,2 +1,4 @@ - -<level()->or('h2') ?>>text() ?>> \ No newline at end of file +<level()->or('h2'); + echo e($block->level()->value() === 'h2' && $block->isBig() == 'true', ' class="big"') +?>>text() ?>> \ No newline at end of file diff --git a/site/snippets/picture.php b/site/snippets/picture.php index 1a69c1a..dcb50d4 100644 --- a/site/snippets/picture.php +++ b/site/snippets/picture.php @@ -1,31 +1,31 @@ - + alt(); + $crop = $crop ?? false; -$sizes = '(min-width: 1200px) 25vw, (min-width: 900px) 33vw, (min-width: 600px) 50vw, 100vw'; -$alt = $file->alt(); -$crop = $crop ?? false; - -$webPSrcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset('webp') : $file->srcset('webp'); -$srcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset() : $file->srcset(); -$src = $crop === 'banner' ? $file->crop(1600, 800)->url() : $file->url(); -$width = $crop === 'banner' ? $file->crop(1600, 800)->width() : $file->resize(1800)->width(); -$height = $crop === 'banner' ? $file->crop(1600, 800)->height() : $file->resize(1800)->height(); - -?> + $webPSrcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset('webp') : $file->srcset('webp'); + $srcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset() : $file->srcset(); + $src = $crop === 'banner' ? $file->crop(1600, 800)->url() : $file->url(); + $width = $crop === 'banner' ? $file->crop(1600, 800)->width() : $file->resize(1800)->width(); + $height = $crop === 'banner' ? $file->crop(1600, 800)->height() : $file->resize(1800)->height(); + ?> - - - - <?= $alt?> - - \ No newline at end of file + + + + <?= $alt?> + + + diff --git a/site/templates/program.php b/site/templates/program.php index 8f9580e..57be161 100644 --- a/site/templates/program.php +++ b/site/templates/program.php @@ -146,25 +146,7 @@ - - - - - + \ No newline at end of file