From 4cd3bfba5723360d19c615446ba9e284bd14b1e4 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 27 Aug 2024 17:10:48 +0200 Subject: [PATCH] add resources section --- assets/css/src/collapsable-section.css | 34 +++++++++++++++++++++++++- assets/css/src/generic.css | 32 ++++++++++++++++++++++++ assets/css/src/nav.css | 26 -------------------- assets/css/src/vanilla.css | 2 +- site/blueprints/pages/event.yml | 4 +-- site/snippets/collapsable-section.php | 17 +++++++++---- site/snippets/nav.php | 1 - site/templates/event.php | 32 +++++++++++++++++++++++- 8 files changed, 111 insertions(+), 37 deletions(-) diff --git a/assets/css/src/collapsable-section.css b/assets/css/src/collapsable-section.css index 3a18b8a..2d7bef7 100644 --- a/assets/css/src/collapsable-section.css +++ b/assets/css/src/collapsable-section.css @@ -1,11 +1,24 @@ .collapsable-sections { background-color: var(--color-yellow); + --row-padding: var(--padding-vertical) var(--space-m); + padding: 0 !important; +} + +.collapsable > * { + padding: var(--row-padding); + box-sizing: border-box; + width: 100%; + border-bottom: var(--border); } .collapsable button.toggle { - width: 100%; display: flex; justify-content: space-between; + align-items: center; +} + +.collapsable button.toggle.open svg { + transform: rotate(180deg); } .collapsable__content { @@ -17,3 +30,22 @@ max-height: 100%; overflow: hidden; } + +.collapsable__content { + font-size: var(--font-size-s); +} +.collapsable__content .production p:not(:last-child) { + margin-bottom: 2rem; +} + +.collapsable .resource > * { + display: inline-block; +} + +.collapsable .resource > p { + margin-right: 2rem; +} + +.collapsable .resource > a { + font-weight: bold; +} diff --git a/assets/css/src/generic.css b/assets/css/src/generic.css index f2d59f5..ab6ee4b 100644 --- a/assets/css/src/generic.css +++ b/assets/css/src/generic.css @@ -60,3 +60,35 @@ body.progress * { .social-icons a:hover svg { transform: scale(1.15); } + +.close-btn { + position: relative; + width: 1.5rem; + height: 1.5rem; + display: flex; + align-items: center; + justify-content: center; + justify-self: end; +} + +.close-btn__line, +.close-btn__line::before { + content: ""; + width: 100%; + height: 3px; + background-color: #000; + position: absolute; +} + +.close-btn__line { + transform: rotate(-45deg); +} +.close-btn__line::before { + transform: rotate(90deg); +} + +.arrow-down { + font-size: 2rem; + height: 1.5rem; + transform: translateY(-0.2rem); +} diff --git a/assets/css/src/nav.css b/assets/css/src/nav.css index abd8dac..f3bd9db 100644 --- a/assets/css/src/nav.css +++ b/assets/css/src/nav.css @@ -35,32 +35,6 @@ row-gap: 6rem; } -.expanded-nav .close-btn { - position: relative; - width: 1.5rem; - height: 1.5rem; - display: flex; - align-items: center; - justify-content: center; - justify-self: end; -} - -.expanded-nav .close-btn__line, -.expanded-nav .close-btn__line::before { - content: ""; - width: 100%; - height: 3px; - background-color: #000; - position: absolute; -} - -.expanded-nav .close-btn__line { - transform: rotate(-45deg); -} -.expanded-nav .close-btn__line::before { - transform: rotate(90deg); -} - .expanded-nav__category { margin-bottom: 1rem; } diff --git a/assets/css/src/vanilla.css b/assets/css/src/vanilla.css index 68ca5d1..ddfbcc8 100644 --- a/assets/css/src/vanilla.css +++ b/assets/css/src/vanilla.css @@ -3,7 +3,7 @@ footer { box-sizing: border-box; padding: var(--padding-vertical) var(--space-m); } -section:not(:last-child) { +section:not(:last-child, .collapsable) { border-bottom: var(--border); } diff --git a/site/blueprints/pages/event.yml b/site/blueprints/pages/event.yml index e585b92..9216c05 100644 --- a/site/blueprints/pages/event.yml +++ b/site/blueprints/pages/event.yml @@ -129,11 +129,11 @@ tabs: type: writer - width: 1/1 fields: - distributionAndProduction: + production: label: Distribution et production type: layout layouts: - - "1/4, 1/4, 1/4, 1/4" + - "1/3, 1/3, 1/3" fieldsets: - text resources: diff --git a/site/snippets/collapsable-section.php b/site/snippets/collapsable-section.php index 9b62324..29ec158 100644 --- a/site/snippets/collapsable-section.php +++ b/site/snippets/collapsable-section.php @@ -1,11 +1,18 @@
- -
- test +
+ content() ?>
\ No newline at end of file diff --git a/site/snippets/nav.php b/site/snippets/nav.php index 8e9024e..d4bc892 100644 --- a/site/snippets/nav.php +++ b/site/snippets/nav.php @@ -78,7 +78,6 @@ \ No newline at end of file diff --git a/site/templates/event.php b/site/templates/event.php index 2109b1d..92d5312 100644 --- a/site/templates/event.php +++ b/site/templates/event.php @@ -19,6 +19,36 @@
- + 'Distribution et production'], slots: true) ?> + +
+ production()->toLayouts() as $layout): ?> +
+ columns() as $column): ?> +
+
+ blocks() ?> +
+
+ +
+ +
+ + + + resources()->isNotEmpty()): ?> + 'Ressources'], slots: true) ?> + +
+ resources()->toStructure() as $resource): ?> +
+

name() ?>

télécharger ↓ +
+ +
+ + +
\ No newline at end of file