From aa265db0d307d7714c38c908a6edbf31efdc879b Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 29 Jul 2024 18:41:34 +0200 Subject: [PATCH] redesign hero blueprint --- assets/css/panel.css | 16 +++++++++ site/blueprints/blocks/hero-heading.yml | 23 +++++++++++++ site/blueprints/blocks/hero-text.yml | 15 +++++++++ site/blueprints/site.yml | 45 +++++++++++++++---------- site/config/config.php | 3 ++ 5 files changed, 84 insertions(+), 18 deletions(-) create mode 100644 assets/css/panel.css create mode 100644 site/blueprints/blocks/hero-heading.yml create mode 100644 site/blueprints/blocks/hero-text.yml diff --git a/assets/css/panel.css b/assets/css/panel.css new file mode 100644 index 0000000..12ae9ce --- /dev/null +++ b/assets/css/panel.css @@ -0,0 +1,16 @@ +:root { + --color-salmon: #ff4f4b; +} + +.k-field-name-herotext .k-block-type-heading-input[data-level="h3"] .k-text { + color: var(--color-salmon); +} + +.k-field-name-herotext + .k-block-container-fieldset-hero-heading:nth-child(odd) + .k-text { + text-align: right; +} +.k-field-name-herotext .k-block-type-heading-input[data-level="h2"] .k-text { + text-align: center; +} diff --git a/site/blueprints/blocks/hero-heading.yml b/site/blueprints/blocks/hero-heading.yml new file mode 100644 index 0000000..0c682fd --- /dev/null +++ b/site/blueprints/blocks/hero-heading.yml @@ -0,0 +1,23 @@ +name: field.blocks.heading.name +icon: title +wysiwyg: true +preview: heading +fields: + level: + label: field.blocks.heading.level + type: toggles + empty: false + default: "h2" + labels: false + options: + - value: h2 + icon: h2 + text: H2 + - value: h3 + icon: h3 + text: H3 + text: + label: field.blocks.heading.text + type: writer + inline: true + placeholder: field.blocks.heading.placeholder diff --git a/site/blueprints/blocks/hero-text.yml b/site/blueprints/blocks/hero-text.yml new file mode 100644 index 0000000..f412e82 --- /dev/null +++ b/site/blueprints/blocks/hero-text.yml @@ -0,0 +1,15 @@ +name: field.blocks.text.name +icon: text +wysiwyg: true +preview: text +fields: + text: + type: writer + nodes: false + placeholder: field.blocks.text.placeholder + maxlength: 336 + marks: + - bold + - italic + - link + - email diff --git a/site/blueprints/site.yml b/site/blueprints/site.yml index 728cf24..6115f68 100644 --- a/site/blueprints/site.yml +++ b/site/blueprints/site.yml @@ -20,31 +20,40 @@ tabs: label: Hero - width: 1/2 fields: - heroHeading: - label: Titre - type: text - heroSubtitleOne: - label: Sous-titre - type: text - help: Première ligne. - width: 1/2 - heroSubtitleTwo: - label: Sous-titre - type: text - help: Deuxième ligne. - width: 1/2 + heroMode: + label: Mode + type: radio + columns: 2 + default: nextEvent + options: + nextEvent: Prochain événement + custom: Personnalisé heroText: - label: Texte - type: writer - max: 500 + label: Text + type: blocks + when: + heroMode: custom + fieldsets: + - hero-heading + - hero-text heroLinkUrl: label: Lien - type: url + type: link width: 1/2 + options: + - url + - page + - file + - email + 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: heroImage: @@ -63,7 +72,7 @@ tabs: type: line calloutHeadline: type: headline - label: Callout + label: Brève calloutText: label: Texte type: writer diff --git a/site/config/config.php b/site/config/config.php index 28b3b55..12d73cd 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -2,6 +2,9 @@ return [ 'debug' => true, + 'panel' => [ + 'css' => 'assets/css/panel.css' + ], 'routes' => [ require_once(__DIR__ . '/routes/mapado-api.php'), require_once(__DIR__ . '/routes/month-dates.php')