update to kirby 4.8

This commit is contained in:
isUnknown 2026-02-13 15:40:11 +01:00
commit 7d7df341d1
636 changed files with 139949 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<section class="collapsable">
<button class="collapsable__button">
<h4><?= $block->title() ?></h4>
</button>
<div class="collapsable__content">
<?= $block->blocks()->toBlocks() ?>
</div>
</section>

View file

@ -0,0 +1,41 @@
<?php
$alt = $block->alt();
$caption = $block->caption();
$crop = $block->crop()->isTrue();
$link = $block->link();
$ratio = $block->ratio()->or('auto');
$src = null;
$srcset = null;
if ($block->location() == 'web') {
$src = $block->src()->esc();
} elseif ($image = $block->image()->toFile()) {
$alt = $alt->or($image->alt());
$src = $image->url();
$srcset = $image->srcset();
}
?>
<?php if ($src): ?>
<figure<?= Html::attr(['data-ratio' => $ratio, 'data-crop' => $crop], null, ' ') ?>>
<?php if ($link->isNotEmpty()): ?>
<a href="<?= Str::esc($link->toUrl()) ?>"
<?= e(!str_contains($link->toUrl(), $site->url()), ' target="_blank"') ?>>
<img src="<?= $src ?>"
alt="<?= $alt->esc() ?>"
srcset="<?= $srcset ?>">
</a>
<?php else: ?>
<img src="<?= $src ?>"
alt="<?= $alt->esc() ?>"
srcset="<?= $srcset ?>">
<?php endif ?>
<?php if ($caption->isNotEmpty()): ?>
<figcaption>
<?= $caption ?>
</figcaption>
<?php endif ?>
</figure>
<?php endif ?>

View file

@ -0,0 +1 @@
<?= $block->text()->kt()->processLinks();

View file

@ -0,0 +1 @@
<?= $block->text()->processLinks();

3
site/snippets/footer.php Normal file
View file

@ -0,0 +1,3 @@
</main>
</body>
</html>

26
site/snippets/header.php Normal file
View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= url('assets') ?>/css/style.css">
<?php snippet('meta') ?>
<?php snippet('favicon') ?>
<script>
const csrf = "<?= csrf() ?>";
const rootUrl = "<?= $site->url() ?>";
</script>
<script src="<?= url('assets') ?>/js/script.js" defer></script>
<title><?= $site->title() ?> <?php e(!$page->isHomePage(), ' - ' . $page->title()) ?></title>
</head>
<body>
<div id="cursor">
<span id="target"></span>
<span id="text"></span>
</div>
<?php if ($page->isHomePage()): ?>
<div id="introduction">
<h1><span class="hide">de<br class="mobile">carb</span><span class="hide">.<br class="mobile tablet"></span><span class="hide">one</span></h1>
</div>
<?php endif ?>
<main>

0
site/snippets/index.html Normal file
View file

110
site/snippets/meta.php Normal file
View file

@ -0,0 +1,110 @@
<?php
$pageTitle = $page->seoTitle()->isNotEmpty() ? $page->seoTitle() : $page->title();
$title = $page->isHomePage() ? $site->title() : $pageTitle . " | " . $site->title();
$description = $page->isHomePage() ? $site->description() : $page->description();
$siteCover = $site->cover()->isNotEmpty() ? $site->cover()->toFile()->url() : false;
$pageCover = $page->coverThumb()->isNotEmpty() ? $page->coverThumb() : false;
$image = $page->isHomePage() ? $siteCover : $pageCover;
?>
<link rel="canonical" href="<?= $page->url() ?>">
<title><?= $title ?></title>
<?php if ($description->isNotEmpty()): ?>
<meta name="description" content="<?= $description ?>">
<?php endif ?>
<meta name="generator" content="Kirby (<?= Kirby::version() ?>)">
<!--========== TWITTER ==========-->
<meta name="twitter:card" content="<?= $image ? "summary_large_image" : "summary" ?>">
<meta name="twitter:title" content="<?= $title ?>">
<?php if ($description->isNotEmpty()): ?>
<meta name="twitter:description" content="<?= $description ?>">
<?php endif ?>
<?php if ($image): ?>
<meta property="og:image" content="<?= $image ?>">
<?php endif ?>
<?php if ($site->twitter()->isNotEmpty()): ?>
<meta name="twitter:site" content="@<?= $site->twitter() ?>">
<?php endif ?>
<!--========== OG GRAPH ==========-->
<meta property="og:title" content="<?= $title ?>">
<meta property="og:site_name" content="<?= $site->title() ?>">
<?php if ($description->isNotEmpty()): ?>
<meta property="og:description" content="<?= $description ?>">
<?php endif ?>
<meta property="og:url" content="<?= $page->url() ?>">
<meta property="og:type" content="<?= $page->isHomePage() ? "website" : "article" ?>">
<?php if ($page->author()->isNotEmpty()): ?>
<meta name="author" content="<?= $page->author() ?>">
<meta property="article:author" content="<?= $page->author() ?>">
<?php endif ?>
<?php if ($page->published()->isNotEmpty()): ?>
<meta name="date" content="<?= $page->published() ?>" scheme="YYYY-MM-DD">
<meta property="article:published_time" content="<?= $page->published() ?>">
<?php endif ?>
<?php if ($page->tag()->isNotEmpty()): ?>
<meta property="article:tag" content="<?= $page->tag() ?>">
<?php endif ?>
<?php if ($image): ?>
<meta property="twitter:image" content="<?= $image ?>">
<?php endif ?>
<!--========== SCHEMA ==========-->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "<?= $site->homePage()->url() ?>",
"name": "<?= $site->title() ?>"
}
}<?php if (!$page->isHomePage() && $page->depth() === 1): ?>,
{
"@type": "ListItem",
"position": 2,
"item":
{
"@id": "<?= $page->url() ?>",
"name": "<?= $page->title() ?>"
}
}<?php endif ?><?php if ($page->depth() === 2): ?>,
{
"@type": "ListItem",
"position": 2,
"item":
{
"@id": "<?= $page->parent()->url() ?>",
"name": "<?= $page->parent()->title() ?>"
}
},
{
"@type": "ListItem",
"position": 3,
"item":
{
"@id": "<?= $page->url() ?>",
"name": "<?= $page->title() ?>"
}
}<?php endif ?>
]
}
</script>
<?php if (!$page->isHomePage()): ?>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"name": "<?= $page->title() ?>"<?php if ($page->author()->isNotEmpty()): ?>,
"author": "<?= $page->author() ?>"<?php endif ?><?php if ($page->created()->isNotEmpty()): ?>,
"datePublished": "<?= $page->created() ?>"<?php endif ?><?php if ($page->created()->toDate('d/m/Y') !== $page->modified('d/m/Y')): ?>,
"dateModified": "<?= $page->modified() ?>"<?php endif ?><?php if ($page->description()->isNotEmpty()): ?>,
"headline": "<?= $page->description() ?>"<?php endif ?><?php if ($image): ?>,
"image": "<?= $image ?>"<?php endif ?>
}
</script>
<?php endif ?>

11
site/snippets/sitemap.php Normal file
View file

@ -0,0 +1,11 @@
<?= '<?xml version="1.0" encoding="utf-8"?>'; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($pages as $p): ?>
<?php if (in_array($p->uri(), $ignore)) continue ?>
<url>
<loc><?= html($p->url()) ?></loc>
<lastmod><?= $p->modified('c', 'date') ?></lastmod>
<priority><?= ($p->isHomePage()) ? 1 : number_format(0.5 / $p->depth(), 1) ?></priority>
</url>
<?php endforeach ?>
</urlset>