Pressroom template verwijderd, website naar root van repo
This commit is contained in:
59
resources/views/partial/radioscheduleweek.blade.php
Normal file
59
resources/views/partial/radioscheduleweek.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
|
||||
<div class="schedule">
|
||||
<div class="timeslots">
|
||||
<div class="date-header"></div>
|
||||
@for($h = 0; $h < 24; $h += 1.0)
|
||||
<div class="time-header">{{$time = gmdate("H:i", $h * 3600)}} uur</div>
|
||||
@endfor
|
||||
</div>
|
||||
|
||||
|
||||
@php($date = null)
|
||||
@php($hour = 0)
|
||||
@php($now = new \DateTime("now"))
|
||||
@foreach($schedule as $item)
|
||||
@php($diff = $item['endtime']->diff($item['starttime']))
|
||||
@php($duration = $diff->d * 24 + $diff->h + $diff->i / 60)
|
||||
@php($isCurrent = ($now >= $item['starttime']) && ($now <= $item['endtime']))
|
||||
@php($class = ($item['program']->priority < 2 ? ' special' : '')
|
||||
. ($item['program']->nonstop || $item['program']->rerun ? ' non-stop' : '')
|
||||
. ($isCurrent ? ' current' : ''))
|
||||
@php($starttime = $item['starttime'])
|
||||
|
||||
@while($duration > 0)
|
||||
@if(($formattedDate = Formatter::fullDate($starttime, 'W d/M')) != $date)
|
||||
@if($date != null)
|
||||
</div>
|
||||
@endif
|
||||
<div class="date-column">
|
||||
<div class="date-header">{{$formattedDate}}</div>
|
||||
@php($date = $formattedDate)
|
||||
@php($hour = 0)
|
||||
@endif
|
||||
@php($durationToday = ($hour + $duration <= 24) ? $duration : (24 - $hour))
|
||||
|
||||
<a href="{{route('programma') . $item['program']->url}}" class="program{{$class}}" style="height: {{$durationToday * $pixelsPerHour - 2 * $border - $margin}}px;" title="{{$item['program']->name . ($item['program']->tagline ? "\n" . $item['program']->tagline : "")}}">
|
||||
<div class="program-title">
|
||||
@if($isCurrent) <div class="current-marker"><span>On air</span></div> @endif
|
||||
{{$item['program']->name}}
|
||||
</div>
|
||||
<div class="program-content">
|
||||
<div class="program-times"><span class="fa fa-clock"></span> {{$item['starttime']->format('H:i')}} – {{$item['endtime']->format('H:i')}}</div>
|
||||
@if($item['program']->tagline)
|
||||
<hr/>
|
||||
<div class="tagline">{{$item['program']->tagline}}</div>
|
||||
@endif
|
||||
</div>
|
||||
</a>
|
||||
@php($hour += $durationToday)
|
||||
@php($duration -= $durationToday)
|
||||
@if($duration > 0)
|
||||
@php($starttime->add(new \DateInterval('P1D'))->setTime(0, 0, 0))
|
||||
@endif
|
||||
@endwhile
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user