investigation → add insert
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s

This commit is contained in:
Julie Blanc 2026-02-19 15:15:47 +01:00
parent d51835a2c0
commit 65e8290edf
7 changed files with 98 additions and 3 deletions

View file

@ -2488,6 +2488,22 @@ main .page__header .description {
max-width: var(--max-w-content); max-width: var(--max-w-content);
margin-inline: auto; margin-inline: auto;
} }
#investigation__content .insert {
max-width: var(--max-w-cards);
margin-inline: auto;
border: 1px solid var(--grey-600);
padding: calc(var(--padding-inner) * 3);
background-color: var(--grey-800);
}
#investigation__content .insert .insert--inner {
max-width: var(--max-w-content);
margin-inline: auto;
}
#investigation__content .subsection-txt .insert {
margin-top: calc(var(--spacing) * 2);
margin-bottom: calc(var(--spacing) * 2);
padding: calc(var(--padding-inner) * 2) calc(var(--padding-inner) * 1.5);
}
#investigation__content .subsection-w-media { #investigation__content .subsection-w-media {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
@ -2553,6 +2569,10 @@ main .page__header .description {
#investigation__content ul li { #investigation__content ul li {
margin: calc(var(--spacing) * 0.5) 0; margin: calc(var(--spacing) * 0.5) 0;
} }
#investigation__content .insert--inner > :last-child {
margin-bottom: 0px;
}
#investigation__content .insert--inner > :first-child,
#investigation__content .subsection-txt > :first-child, #investigation__content .subsection-txt > :first-child,
#investigation__content .section-content > :first-child { #investigation__content .section-content > :first-child {
margin-top: 0px; margin-top: 0px;

File diff suppressed because one or more lines are too long

View file

@ -44,11 +44,36 @@
text-underline-offset: 5px; text-underline-offset: 5px;
} }
.section-txt{ .section-txt{
max-width: var(--max-w-content); max-width: var(--max-w-content);
margin-inline: auto; margin-inline: auto;
} }
.insert{
max-width: var(--max-w-cards);
margin-inline: auto;
border: 1px solid var(--grey-600);
padding: calc(var(--padding-inner)*3);
background-color: var(--grey-800);
.insert--inner{
max-width: var(--max-w-content);
margin-inline: auto;
}
}
.subsection-txt .insert{
margin-top: calc(var(--spacing)*2);
margin-bottom: calc(var(--spacing)*2);
padding: calc(var(--padding-inner)*2) calc(var(--padding-inner)*1.5);
}
.subsection-w-media{ .subsection-w-media{
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
@ -73,8 +98,8 @@
min-height: calc(100vh - var(--header-h)); min-height: calc(100vh - var(--header-h));
max-width: var(--max-w-content); max-width: var(--max-w-content);
padding-left: var(--padding-inner); padding-left: var(--padding-inner);
padding-right: var(--padding-inner); padding-right: var(--padding-inner);
padding-bottom: calc(var(--spacing)*6); padding-bottom: calc(var(--spacing)*6);
} }
.subsection-w-hscroll{ .subsection-w-hscroll{
@ -133,6 +158,10 @@
} }
.insert--inner > :last-child{
margin-bottom: 0px;
}
.insert--inner > :first-child,
.subsection-txt > :first-child, .subsection-txt > :first-child,
.section-content > :first-child{ .section-content > :first-child{
margin-top: 0px; margin-top: 0px;

View file

@ -0,0 +1,29 @@
name: Insert (conclusion, hightlight, notes)
icon: text
preview: fields
fields:
title:
label: Titre
type: text
width: 2/3
level:
label: Niveau
type: select
default: h3
width: 1/3
options:
h3: H3
h4: H4
h5: H5
text:
type: writer
size: huge
marks:
- bold
- italic
- underline
- link
- strike
nodes:
- bulletList
placeholder: Texte d'insert...

View file

@ -84,6 +84,7 @@ tabs:
- video - video
# - horizontal-gallery # - horizontal-gallery
- gallery - gallery
- insert
metadataTab: metadataTab:
label: Métadonnées label: Métadonnées
icon: table icon: table

View file

@ -0,0 +1,11 @@
<?php
/** @var \Kirby\Cms\Block $block */
?>
<div class="insert">
<div class="insert--inner">
<?php if ($block->title()->isNotEmpty()): ?>
<<?= $block->level()->or('h3') ?>><?= $block->title()->esc() ?></<?= $block->level()->or('h3') ?>>
<?php endif ?>
<?= $block->text() ?>
</div>
</div>

View file

@ -229,6 +229,9 @@
<?php elseif ($block->type() === 'horizontal-gallery'): ?> <?php elseif ($block->type() === 'horizontal-gallery'): ?>
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?> <?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
<?php elseif ($block->type() === 'insert'): ?>
<?php snippet('blocks/insert', ['block' => $block]) ?>
<?php endif ?> <?php endif ?>
<?php endforeach ?> <?php endforeach ?>
</div> </div>
@ -275,6 +278,8 @@
<?= $block->text() ?> <?= $block->text() ?>
<?php elseif ($block->type() === 'heading'): ?> <?php elseif ($block->type() === 'heading'): ?>
<<?= $block->level()->or('h3') ?>><?= $block->text() ?></<?= $block->level()->or('h3') ?>> <<?= $block->level()->or('h3') ?>><?= $block->text() ?></<?= $block->level()->or('h3') ?>>
<?php elseif ($block->type() === 'insert'): ?>
<?php snippet('blocks/insert', ['block' => $block]) ?>
<?php endif ?> <?php endif ?>
<?php endforeach ?> <?php endforeach ?>
</div> </div>