fipamo/content/themes/fipamo-default-v2/includes/slides.blade.php

34 lines
1.3 KiB
PHP
Raw Normal View History

<div class="slide-show">
@if(count($media)>1)
@foreach($media as $item)
@if($item['type'] == "mp4")
<div id="{{$loop->index}}" class="slide">
<video controls autoplay muted>
<source src="{{$item['file']}}" type="video/mp4">
Please get a better browser. They're free.
</video>
</div>
@else
<div id="{{$loop->index}}" class="slide hide" style="background: url({{ $item['file'] }}) no-repeat center center / cover"></div>
@endif
@endforeach
@else
@if(isset($media[0]) && $media != '')
@if($media[0]['type'] == "mp4")
<div id="0" class="slide">
<video controls autoplay muted>
<source src="{{$media[0]['file']}}" type="video/mp4">
Please get a better browser. They're free.
</video>
</div>
@else
<div id="0" class="slide" style="background: url({{ $media[0]['file'] }}) no-repeat center center / cover"></div>
@endif
@else
<div id="0" class="slide" style="background: url({{ $info['image'] }}) no-repeat center center / cover"></div>
@endif
@endif
</div>