Sidebar widgets

This commit is contained in:
2020-01-24 23:37:19 +01:00
parent 29a447005c
commit d6a3f5e119
12 changed files with 217 additions and 630 deletions

View File

@@ -31,18 +31,19 @@ class Kernel extends ConsoleKernel
// Update latest news (3 items) // Update latest news (3 items)
$schedule->call(function() { $schedule->call(function() {
$latest_news = json_decode(file_get_contents($this->API_URL . 'nieuws/overzicht?pagina=1&aantal=3')); Storage::disk('local')->put('laatste_nieuws.json', file_get_contents($this->API_URL . 'nieuws/overzicht?pagina=1&aantal=3'));
Storage::disk('local')->put('populair_nieuws.json', file_get_contents($this->API_URL . 'nieuws/populair'));
$news = []; })->everyMinute();
foreach($latest_news->news as $item_data)
{ // Update now / later
$news[] = new \Model\NewsItem($item_data); $schedule->call(function() {
} Storage::disk('local')->put('nu_straks.json', file_get_contents($this->API_URL . 'programma/schema/nustraks'));
})->everyMinute();
Storage::disk('local')->put('laatste_nieuws.json', json_encode($news));
// Update latest podcasts (3 items)
$schedule->call(function() {
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=3'));
})->everyMinute(); })->everyMinute();
// $schedule->command('inspire')
// ->hourly();
} }
/** /**

View File

@@ -8,6 +8,8 @@ use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\View;
class Controller extends BaseController class Controller extends BaseController
{ {
@@ -15,9 +17,44 @@ class Controller extends BaseController
protected $API_URL; protected $API_URL;
private function getDataFromFileAndConvert($file, $path, $class)
{
$data = json_decode(Storage::disk('local')->get($file));
foreach($path as $subobject) { $data = $data->$subobject; }
$items = [];
foreach($data as $item_data)
{
$items[] = new $class($item_data);
}
return $items;
}
public function __construct() public function __construct()
{ {
\Illuminate\Support\Facades\View::share('apiUrl', $this->API_URL = env('API_URL', 'http://api.6fm.nl/')); View::share('apiUrl', $this->API_URL = env('API_URL', 'http://api.6fm.nl/'));
View::composer('widgets.laatstenieuws', function($view) {
$view->with('data', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'));
});
View::composer('widgets.populairnieuws', function($view) {
$view->with('data', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem'));
});
View::composer('widgets.nustraks', function($view) {
$data = json_decode(Storage::disk('local')->get('nu_straks.json'))->schedule;
$programs = [];
foreach($data as $item_data)
{
$programs[] = $program = new \Model\Program($item_data->program);
$program->start = new \DateTimeImmutable($item_data->start->date, new \DateTimeZone($item_data->start->timezone));
$program->end = new \DateTimeImmutable($item_data->end->date, new \DateTimeZone($item_data->end->timezone));
}
$view->with('data', $programs);
});
View::composer('widgets.laatstepodcasts', function($view) {
$view->with('data', $this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
});
} }
protected function registerView(Request $request, $type, $id) protected function registerView(Request $request, $type, $id)

View File

@@ -135,6 +135,10 @@ button[disabled]:hover
padding-top: 5px; padding-top: 5px;
} }
.blog.small .post img {
width: 100px;
}
.post.single { .post.single {
width: 100%; width: 100%;
} }
@@ -201,4 +205,6 @@ button[disabled]:hover
background-color: #E4E4E4; background-color: #E4E4E4;
} }
.text-muted {
color: #7C7C7C;
}

View File

@@ -249,7 +249,7 @@
</a> </a>
</li>--> </li>-->
</ul> </ul>
@include('widgets/laatstenieuws') @include('widgets.laatstenieuws')
</div> </div>
</div> </div>
<style> <style>
@@ -277,7 +277,7 @@
</div> </div>
</div> </div>
<div class="menu_container sticky clearfix"> <div class="menu_container sticky clearfix">
@include('widgets/menu') @include('widgets.menu')
</div> </div>
<!-- Content --> <!-- Content -->

View File

@@ -17,295 +17,16 @@
</div> </div>
<div class="column column_1_3"> <div class="column column_1_3">
<h4 class="box_header">Recommended</h4> @include('widgets.nustraks')
<ul class="blog small_margin clearfix">
<li class="post">
<a href="?page=post_gallery" title="The Public Health Crisis Hiding in Our Food">
<span class="icon gallery"></span>
<img src='images/samples/510x187/image_12.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_gallery" title="The Public Health Crisis Hiding in Our Food">The Public Health Crisis Hiding in Our Food</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post" title="The Public Health Crisis Hiding in Our Food">
<img src='images/samples/510x187/image_01.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post" title="The Public Health Crisis Hiding in Our Food">Climate Change Debate While Britain Floods</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">
<img src='images/samples/510x187/image_14.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
</ul>
<h4 class="box_header page_margin_top_section">Latest Posts</h4>
<div class="vertical_carousel_container clearfix">
<ul class="blog small vertical_carousel autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
<li class="post">
<a href="?page=post_gallery" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">
<span class="icon small gallery"></span>
<img src='images/samples/100x100/image_06.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_gallery" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post" title="Syrian Civilians Trapped For Months Continue To Be Evacuated">
<img src='images/samples/100x100/image_12.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post" title="Syrian Civilians Trapped For Months Continue To Be Evacuated">Syrian Civilians Trapped For Months Continue To Be Evacuated</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post_small_image" title="Built on Brotherhood, Club Lives Up to Name">
<img src='images/samples/100x100/image_02.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_small_image" title="Built on Brotherhood, Club Lives Up to Name">Built on Brotherhood, Club Lives Up to Name</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=sports" title="SPORTS">SPORTS</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post_quote" title="Nuclear Fusion Closer to Becoming a Reality">
<img src='images/samples/100x100/image_13.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_quote" title="Nuclear Fusion Closer to Becoming a Reality">Nuclear Fusion Closer to Becoming a Reality</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="tabs no_scroll page_margin_top_section clearfix">
<ul class="tabs_navigation clearfix">
<li>
<a href="#sidebar-most-read" title="Most Read">
Most Read
</a>
<span></span>
</li>
<li>
<a href="#sidebar-most-commented" title="Commented">
Commented
</a>
<span></span>
</li>
</ul>
<div id="sidebar-most-read">
<ul class="blog rating page_margin_top clearfix">
<li class="post">
<a href="?page=post" title="Nuclear Fusion Closer to Becoming a Reality">
<img src='images/samples/510x187/image_12.jpg' alt='img'>
</a>
<div class="post_content">
<span class="number animated_element" data-value="6 257"></span>
<h5><a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="5 062"></span>
<h5><a href="?page=post_small_image" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="4 778"></span>
<h5><a href="?page=post" title="Seeking the Right Chemistry, Drug Makers Hunt for Mergers">Seeking the Right Chemistry, Drug Makers Hunt for Mergers</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=sports" title="SPORTS">SPORTS</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="754"></span>
<h5><a href="?page=post_soundcloud" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="52"></span>
<h5><a href="?page=post" title="Syrian Civilians Trapped for Months Continue to be Evacuated">Syrian Civilians Trapped for Months Continue to be Evacuated</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
</ul>
<a class="more page_margin_top" href="#">SHOW MORE</a>
</div>
<div id="sidebar-most-commented">
<ul class="blog rating page_margin_top clearfix">
<li class="post">
<a href="?page=post_small_image" title="Nuclear Fusion Closer to Becoming a Reality">
<img src='images/samples/510x187/image_02.jpg' alt='img'>
</a>
<div class="post_content">
<span class="number animated_element" data-value="70"></span>
<h5><a href="?page=post_small_image" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="62"></span>
<h5><a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="30"></span>
<h5><a href="?page=post_quote" title="Seeking the Right Chemistry, Drug Makers Hunt for Mergers">Seeking the Right Chemistry, Drug Makers Hunt for Mergers</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=sports" title="SPORTS">SPORTS</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="25"></span>
<h5><a href="?page=post_small_image" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="4"></span>
<h5><a href="?page=post" title="Syrian Civilians Trapped for Months Continue to be Evacuated">Syrian Civilians Trapped for Months Continue to be Evacuated</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
</ul>
<a class="more page_margin_top" href="#">SHOW MORE</a>
</div>
</div>
<h4 class="box_header page_margin_top_section">Top Authors</h4>
<ul class="authors rating clearfix">
<li class="author">
<a class="thumb" href="?page=author" title="Debora Hilton">
<img src='images/samples/Team_100x100/image_01.jpg' alt='img'>
<span class="number animated_element" data-value="34"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Debora Hilton">Debora Hilton</a></h5>
<h6>EDITOR</h6>
</div>
</li>
<li class="author">
<a class="thumb" href="?page=author" title="Anna Shubina">
<img src='images/samples/Team_100x100/image_02.jpg' alt='img'>
<span class="number animated_element" data-value="25"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Anna Shubina">Anna Shubina</a></h5>
<h6>EDITOR</h6>
</div>
</li>
<li class="author">
<a class="thumb" href="?page=author" title="Liam Holden">
<img src='images/samples/Team_100x100/image_03.jpg' alt='img'>
<span class="number animated_element" data-value="9"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Liam Holden">Liam Holden</a></h5>
<h6>PUBLISHER</h6>
</div>
</li>
<li class="author">
<a class="thumb" href="?page=author" title="Heather Dale">
<img src='images/samples/Team_100x100/image_04.jpg' alt='img'>
<span class="number animated_element" data-value="2"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Heather Dale">Heather Dale</a></h5>
<h6>ILLUSTRATOR</h6>
</div>
</li>
</ul>
</div>
<h4 class="page_margin_top box_header"><span class="fa fa-history"></span> &nbsp; Laatste podcasts</h4>
@include('widgets.laatstepodcasts')
<a class="more page_margin_top" href="{{url('radio/gemist')}}">Meer Fragment Gemist</a>
<h4 class="page_margin_top box_header"><span class="fa fa-fire"></span> &nbsp; Meest gelezen</h4>
@include('widgets.populairnieuws')
<a class="more page_margin_top" href="{{url('nieuws')}}">Laatste nieuws</a>
</div>
</div> </div>
</div> </div>

View File

@@ -4,11 +4,22 @@
@if($title) {{$title}} - Nieuws @endif @if($title) {{$title}} - Nieuws @endif
@endsection @endsection
@section('breadcrumb')
@if($title)
<ul class="bread_crumb" style="margin-top: -10px; margin-bottom: 4px; ">
<li><a title="Nieuws" href="{{url('nieuws')}}">Nieuws</a></li>
<li class="separator icon_small_arrow right_gray">&nbsp;</li>
<li>{{$title}}</li>
</ul>
@endif
@endsection
@section('content') @section('content')
@php($imgBase = 'https://nhgooi.nl') @php($imgBase = 'https://nhgooi.nl')
@parent
@yield('breadcrumb')
<div class="page">
<div class="page_layout page_margin_top clearfix"> <div class="page_layout page_margin_top clearfix">
<div class="row"> <div class="row">
<div class="column column_1_1"> <div class="column column_1_1">
@@ -161,314 +172,38 @@
</div> </div>
<div class="column column_1_3"> <div class="column column_1_3">
<div class="tabs no_scroll clearfix"> <h4 class="box_header"><span class="fa fa-fire"></span> &nbsp; Meest gelezen</h4>
<ul class="tabs_navigation clearfix"> @include('widgets.populairnieuws')
<li>
<a href="#sidebar-most-read" title="Most Read">
Most Read <h4 class="page_margin_top box_header"><span class="fa fa-history"></span> &nbsp; Laatste podcasts</h4>
</a> @include('widgets.laatstepodcasts')
<span></span> <a class="more page_margin_top" href="{{url('radio/gemist')}}">Meer Fragment Gemist</a>
</li>
<li>
<a href="#sidebar-most-commented" title="Commented"> @if(!$title)
Commented <h4 class="page_margin_top box_header"><span class="fa fa-tag"></span> &nbsp; Recente berichten</h4>
</a> <?php
<span></span> $regions = [];
</li> $themes = [];
</ul> foreach($news as $item) {
<div id="sidebar-most-read"> $regions[$item->region->slug] = $item->region->title;
<ul class="blog rating page_margin_top clearfix"> $themes[$item->theme->slug] = $item->theme->title;
<li class="post"> }
<a href="?page=post" title="Nuclear Fusion Closer to Becoming a Reality"> ?>
<img src='images/samples/510x187/image_12.jpg' alt='img'>
</a> <ul class="taxonomies clearfix page_margin_top">
<div class="post_content"> @foreach($regions as $slug => $title)
<span class="number animated_element" data-value="6 257"></span> <li><a href="{{url('nieuws/regio/' . $slug)}}" title="Meer nieuws uit regio {{$title}}"><span class="fa fa-map-marker"></span> {{$title}}</a></li>
<h5><a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5> @endforeach
<ul class="post_details simple"> @foreach($themes as $slug => $title)
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li> <li class="active"><a href="{{url('nieuws/thema/' . $slug)}}" title="Meer nieuws met thema {{$title}}"><span class="fa fa-tag"></span> {{$title}}</a></li>
</ul> @endforeach
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="5 062"></span>
<h5><a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="4 778"></span>
<h5><a href="?page=post" title="Seeking the Right Chemistry, Drug Makers Hunt for Mergers">Seeking the Right Chemistry, Drug Makers Hunt for Mergers</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=sports" title="SPORTS">SPORTS</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="754"></span>
<h5><a href="?page=post" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="52"></span>
<h5><a href="?page=post" title="Syrian Civilians Trapped for Months Continue to be Evacuated">Syrian Civilians Trapped for Months Continue to be Evacuated</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
</ul>
<a class="more page_margin_top" href="#">SHOW MORE</a>
</div>
<div id="sidebar-most-commented">
<ul class="blog rating page_margin_top clearfix">
<li class="post">
<a href="?page=post" title="Nuclear Fusion Closer to Becoming a Reality">
<img src='images/samples/510x187/image_02.jpg' alt='img'>
</a>
<div class="post_content">
<span class="number animated_element" data-value="70"></span>
<h5><a href="?page=post" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="62"></span>
<h5><a href="?page=post_small_image" title="New Painkiller Rekindles Addiction Concerns">New Painkiller Rekindles Addiction Concerns</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="30"></span>
<h5><a href="?page=post_quote_2" title="Seeking the Right Chemistry, Drug Makers Hunt for Mergers">Seeking the Right Chemistry, Drug Makers Hunt for Mergers</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=sports" title="SPORTS">SPORTS</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="25"></span>
<h5><a href="?page=post" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
<li class="post">
<div class="post_content">
<span class="number animated_element" data-value="4"></span>
<h5><a href="?page=post" title="Syrian Civilians Trapped for Months Continue to be Evacuated">Syrian Civilians Trapped for Months Continue to be Evacuated</a></h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
</ul>
</div>
</li>
</ul>
<a class="more page_margin_top" href="#">SHOW MORE</a>
</div>
</div>
<h4 class="box_header page_margin_top_section">Latest Posts</h4>
<div class="vertical_carousel_container clearfix">
<ul class="blog small vertical_carousel autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
<li class="post">
<a href="?page=post_gallery" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">
<span class="icon small gallery"></span>
<img src='images/samples/100x100/image_06.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_gallery" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=health" title="HEALTH">HEALTH</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post" title="Syrian Civilians Trapped For Months Continue To Be Evacuated">
<img src='images/samples/100x100/image_12.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post" title="Syrian Civilians Trapped For Months Continue To Be Evacuated">Syrian Civilians Trapped For Months Continue To Be Evacuated</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=world" title="WORLD">WORLD</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post_soundcloud" title="Built on Brotherhood, Club Lives Up to Name">
<img src='images/samples/100x100/image_02.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_soundcloud" title="Built on Brotherhood, Club Lives Up to Name">Built on Brotherhood, Club Lives Up to Name</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=sports" title="SPORTS">SPORTS</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post" title="Nuclear Fusion Closer to Becoming a Reality">
<img src='images/samples/100x100/image_13.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post" title="Nuclear Fusion Closer to Becoming a Reality">Nuclear Fusion Closer to Becoming a Reality</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
</ul>
</div>
<h4 class="box_header page_margin_top_section">Top Authors</h4>
<ul class="authors rating clearfix">
<li class="author">
<a class="thumb" href="?page=author" title="Debora Hilton">
<img src='images/samples/Team_100x100/image_01.jpg' alt='img'>
<span class="number animated_element" data-value="34"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Debora Hilton">Debora Hilton</a></h5>
<h6>EDITOR</h6>
</div>
</li>
<li class="author">
<a class="thumb" href="?page=author" title="Anna Shubina">
<img src='images/samples/Team_100x100/image_02.jpg' alt='img'>
<span class="number animated_element" data-value="25"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Anna Shubina">Anna Shubina</a></h5>
<h6>EDITOR</h6>
</div>
</li>
<li class="author">
<a class="thumb" href="?page=author" title="Liam Holden">
<img src='images/samples/Team_100x100/image_03.jpg' alt='img'>
<span class="number animated_element" data-value="9"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Liam Holden">Liam Holden</a></h5>
<h6>PUBLISHER</h6>
</div>
</li>
<li class="author">
<a class="thumb" href="?page=author" title="Heather Dale">
<img src='images/samples/Team_100x100/image_04.jpg' alt='img'>
<span class="number animated_element" data-value="2"></span>
</a>
<div class="details">
<h5><a href="?page=author" title="Heather Dale">Heather Dale</a></h5>
<h6>ILLUSTRATOR</h6>
</div>
</li>
</ul> </ul>
<h4 class="box_header page_margin_top_section">Science</h4> @endif
<ul class="blog small clearfix">
<li class="post">
<a href="?page=post_small_image" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">
<img src='images/samples/100x100/image_09.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_small_image" title="Study Linking Illnes and Salt Leaves Researchers Doubtful">Study Linking Illnes and Salt Leaves Researchers Doubtful</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post_quote" title="Syrian Civilians Trapped For Months Continue To Be Evacuated">
<img src='images/samples/100x100/image_12.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_quote" title="Syrian Civilians Trapped For Months Continue To Be Evacuated">Syrian Civilians Trapped For Months Continue To Be Evacuated</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post" title="Built on Brotherhood, Club Lives Up to Name">
<img src='images/samples/100x100/image_02.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post" title="Built on Brotherhood, Club Lives Up to Name">Built on Brotherhood, Club Lives Up to Name</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
<li class="post">
<a href="?page=post_gallery" title="Nuclear Fusion Closer to Becoming a Reality">
<span class="icon small gallery"></span>
<img src='images/samples/100x100/image_01.jpg' alt='img'>
</a>
<div class="post_content">
<h5>
<a href="?page=post_gallery" title="Nuclear Fusion Closer to Becoming a Reality">Nuclear Fusion Closer to Becoming a Reality</a>
</h5>
<ul class="post_details simple">
<li class="category"><a href="?page=category&amp;cat=science" title="SCIENCE">SCIENCE</a></li>
<li class="date">
10:11 PM, Feb 02
</li>
</ul>
</div>
</li>
</ul>
<a class="more page_margin_top" href="#">MORE FROM SCIENCE</a>
</div> </div>
</div> </div>
</div> </div>
</div>
@endsection @endsection
@section('oud') @section('oud')

View File

@@ -33,12 +33,15 @@
@endif @endif
@php($durationToday = ($hour + $duration <= 24) ? $duration : (24 - $hour)) @php($durationToday = ($hour + $duration <= 24) ? $duration : (24 - $hour))
<a href="{{url('/radio/programma' . $item['program']->url)}}" class="program{{$class}}" style="height: {{$durationToday * $pixelsPerHour - 2 * $border - $margin}}px;"> <a href="{{url('/radio/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">{{$item['program']->name}}</div> <div class="program-title">{{$item['program']->name}}</div>
@if($isCurrent) <div class="current-marker"><span>Nu op NH Gooi</span></div> @endif @if($isCurrent) <div class="current-marker"><span>Nu op NH Gooi</span></div> @endif
<div class="program-content"> <div class="program-content">
<div class="program-times"><span class="fa fa-clock"></span> {{$item['starttime']->format('H:i')}} &ndash; {{$item['endtime']->format('H:i')}} uur.</div> <div class="program-times"><span class="fa fa-clock"></span> {{$item['starttime']->format('H:i')}} &ndash; {{$item['endtime']->format('H:i')}}</div>
<div>{{Formatter::excerpt($item['program']->description, 150)}}</div> @if($item['program']->tagline)
<hr/>
<div class="tagline">{{$item['program']->tagline}}</div>
@endif
</div> </div>
</a> </a>
@php($hour += $durationToday) @php($hour += $durationToday)

View File

@@ -177,7 +177,19 @@
} }
.schedule .program .program-content { .schedule .program .program-content {
margin: 3px;
text-align: center;
}
.schedule .program .tagline {
font-size: 90%;
}
.schedule .program hr {
margin: 3px; margin: 3px;
border: none;
border-top: 1px solid #03A6E0;
border-radius: 5px;
} }
</style> </style>
@endpush @endpush

View File

@@ -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"> <div class="latest_news_scrolling_list_container">
<ul> <ul>
<li class="category">Laatste nieuws:</li> <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="right"><a href="#"></a></li>
<li class="posts"> <li class="posts">
<ul class="latest_news_scrolling_list"> <ul class="latest_news_scrolling_list">
@foreach($latest_news as $item) @foreach($data as $item)
@php($item = new \Model\NewsItem($item))
<li> <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> <span class="when">{{Formatter::relativeDate($item->published)}} {{$item->published->format('H:i')}}</span>
</li> </li>
@endforeach @endforeach

View 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>

View File

@@ -0,0 +1,43 @@
<h4 class="box_header"><span class="fa fa-music"></span> &nbsp; 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>

View 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>