ldc-legaulois/resources/views/fo/partials/commitments/paragraph.blade.php

34 lines
1.3 KiB
PHP

@php
$blockType = data_get($reduction, 'block_type.value');
$position = data_get($reduction, 'position.value');
$ctaUrl = data_get($reduction, 'cta_url.value');
$ctaLabel = data_get($reduction, 'cta_label.value');
$articleId = data_get($reduction, 'article_id.value');
$reductionNews = $articleId ? \App\Models\News::find($articleId) : null;
$visibility = data_get($reduction, 'visibility.value', true);
@endphp
<section class="position-relative line-border-large bg-white-wood-big bg-light" id="commitments-paragraph">
<div
class="d-flex flex-column flex-md-row justify-content-center justify-content-evenly align-items-center container py-5">
<div class="mb-3 border-0 bg-transparent">
<div class="row g-0">
<div class="col ck-content">
<h3>{{ $title }}</h3>
{!! clean($text) !!}
</div>
</div>
</div>
</div>
@if ($visibility)
<div class="container pb-5">
@include('fo.partials.block.reduction-card', [
'news' => $reductionNews,
'ctaUrl' => $ctaUrl ?? null,
'ctaLabel' => $ctaLabel ?? null,
'position' => $position,
'blockType' => $blockType,
])
</div>
@endif
</section>