26 lines
950 B
PHP
26 lines
950 B
PHP
@php
|
|
$reduction ??= null;
|
|
$blockType = $reduction?->block_type->value;
|
|
$position = $reduction?->position->value;
|
|
$ctaUrl = $reduction?->cta_url->value ?? null;
|
|
$ctaLabel = $reduction?->cta_label->value ?? null;
|
|
$articleId = $reduction?->article_id->value ?? null;
|
|
$reductionNews = $articleId ? \App\Models\News::find($articleId) : null;
|
|
$visibility = $reduction?->visibility->value ?? false;
|
|
@endphp
|
|
<section id="commitments-hgroup-list" class="container position-relative mb-5 ck-editor">
|
|
<div class="bg-tertiary p-4">
|
|
{!! clean($text) !!}
|
|
</div>
|
|
@if ($visibility)
|
|
<div class="container mt-4">
|
|
@include('fo.partials.block.reduction-card', [
|
|
'news' => $reductionNews,
|
|
'ctaUrl' => $ctaUrl ?? null,
|
|
'ctaLabel' => $ctaLabel ?? null,
|
|
'position' => $position,
|
|
'blockType' => $blockType,
|
|
])
|
|
</div>
|
|
@endif
|
|
</section>
|