Styled pages missed program and fragment missed
This commit is contained in:
67
resources/views/partial/programitems.blade.php
Normal file
67
resources/views/partial/programitems.blade.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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($programs as $program)
|
||||
<?php $url = route('programma') . $program->program->url; ?>
|
||||
<?php $endStartDiff = $program->end->diff($program->start);
|
||||
$duration = 24 * $endStartDiff->d + $endStartDiff->h; ?>
|
||||
<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="{{$program->program->name}}">{!!$program->program->name!!}</a>
|
||||
</h2>
|
||||
@if($program->current)
|
||||
<a href="{{route('luister.live')}}" class="onair action_button player"><span class="fa"></span>
|
||||
<span>Nu live!</span>
|
||||
</a>
|
||||
@else
|
||||
<div class="sub_title">
|
||||
<?php $time = Formatter::relativeDate($program->start) . (isset($showTime) && $showTime ? ' om ' . $program->start->format('H:i') : ''); ?>
|
||||
<span class="post_date" title="{{$time}}">
|
||||
<i class="fa-regular fa-clock"></i> {{$time}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@if(isset($showAction) && $showAction)
|
||||
<div class="row action_button" style="margin-top: 20px;">
|
||||
@if(!$program->current)
|
||||
<div class="col">
|
||||
<a href="{{route('luister.programma') . '/' . $program->start->format('Y/m/d/H') . '/' . $duration}}"
|
||||
class="player btn" style="padding: 10px 0;width: 100%;">Luister terug</a>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col">
|
||||
<a href="{{route('programma') . $program->program->url}}" class="btn"
|
||||
style="padding: 10px 0;width: 100%;">Meer informatie</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($body['show'])
|
||||
<p class="post_body {{$body['class']}}">
|
||||
{!!strip_tags($program->program->description)!!}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
Reference in New Issue
Block a user