Sidebar widgets
This commit is contained in:
@@ -1,18 +1,3 @@
|
||||
<?php
|
||||
/*
|
||||
$latest_news = json_decode(file_get_contents('http://api-dev.6fm.nl/nieuws/overzicht?pagina=1&aantal=3'))->news;
|
||||
|
||||
$news = [];
|
||||
foreach($latest_news as $raw)
|
||||
{
|
||||
$news[] = new \Model\NewsItem($raw);
|
||||
}
|
||||
Storage::disk('local')->put('laatste_nieuws.json', json_encode($news));
|
||||
*/
|
||||
|
||||
$latest_news = json_decode(Storage::disk('local')->get('laatste_nieuws.json'));
|
||||
?>
|
||||
|
||||
<div class="latest_news_scrolling_list_container">
|
||||
<ul>
|
||||
<li class="category">Laatste nieuws:</li>
|
||||
@@ -20,10 +5,9 @@ $latest_news = json_decode(Storage::disk('local')->get('laatste_nieuws.json'));
|
||||
<li class="right"><a href="#"></a></li>
|
||||
<li class="posts">
|
||||
<ul class="latest_news_scrolling_list">
|
||||
@foreach($latest_news as $item)
|
||||
@php($item = new \Model\NewsItem($item))
|
||||
@foreach($data as $item)
|
||||
<li>
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{{Formatter::excerpt($item->title, 70)}}</a>
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{{substr($item->title, 0, 60)}}{{strlen($item->title) < 60 ? "" : "..."}}</a>
|
||||
<span class="when">{{Formatter::relativeDate($item->published)}} {{$item->published->format('H:i')}}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
21
website/resources/views/widgets/laatstepodcasts.blade.php
Normal file
21
website/resources/views/widgets/laatstepodcasts.blade.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<ul class="blog small clearfix">
|
||||
@foreach($data as $podcast)
|
||||
<li class="post">
|
||||
<a href="{{url($podcast->url)}}" title="{{$podcast->title}}">
|
||||
<img src="{{$podcast->image ? $podcast->image->url : '/images/podcast.png'}}" alt="{{$podcast->title}}">
|
||||
</a>
|
||||
<div class="post_content">
|
||||
<h5>
|
||||
<a href="{{url($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="date">
|
||||
{{Formatter::relativeDate($podcast->created)}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
43
website/resources/views/widgets/nustraks.blade.php
Normal file
43
website/resources/views/widgets/nustraks.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<h4 class="box_header"><span class="fa fa-music"></span> Nu op NH Gooi Radio</h4>
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
@php($program = $data[0])
|
||||
<ul class="blog podcasts">
|
||||
<li class="post">
|
||||
<div class="post_content">
|
||||
<h2><a href="{{url($program->url)}}" title="{{$program->name}}">{{$program->name}}</a></h2>
|
||||
@if($program->tagline)
|
||||
<p>{{$program->tagline}}</p>
|
||||
@endif
|
||||
<a class="action_button" style="margin-top: 0;" href="{{url('radio/luister/live')}}" title="Luister live">
|
||||
<span class="fa fa-play"></span>
|
||||
<span>Luister live tot {{$program->end->format('H:i')}} uur.</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<h5 class="page_margin_top">Daarna:</h5>
|
||||
<ul class="list no_border spacing">
|
||||
@php($startDay = $program->start->format('d'))
|
||||
@foreach($data as $program)
|
||||
@php($isToday = $program->start->format('d') == $startDay)
|
||||
@if($loop->index > 10)
|
||||
@break
|
||||
@elseif(($loop->index > 3) && (!$isToday) && $program->nonstop)
|
||||
@break
|
||||
@elseif(!$loop->first)
|
||||
<li class="bullet style_2"><a href="{{url($program->url)}}" title="{{$program->name}}">
|
||||
<b>{{$program->name}}</b></a> |
|
||||
<span class="text-muted">{{Formatter::relativeDate($program->start)}} om {{$program->start->format('H:i')}}.</span>
|
||||
</li>
|
||||
@if($program->tagline)
|
||||
<li class="bullet text-muted">{{$program->tagline}}</li>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
24
website/resources/views/widgets/populairnieuws.blade.php
Normal file
24
website/resources/views/widgets/populairnieuws.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
@php($imgBase = '//nhgooi.nl')
|
||||
<div class="vertical_carousel_container clearfix">
|
||||
<ul class="blog small vertical_carousel autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||
@foreach($data as $news)
|
||||
<li class="post">
|
||||
<a href="{{url($news->url)}}" title="{{$news->title}}">
|
||||
<img src="{{$news->images && count($news->images) ? $imgBase . $news->images[0]->url : '/images/noimage.png'}}" alt="{{$news->title}}">
|
||||
</a>
|
||||
<div class="post_content">
|
||||
<h5>
|
||||
<a href="{{url($news->url)}}" title="{{$news->title}}">{{$news->title}}</a>
|
||||
</h5>
|
||||
<ul class="post_details simple">
|
||||
<li class="category"><a href="{{url('nieuws/regio/' . $news->region->slug)}}" title="{{$news->region->title}}">{{$news->region->title}}</a></li>
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($news->published)}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user