31 lines
942 B
PHP
31 lines
942 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Vollbreites Call-to-Action-Band. Props:
|
||
|
|
* $band array{title, text?, ctas: [{label, slug, style?}]}
|
||
|
|
* $anchor string (optional)
|
||
|
|
* Rendert nichts ohne CTAs. Nutzt das bestehende cta-/btn-Muster.
|
||
|
|
*/
|
||
|
|
$anchor = $anchor ?? null;
|
||
|
|
if (empty($band['ctas'])) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
<section class="section section--tinted cta-band"<?= $anchor ? ' id="' . e($anchor) . '"' : '' ?>>
|
||
|
|
<div class="container cta-band__inner">
|
||
|
|
<?php if (!empty($band['title'])): ?>
|
||
|
|
<h2 class="cta-band__title"><?= e($band['title']) ?></h2>
|
||
|
|
<?php endif; ?>
|
||
|
|
<?php if (!empty($band['text'])): ?>
|
||
|
|
<p class="cta-band__text"><?= e($band['text']) ?></p>
|
||
|
|
<?php endif; ?>
|
||
|
|
<div class="cta-band__actions">
|
||
|
|
<?php foreach ($band['ctas'] as $cta): ?>
|
||
|
|
<?php component('cta', ['cta' => $cta]); ?>
|
||
|
|
<?php endforeach; ?>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|