Now playing en mega menu
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
</a>
|
||||
<div class="post_content">
|
||||
<h5>
|
||||
<a href="{{url($podcast->url)}}" title="{{$podcast->title}}">{{$podcast->title}}</a>
|
||||
<a href="{{url('radio/gemist/fragment/' . $podcast->url)}}" title="{{$podcast->title}}">{{$podcast->title}}</a>
|
||||
</h5>
|
||||
<ul class="post_details simple">
|
||||
<li class="category"><a href="{{url($podcast->program->url)}}" title="{{$podcast->program->name}}">{{$podcast->program->name}}</a></li>
|
||||
<li class="category"><a href="{{url('radio/gemist/programma' . $podcast->program->url)}}" title="{{$podcast->program->name}}">{{$podcast->program->name}}</a></li>
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($podcast->created)}}
|
||||
</li>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php $menu = array(
|
||||
"Nieuws" => "/nieuws",
|
||||
"Radio" => array(
|
||||
"" => "/radio",
|
||||
"Luister live" => "/luister/live",
|
||||
@@ -12,6 +11,7 @@
|
||||
"Regioagenda" => "/agenda",
|
||||
"Contact" => "/contact");
|
||||
?>
|
||||
@php($imgBase = 'https://nhgooi.nl')
|
||||
<?php
|
||||
function isActive($link, $checksubmenus) {
|
||||
if(is_array($link)) {
|
||||
@@ -50,8 +50,96 @@ function buildMenu($menu, $ismobile) {
|
||||
}
|
||||
?>
|
||||
<nav>
|
||||
<!-- TODO: Mark selected, recursive menus, listen / watch icons -->
|
||||
<ul class="sf-menu">
|
||||
@php($newsUrl = '/nieuws')
|
||||
@if($news)
|
||||
<li class="submenu mega_menu_parent {{isActive($newsUrl, false) ? "selected" : ""}}">
|
||||
<a href="{{$newsUrl}}" title="Nieuws">
|
||||
Nieuws
|
||||
</a>
|
||||
<ul>
|
||||
<li class="submenu">
|
||||
<a href="{{$newsUrl}}" title="Laatste nieuws">
|
||||
Laatste nieuws
|
||||
</a>
|
||||
<ul class="mega_menu blog">
|
||||
@foreach($news as $item)
|
||||
<li class="post">
|
||||
@if($item->images && count($item->images))
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||
<img src='{{$imgBase . $item->images[0]->url}}' alt='{{$item->title}}'>
|
||||
</a>
|
||||
@endif
|
||||
<h5><a href="{{url($item->url)}}" title="{{$item->title}}">{{$item->title}}</a></h5>
|
||||
<ul class="post_details simple">
|
||||
<li class="category">{{$item->region->title}}</li>
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($item->published)}} om {{$item->published->format('H:i')}} uur
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@if($popular)
|
||||
<li class="submenu">
|
||||
<a href="{{$newsUrl}}" title="Meest gelezen">
|
||||
Meest gelezen
|
||||
</a>
|
||||
<ul class="mega_menu blog">
|
||||
@foreach($popular as $item)
|
||||
<li class="post">
|
||||
@if($item->images && count($item->images))
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||
<img src='{{$imgBase . $item->images[0]->url}}' alt='{{$item->title}}'>
|
||||
</a>
|
||||
@endif
|
||||
<h5><a href="{{url($item->url)}}" title="{{$item->title}}">{{$item->title}}</a></h5>
|
||||
<ul class="post_details simple">
|
||||
<li class="category">{{$item->region->title}}</li>
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($item->published)}}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
@if($podcasts)
|
||||
<li class="submenu">
|
||||
<a href="{{url('/radio/gemist')}}" title="Fragment gemist">
|
||||
Fragment gemist
|
||||
</a>
|
||||
<ul class="mega_menu blog">
|
||||
@foreach($podcasts as $item)
|
||||
<li class="post">
|
||||
@if($item->image)
|
||||
<a href="{{url('/radio/gemist/fragment/' . $item->url)}}" title="{{$item->title}}">
|
||||
<img src='{{$imgBase . $item->image->url}}' alt='{{$item->title}}'>
|
||||
</a>
|
||||
@endif
|
||||
<h5><a href="{{url($item->url)}}" title="{{$item->title}}">{{$item->title}}</a></h5>
|
||||
<ul class="post_details simple">
|
||||
@if($item->program)
|
||||
<li class="category">{{$item->program->name}}</li>
|
||||
@endif
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($item->created)}}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</li>
|
||||
@else
|
||||
<li class="{{isActive($newsUrl, false) ? "selected" : ""}}">
|
||||
<a href="{{$newsUrl}}" title="Nieuws">Nieuws</a>
|
||||
</li>
|
||||
@endif
|
||||
{!! buildMenu($menu, false) !!}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h4 class="box_header"><span class="fa fa-music"></span> Nu op NH Gooi Radio</h4>
|
||||
<h4 class="page_margin_top box_header"><span class="fa fa-music"></span> Nu op NH Gooi Radio</h4>
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
@php($startDay = $program->start->format('d'))
|
||||
@foreach($data as $program)
|
||||
@php($isToday = $program->start->format('d') == $startDay)
|
||||
@if($loop->index > 10)
|
||||
@if($loop->index > 5)
|
||||
@break
|
||||
@elseif(($loop->index > 3) && (!$isToday) && $program->nonstop)
|
||||
@elseif(($loop->index >= 3) && $program->nonstop)
|
||||
@break
|
||||
@elseif(!$loop->first)
|
||||
<li class="bullet style_2"><a href="{{url($program->url)}}" title="{{$program->name}}">
|
||||
@@ -37,6 +37,7 @@
|
||||
@if($program->tagline)
|
||||
<li class="bullet text-muted">{{$program->tagline}}</li>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user