Ansprechpartner-Sektion: person-card/person-grid-Komponenten, Daten in ansprechpartner.json, Vereins-Platzhalter statt AdobeStock, tel:/mailto korrekt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
26
app/components/person-grid.php
Normal file
26
app/components/person-grid.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Ansprechpartner-Grid aus data/ansprechpartner.json.
|
||||
* Optionaler Prop: $anchor (Sektions-ID, Default 'ansprechpartner').
|
||||
*/
|
||||
$data = json_load('ansprechpartner');
|
||||
$anchor = $anchor ?? 'ansprechpartner';
|
||||
?>
|
||||
<section class="section persons" id="<?= e($anchor) ?>">
|
||||
<div class="container">
|
||||
<h2><?= e($data['title']) ?></h2>
|
||||
<?php if (!empty($data['intro'])): ?>
|
||||
<p class="persons__intro"><?= e($data['intro']) ?></p>
|
||||
<?php endif; ?>
|
||||
<ul class="persons__grid">
|
||||
<?php foreach ($data['persons'] as $person): ?>
|
||||
<li>
|
||||
<?php component('person-card', ['person' => $person]); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user