Skip to content

Commit

Permalink
fix: fixed php stan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jeslage committed Apr 14, 2023
1 parent 511e8cd commit 6ecf12f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
6 changes: 0 additions & 6 deletions site/snippets/blocks/gallery.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<?php

use Kirby\Cms\Html;

?>

<?php if (isset($block)) : ?>
<div class="relative overflow-hidden mb-xl" x-data="Gallery">
<section class="flex items-center snap-x snap-proximity overflow-x-scroll scrollbar-none max-w-full mx-auto" x-ref="container" x-resizeobserver="onResize" tabindex="0">
Expand Down
24 changes: 13 additions & 11 deletions site/templates/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@
snippet('layout', slots: true) ?>

<main class="grid-container">
<div class="col-span-4 md:col-start-3 md:col-span-8 mb-xl flex gap-xs flex-wrap mt-l">
<h2 class="headline-2"><?= $articles['headline'] ?></h2>
<?php if (isset($articles)) : ?>
<div class="col-span-4 md:col-start-3 md:col-span-8 mb-xl flex gap-xs flex-wrap mt-l">
<h2 class="headline-2"><?= $articles['headline'] ?></h2>

<div class="richtext">
<?= $articles['intro'] ?>
<div class="richtext">
<?= $articles['intro'] ?>
</div>
</div>
</div>

<div class="col-span-12 md:grid md:grid-cols-2 lg:grid-cols-3 gap-x-m gap-y-xl">
<?php foreach ($articles['items'] ?? [] as $article) : ?>
<?php snippet('components/teaser', [
<div class="col-span-12 md:grid md:grid-cols-2 lg:grid-cols-3 gap-x-m gap-y-xl">
<?php foreach ($articles['items'] ?? [] as $article) : ?>
<?php snippet('components/teaser', [
'topline' => $article->created()->toDate('d.m.Y'),
'title' => $article->title(),
'excerpt' => $article->excerpt(),
'url' => $article->url(),
'image' => $article->cover()->toFile(),
]) ?>
<?php endforeach ?>
</div>
]) ?>
<?php endforeach ?>
</div>
<?php endif; ?>
</main>

<?= snippet('blocks') ?>

0 comments on commit 6ecf12f

Please sign in to comment.