Files
godelandClaude Opus 5.5 a28632abdf Ubuntu-Basis auf 24.04 pinnen (PHP2Shell-Fix, Kirby 4 braucht PHP <= 8.4)
ubuntu:latest ist inzwischen 26.04 mit PHP 8.5, das Kirby 4.6 nicht unterstuetzt.
24.04 liefert php8.3 8.3.6-0ubuntu0.24.04.13 mit dem Fix fuer
CVE-2026-109618/-109619. Image neu bauen mit --pull.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:56:10 +02:00

62 lines
2.0 KiB
PHP

<?php
/*
Templates render the content of your pages.
They contain the markup together with some control structures
like loops or if-statements. The `$page` variable always
refers to the currently active page.
To fetch the content from each field we call the field name as a
method on the `$page` object, e.g. `$page->title()`.
This home template renders content from others pages, the children of
the `photography` page to display a nice gallery grid.
Snippets like the header and footer contain markup used in
multiple templates. They also help to keep templates clean.
More about templates: https://getkirby.com/docs/guide/templates/basics
*/
?>
<?php snippet('header') ?>
<?php snippet('intro') ?>
<?php
/*
We always use an if-statement to check if a page exists to
prevent errors in case the page was deleted or renamed before
we call a method like `children()` in this case
*/
?>
<?php if ($photographyPage = page('photography')): ?>
<ul class="home-grid">
<?php foreach ($photographyPage->children()->listed() as $album): ?>
<li>
<a href="<?= $album->url() ?>">
<figure>
<?php
/*
The `cover()` method defined in the `album.php`
page model can be used everywhere across the site
for this type of page
We can automatically resize images to a useful
size with Kirby's built-in image manipulation API
*/
?>
<?php if ($cover = $album->cover()): ?>
<img src="<?= $cover->resize(1024, 1024)->url() ?>" alt="<?= $cover->alt()->esc() ?>">
<?php endif ?>
<figcaption>
<span>
<span class="example-name"><?= $album->title()->esc() ?></span>
</span>
</figcaption>
</figure>
</a>
</li>
<?php endforeach ?>
</ul>
<?php endif ?>
<?php snippet('footer') ?>