ldc-legaulois/resources/views/fo/partials/commitments/duo-title-text.blade.php

36 lines
1.5 KiB
PHP

@php
$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 ?? true;
@endphp
<section id="commitments-duo-title-text" class="position-relative">
<div class="line-border-large bg-{{ $background_color }} pb-5">
<div
class="container d-flex flex-column flex-md-row justify-content-center justify-content-evenly align-items-start pt-5 pb-4">
<div class="row justify-content-evenly align-items-start">
<div class="col-12 col-md-6 pe-5">
<h2 class="m-md-0 pe-md-5">{{ $title }}</h2>
</div>
<div class="col-12 col-md-6">
<p class="card-text">{!! $text !!}</p>
</div>
</div>
</div>
@if ($visibility)
<div class="container">
@include('fo.partials.block.reduction-card', [
'news' => $reductionNews,
'ctaUrl' => $ctaUrl ?? null,
'ctaLabel' => $ctaLabel ?? null,
'position' => $position,
'blockType' => $blockType,
])
</div>
@endif
</div>
</section>