add title to home grid
This commit is contained in:
parent
303ccf5bce
commit
1ab84c2ea5
6 changed files with 19 additions and 5 deletions
|
|
@ -2,6 +2,10 @@
|
|||
--padding-vertical: calc(var(--space-m) / 2);
|
||||
}
|
||||
|
||||
.collapsable-sections + .events-grid {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.events-grid h4 {
|
||||
margin-bottom: calc(var(--space-m) / 2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ footer {
|
|||
box-sizing: border-box;
|
||||
padding: var(--padding-vertical) var(--space-m);
|
||||
}
|
||||
section:not(:last-child, .collapsable) {
|
||||
section:not(:last-child, .collapsable, .collapsable-sections) {
|
||||
border-bottom: var(--border);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ tabs:
|
|||
linkedPages:
|
||||
label: Pages liées
|
||||
type: pages
|
||||
max: 4
|
||||
help: 4 maximum
|
||||
settingsTab:
|
||||
label: Réglages
|
||||
icon: cog
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
<section class="events-grid">
|
||||
<h4>À venir</h4>
|
||||
<h4><?= $title ?></h4>
|
||||
<div class="grid">
|
||||
<?php foreach($events as $event): ?>
|
||||
<?php snippet('event-card', ["event" => $event, "span" => 12 / $events->count()]) ?>
|
||||
<?php
|
||||
$span = 4;
|
||||
if ($events->count() === 4) {
|
||||
$span = 3;
|
||||
}
|
||||
snippet('event-card', ["event" => $event, "span" => $span])
|
||||
?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -121,4 +121,6 @@
|
|||
<?php endsnippet() ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
|
||||
<?php snippet('events-grid', ['title' => 'Pour aller plus loin', 'events' => $page->linkedPages()->toPages()]) ?>
|
||||
<?php snippet('footer') ?>
|
||||
|
|
@ -23,12 +23,12 @@
|
|||
'asc'
|
||||
);
|
||||
|
||||
snippet('events-grid', ['events' => $orderedEvents->slice(0, 2)])
|
||||
snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(0, 2)])
|
||||
?>
|
||||
|
||||
<?php snippet('newsletter-section') ?>
|
||||
|
||||
<?php snippet('events-grid', ['events' => $orderedEvents->slice(2, 5)]) ?>
|
||||
<?php snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(2, 5)]) ?>
|
||||
|
||||
<section class="callout">
|
||||
<h4><?= $site->callout() ?></h4>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue