Audit aller 23 indexierbaren Routen (lokaler Crawl) und Fixes: - Descriptions auf ~130-160 Zeichen; Turnen-Disziplinseiten hatten den kurzen Hero-Teaser als Description, jetzt eigene SERP-Texte - Titles: team-erste gekürzt, sportheimbuchung ohne doppelten Brand - h1->h3-Sprünge behoben: visually-hidden h2 aus JSON-Section-Titeln (sportheimbuchung, partner-werden), sichtbarer choice.title auf mitglied-werden; historie bekommt Breadcrumb-Schema - Neuer Helper img_intrinsic_attrs() liefert width/height aus der Bilddatei (PNG via getimagesize, SVG via viewBox) für Partner-Grid- und Banner-Slider-Logos — kein Layout-Shift mehr Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
34 lines
1.4 KiB
PHP
34 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Sponsoren/Partner-Logogrid. Props:
|
|
* $intro array{title, text, cta?} (aus home.json)
|
|
* Logos kommen aus data/partners.json (Single Source of Truth).
|
|
*/
|
|
$partners = json_load('partners')['partners'] ?? [];
|
|
?>
|
|
<section class="section partners" id="partner">
|
|
<div class="container">
|
|
<h2><?= e($intro['title']) ?></h2>
|
|
<p class="partners__intro text-muted"><?= e($intro['text']) ?></p>
|
|
<ul class="partners__grid">
|
|
<?php foreach ($partners as $partner): ?>
|
|
<li class="partners__item">
|
|
<?php if (!empty($partner['url'])): ?>
|
|
<a href="<?= e($partner['url']) ?>" rel="noopener">
|
|
<img src="<?= e(asset($partner['logo'])) ?>" alt="<?= e($partner['name']) ?>"<?= img_intrinsic_attrs($partner['logo']) ?> loading="lazy" decoding="async">
|
|
</a>
|
|
<?php else: ?>
|
|
<img src="<?= e(asset($partner['logo'])) ?>" alt="<?= e($partner['name']) ?>"<?= img_intrinsic_attrs($partner['logo']) ?> loading="lazy" decoding="async">
|
|
<?php endif; ?>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php if (!empty($intro['cta'])): ?>
|
|
<p><?php component('cta', ['cta' => $intro['cta']]); ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|