Changes before go-live

This commit is contained in:
2020-02-26 21:37:32 +01:00
parent c572f8b711
commit 1b1f4d4ebc
5 changed files with 50 additions and 20 deletions

View File

@@ -78,11 +78,13 @@ class RadioController extends Controller
public function terugluisteren(Request $request)
{
$programs = [];
$now = new \DateTimeImmutable('2 minutes ago');
$apiResult = $this->API('programma/schema/recent');
foreach($apiResult->schedule as $item) {
if(!$item->program->nonstop && !$item->program->rerun) {
$item->start = self::JsonToDateTime($item->start);
$item->end = self::JsonToDateTime($item->end);
$item->current = $item->end >= $now;
$item->program = new \Model\Program($item->program);
$programs[] = $item;
}

View File

@@ -351,6 +351,10 @@ button[disabled]:hover
width: 100%;
}
.mega_menu a.fixed-height {
height: 135px;
}
a.fixed-height {
display: block;
position: relative;

View File

@@ -50,6 +50,9 @@
<li class="post card column column_1_2">
<div class="post_content">
<h2><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
<ul class="post_details" style="margin-top: 0;">
<li class="date">
{{ Formatter::relativeDate($program->start) }}
@@ -57,6 +60,7 @@
</li>
</ul>
<a href="{{route('luister.programma') . '/' . $program->start->format('Y/m/d/H') . '/' . $duration}}" class="action_button player"><span class="fa fa-play"></span> <span>Luister terug</span></a>
@endif
<a href="{{route('programma') . $program->program->url}}" class="action_button"><span class="fa fa-question"></span> <span>Meer informatie</span></a>
<div class="clearfix"></div>
<p>{!! Formatter::excerpt($program->program->description, 200) !!}</p>
@@ -75,10 +79,23 @@
@endsection
@push('scripts')
<script type="text/javascript">
var $onAirIcon = $('#items .onair span.fa');
setInterval(function() {
$onAirIcon.removeClass('fa-play');
setTimeout(function() {
$onAirIcon.addClass('fa-play');
}, 500);
}, 1000);
</script>
@endpush
@push('styles')
<style>
#gemist_tabs li {
width: 50%;
}
</style>
@endpush

View File

@@ -1,3 +1,8 @@
<?php
if(!isset($MEDIAPLAYER_INCLUDED)):
// Make sure mediaplayer JS is not applied more than once on a page.
View::share('MEDIAPLAYER_INCLUDED', true);
?>
@push('scripts')
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelement-and-player.min.js"></script>
<script type="text/javascript">
@@ -18,3 +23,5 @@
@push('styles')
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelementplayer.css" />
@endpush
<?php endif; ?>

View File

@@ -123,7 +123,7 @@ function buildMenu($menu, $ismobile) {
@if($loop->index >= 3) @break @endif
<li class="post">
@if($item->image)
<a href="{{route('gemist.fragment') . $item->url}}" title="{{$item->title}}">
<a href="{{route('gemist.fragment') . $item->url}}" title="{{$item->title}}" class="fixed-height">
<img src='{{$imgBase . $item->image->url}}' alt='{{$item->title}}'>
</a>
@endif