Add scribbles
All checks were successful
Deploy / deploy (push) Successful in 3s

This commit is contained in:
Marcel Kapfer 2025-01-31 22:04:40 +01:00
parent b36abcd3bf
commit 0d40b85f76
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
13 changed files with 232 additions and 58 deletions

View file

@ -0,0 +1,34 @@
<?php
/**
* @var Kirby\Cms\Page $page
* @var Kirby\Cms\Pages $scribbles
*/
?>
<?php snippet('layout', slots: true) ?>
<?php slot() ?>
<h1><?= $page->title() ?></h1>
<?= $page->text()->kirbytext() ?>
<?php foreach($scribbles as $scribble): ?>
<?php snippet('scribble', ['scribble' => $scribble, 'singlePage' => false]) ?>
<?php endforeach ?>
<?php if ($scribbles->pagination()->hasPages()): ?>
<nav class="pagination">
<?php if ($scribbles->pagination()->hasNextPage()): ?>
<a class="page-item next" href="<?= $scribbles->pagination()->nextPageURL() ?>">
older scribbles
</a>
<?php endif ?>
<?php if ($scribbles->pagination()->hasPrevPage()): ?>
<a class="page-item prev" href="<?= $scribbles->pagination()->prevPageURL() ?>">
newer scribbles
</a>
<?php endif ?>
</nav>
<?php endif ?>
<?php endslot() ?>