redesign home with edito

This commit is contained in:
isUnknown 2024-04-11 12:56:45 +02:00
parent 6c25374e09
commit 8aa1b420d9
4 changed files with 20 additions and 25 deletions

View file

@ -1,3 +1,4 @@
article .content { article .content {
scroll-margin-block-start: calc(var(--unit--vertical) * 6);
margin-top: calc(var(--unit--vertical) * 2); margin-top: calc(var(--unit--vertical) * 2);
} }

View file

@ -49,14 +49,6 @@ body[data-template="home"] {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.page-cover .edito {
max-height: 43svh;
overflow: auto;
margin-top: var(--unit--vertical);
box-sizing: border-box;
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
}
.page-cover .text-wrapper { .page-cover .text-wrapper {
height: 100%; height: 100%;

View file

@ -4,6 +4,9 @@ tabs:
contentTab: contentTab:
label: Contenu label: Contenu
fields: fields:
subtitle:
label: Sous-titre
type: text
edito: edito:
label: Éditorial label: Éditorial
type: writer type: writer

View file

@ -1,25 +1,24 @@
<?php snippet('header') ?> <?php snippet('header') ?>
<main x-data="{ isEditoOpen: false }"> <main x-data="{ isEditoOpen: false }">
<article>
<?php snippet('cover', slots: true) ?> <?php snippet('cover', slots: true) ?>
<?php slot('title') ?> <?php slot('title') ?>
<div class="title-center"> <a
<button @click="isEditoOpen = !isEditoOpen"> href="#main-edito"
<h2> class="no-line"
critique des arts<br> @click="isEditoOpen = true"
et des techniques<br> >
</h2> <h2 class="main-title <?= setTitleFontSizeClass($site->subtitle()) ?>"><?= $site->subtitle() ?></h2>
<button <p
class="main-edito-btn | toggle-btn left" class="main-edito-btn | toggle-btn left"
:class="isEditoOpen ? 'open' : 'close'" >édito</p>
>édito</button>
</button> </button>
</div>
<div x-show="isEditoOpen" class="edito">
<?= $site->edito() ?>
</div>
<?php endslot() ?> <?php endslot() ?>
<?php endsnippet() ?> <?php endsnippet() ?>
<?php snippet('nav') ?> <div x-show="isEditoOpen" id="main-edito" class="content">
<?= $site->edito() ?>
</div>
</article>
</main> </main>
<?php snippet('footer') ?> <?php snippet('footer') ?>