60 lines
2.3 KiB
PHP
60 lines
2.3 KiB
PHP
<?php
|
|
$li = array_merge([
|
|
'class' => '',
|
|
'style' => ''
|
|
], $li ?? []);
|
|
$content = array_merge([
|
|
'class' => '',
|
|
'style' => '',
|
|
], $content ?? []);
|
|
$ul = array_merge([
|
|
'class' => ''
|
|
], $ul ?? []);
|
|
$body = array_merge([
|
|
'show' => false,
|
|
'class' => ''
|
|
], $body ?? []);
|
|
$actionButton = array_merge([
|
|
'class' => ''
|
|
], $actionButton ?? []);
|
|
?>
|
|
<ul id="{{$id ?? ''}}" class="{{$ul['class']}}">
|
|
@foreach($podcasts as $podcast)
|
|
<?php $url = route('gemist.fragment') . $podcast->url; ?>
|
|
<li style="{{$li['style']}}" class="post {{$li['class']}}">
|
|
<div style="{{$content['style']}}" class="post_content {{$content['class']}}">
|
|
<h2 class="post_title">
|
|
<a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->titleWithoutProgram()!!}</a>
|
|
</h2>
|
|
<div class="sub_title">
|
|
@if ($podcast->program)
|
|
<a class="program_name" href="{{ route('programma') . $podcast->program->url }}"
|
|
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
|
@endif
|
|
<?php $time = Formatter::relativeDate($podcast->created) . (isset($showTime) && $showTime ? ' om ' . $podcast->published->format('H:i') : ''); ?>
|
|
<span class="post_date"
|
|
title="{{$time}}">
|
|
<i class="fa-regular fa-clock"></i> {{$time}}
|
|
</span>
|
|
</div>
|
|
@if(isset($showImage) && $showImage && $podcast->image)
|
|
<a href="{{$url}}" title="{{$podcast->title}}" class="fixed-height">
|
|
<img src='{{$imgBase . $podcast->image->url}}' alt='{{$podcast->image->title}}'>
|
|
</a>
|
|
@endif
|
|
@if($body['show'])
|
|
<p class="post_body {{$body['class']}}">
|
|
{!!$podcast->content!!}
|
|
</p>
|
|
@endif
|
|
@if(isset($showAction) && $showAction)
|
|
<div class="action_button {{$actionButton['class']}}">
|
|
<a class="btn" href="{{$url}}">Luister fragment</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</li>
|
|
|
|
@endforeach
|
|
</ul>
|