add sectioned template style
This commit is contained in:
parent
5f8bdc66c0
commit
caf16ee9ca
8 changed files with 80 additions and 4 deletions
|
|
@ -161,3 +161,13 @@
|
|||
.no-padding {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.shift-large {
|
||||
margin-left: var(--shift-large);
|
||||
}
|
||||
.shift-medium {
|
||||
margin-left: var(--shift-medium);
|
||||
}
|
||||
.shift-small {
|
||||
margin-left: var(--shift-small);
|
||||
}
|
||||
|
|
|
|||
20
assets/css/src/page-sectioned.css
Normal file
20
assets/css/src/page-sectioned.css
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
[data-template="sectioned"] main p {
|
||||
font-size: var(--font-size-s);
|
||||
}
|
||||
|
||||
[data-template="sectioned"] main .big p {
|
||||
font-size: var(--font-size-m);
|
||||
}
|
||||
|
||||
[data-template="sectioned"] main h2 {
|
||||
font-weight: bold;
|
||||
margin-bottom: calc(var(--padding-vertical) / 1.5);
|
||||
}
|
||||
|
||||
[data-template="sectioned"] .blocks > *:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
[data-template="sectioned"] main section:nth-child(odd):not(:first-child) {
|
||||
background-color: var(--color-brown-light);
|
||||
}
|
||||
|
|
@ -11,6 +11,10 @@
|
|||
--font-size-h1: 2.8125rem;
|
||||
--font-size-xl: 3.75rem;
|
||||
|
||||
--shift-large: 7vw;
|
||||
--shift-medium: calc(var(--shift-large) / 2);
|
||||
--shift-small: calc(var(--shift-medium) / 2);
|
||||
|
||||
--curve-quick-slow: cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
||||
--curve-quick: cubic-bezier(0.23, 1, 0.32, 1);
|
||||
--padding-vertical: 2rem;
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@
|
|||
@import url("src/swiper.css");
|
||||
@import url("src/collapsable-section.css");
|
||||
@import url("src/program-filters.css");
|
||||
@import url("src/page-sectioned.css");
|
||||
@import url("src/footer.css");
|
||||
|
|
|
|||
|
|
@ -3,17 +3,24 @@ icon: text
|
|||
wysiwyg: true
|
||||
preview: text
|
||||
fields:
|
||||
text:
|
||||
label: Texte
|
||||
type: writer
|
||||
placeholder: field.blocks.text.placeholder
|
||||
leftMargin:
|
||||
label: ⇥ Marge gauche
|
||||
type: radio
|
||||
columns: 4
|
||||
default: false
|
||||
width: 3/4
|
||||
options:
|
||||
false: Aucune
|
||||
small: Petite
|
||||
medium: Moyenne
|
||||
large: Grande
|
||||
text:
|
||||
label: Texte
|
||||
type: writer
|
||||
placeholder: field.blocks.text.placeholder
|
||||
isBig:
|
||||
label: Grand
|
||||
type: toggle
|
||||
default: false
|
||||
width: 1/4
|
||||
help: Augmente la taille du texte
|
||||
|
|
|
|||
5
site/snippets/blocks/links-list.php
Normal file
5
site/snippets/blocks/links-list.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<ul>
|
||||
<?php foreach($block->toStructure() as $item): ?>
|
||||
<li></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
3
site/snippets/blocks/text.php
Normal file
3
site/snippets/blocks/text.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="<?php e($block->leftMargin()->isNotEmpty() == 'true', 'shift-' . $block->leftMargin()) ?><?php e($block->isBig() == 'true', 'big') ?>">
|
||||
<?= $block->text(); ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<section>
|
||||
<h1><?= $page->title() ?></h1>
|
||||
</section>
|
||||
|
||||
<?php foreach($page->children() as $sectionPage): ?>
|
||||
<section>
|
||||
<?php if ($sectionPage->isIndexed() != 'false'): ?>
|
||||
<h2 class="h3"><?= $sectionPage->title() ?></h2>
|
||||
<?php endif ?>
|
||||
<?php foreach ($sectionPage->section()->toLayouts() as $layout): ?>
|
||||
<div class="grid" id="<?= $layout->id() ?>">
|
||||
<?php foreach ($layout->columns() as $column): ?>
|
||||
<div class="grid__item" style="--span:<?= $column->span() ?>">
|
||||
<div class="blocks">
|
||||
<?= $column->blocks() ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue