investigation → add insert
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s
This commit is contained in:
parent
d51835a2c0
commit
65e8290edf
7 changed files with 98 additions and 3 deletions
|
|
@ -2488,6 +2488,22 @@ main .page__header .description {
|
|||
max-width: var(--max-w-content);
|
||||
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 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
|
@ -2553,6 +2569,10 @@ main .page__header .description {
|
|||
#investigation__content ul li {
|
||||
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 .section-content > :first-child {
|
||||
margin-top: 0px;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -44,11 +44,36 @@
|
|||
text-underline-offset: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.section-txt{
|
||||
max-width: var(--max-w-content);
|
||||
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{
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
|
@ -73,8 +98,8 @@
|
|||
min-height: calc(100vh - var(--header-h));
|
||||
max-width: var(--max-w-content);
|
||||
padding-left: var(--padding-inner);
|
||||
padding-right: var(--padding-inner);
|
||||
padding-bottom: calc(var(--spacing)*6);
|
||||
padding-right: var(--padding-inner);
|
||||
padding-bottom: calc(var(--spacing)*6);
|
||||
}
|
||||
|
||||
.subsection-w-hscroll{
|
||||
|
|
@ -133,6 +158,10 @@
|
|||
}
|
||||
|
||||
|
||||
.insert--inner > :last-child{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.insert--inner > :first-child,
|
||||
.subsection-txt > :first-child,
|
||||
.section-content > :first-child{
|
||||
margin-top: 0px;
|
||||
|
|
|
|||
29
site/blueprints/blocks/insert.yml
Normal file
29
site/blueprints/blocks/insert.yml
Normal 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...
|
||||
|
|
@ -84,6 +84,7 @@ tabs:
|
|||
- video
|
||||
# - horizontal-gallery
|
||||
- gallery
|
||||
- insert
|
||||
metadataTab:
|
||||
label: Métadonnées
|
||||
icon: table
|
||||
|
|
|
|||
11
site/snippets/blocks/insert.php
Normal file
11
site/snippets/blocks/insert.php
Normal 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>
|
||||
|
|
@ -229,6 +229,9 @@
|
|||
<?php elseif ($block->type() === 'horizontal-gallery'): ?>
|
||||
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
|
||||
|
||||
<?php elseif ($block->type() === 'insert'): ?>
|
||||
<?php snippet('blocks/insert', ['block' => $block]) ?>
|
||||
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
|
@ -275,6 +278,8 @@
|
|||
<?= $block->text() ?>
|
||||
<?php elseif ($block->type() === 'heading'): ?>
|
||||
<<?= $block->level()->or('h3') ?>><?= $block->text() ?></<?= $block->level()->or('h3') ?>>
|
||||
<?php elseif ($block->type() === 'insert'): ?>
|
||||
<?php snippet('blocks/insert', ['block' => $block]) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue