ldc-groupe/resources/views/components/front/videobloc.blade.php
2025-12-17 11:49:45 +01:00

44 lines
2.1 KiB
PHP

@if ($video['show_block'])
<div class="blocvideo fw">
<div class="blocvideo__wrapper wrapper">
@if (!empty($video['title']))
<h2 class="manifest__title textblock__title title">
<span class="title-text">{!! $video['title'] !!}</span>
@if (!empty($video['subtitle']))
<span @class([
'manifest__subtitle subtitle-text textblock__subtitle subtitle',
'subtitle_paint' => $video['subtitle']['cursive']
])>
{!! $video['subtitle']['text'] !!}
</span>
@endif
</h2>
@endif
@if (!empty($video['video']))
<div class="home_video">
<div class="video__wrap">
<div class="play-button"></div>
@php
$videoUrl = strpos($video['video'], 'https') === 0 ?
$video['video']
: ($video['type_video'] === 'youtube'
? 'https://www.youtube.com/embed/'
: 'https://player.vimeo.com/video/'
) . $video['video'];
@endphp
<div class="video-inlaid h-100" type="{{ $video['type_video'] }}" href="{{ $videoUrl }}">
<a class="cn-cookie-link" id="youtube-warning" href="" rel="nofollow">
<strong class="text-underline text-bold text-normal text-danger">
{{ __('cookie-notice.custom.' . $video['type_video'] . '.warning') }}
</strong>
</a>
</div>
</div>
</div>
@endif
@if (!empty($video['texte']))
<div class="engagements__description description">{{ clean($video['texte']) }}</div>
@endif
</div>
</div>
@endif