@extends('master') @section('title', 'Home') @section('content')
@php($newsItem = current($news)) @php($podcast = current($podcasts)) @php($index = 0) @while($newsItem !== false || $podcast !== false) @if(++$index % 2 == 1) @if($index > 2)
@endif
@endif
@if($newsItem === false && ($index % 2) == 1)
@break @endif @if(($podcast !== false) && (($newsItem === false) || ($podcast->created >= $newsItem->published->setTime(0, 0, 0)))) @php($podcastsInBlock = []) @php($firstPodcast = $podcast) @while(($podcast !== false) && ($podcast->program == $firstPodcast->program) && ($podcast->created->format('d-m-Y') == $firstPodcast->created->format('d-m-Y'))) @php($podcastsInBlock[] = $podcast) @php($podcast = next($podcasts)) @endwhile

Audiofragment

@if(count($podcastsInBlock) == 1)

{{$firstPodcast->title}}

{!! $firstPodcast->excerpt() !!}

Luister fragment Meer fragmenten

@else

@if($firstPodcast->program) {{$firstPodcast->program->name}} @else Fragment gemist? @endif

@if(count($podcastsInBlock) < 3)
Fragment gemist
@endif

@if($firstPodcast->program) Over dit programma @endif Meer fragmenten

@endif
@if($newsItem === false)
@break @endif @elseif($newsItem !== false)

@if($newsItem->video) Video @else Nieuws @endif

@php($image = count($newsItem->images) ? $newsItem->images[0] : null) @if($image || $newsItem->video)
{{$image ? $image->title : 'Video'}}
@endif

{{$newsItem->title}}

@if($newsItem->edited) . @else . @endif

{{$newsItem->region->title}} | {!!Formatter::excerpt($newsItem->content, $image ? 200 : 500)!!}

{!! $newsItem->video ? " Bekijk video" : "Lees verder " !!} Meer nieuws

@php($newsItem = next($news)) @endif @endwhile
@include('banners')
@if(isset($comingUp) && count($comingUp) > 0)

Nu en straks op 6FM

Nu tot {{$comingUp[0]['end']->format('H:i')}} uur:
{{$comingUp[0]['program']->name}}

Straks op 6FM:

    @php($date = $comingUp[1]['start']->format('d-m-Y')) @for($i = 1, $printed = 0; $i < count($comingUp) && $printed < 3; ++$i) @if($comingUp[$i]['program']->priority > 2) @continue @endif @if($date != ($newDate = $comingUp[$i]['start']->format('d-m-Y'))) @php($date = $newDate)

{{ Formatter::fullDate($comingUp[$i]['start'], 'W') }}:

Meer programma's?
Programmaschema

@endif
@endsection