Regioagenda in sidebar
This commit is contained in:
@@ -44,6 +44,11 @@ class Kernel extends ConsoleKernel
|
|||||||
$schedule->call(function() {
|
$schedule->call(function() {
|
||||||
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=3'));
|
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=3'));
|
||||||
})->everyMinute();
|
})->everyMinute();
|
||||||
|
|
||||||
|
// Update calendar items
|
||||||
|
$schedule->call(function() {
|
||||||
|
Storage::disk('local')->put('regioagenda.json', file_get_contents($this->API_URL . 'agenda/overzicht'));
|
||||||
|
})->everyMinute();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ class Controller extends BaseController
|
|||||||
View::composer('widgets.laatstepodcasts', function($view) {
|
View::composer('widgets.laatstepodcasts', function($view) {
|
||||||
$view->with('data', $this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
|
$view->with('data', $this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
|
||||||
});
|
});
|
||||||
|
View::composer('widgets.regioagenda', function($view) {
|
||||||
|
$view->with('data', $this->getDataFromFileAndConvert('regioagenda.json', [], '\Model\CalendarEvent'));
|
||||||
|
});
|
||||||
View::composer('widgets.menu', function($view) {
|
View::composer('widgets.menu', function($view) {
|
||||||
$view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'))
|
$view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'))
|
||||||
->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem', 3))
|
->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem', 3))
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
@@ -26,6 +26,10 @@
|
|||||||
<h4 class="page_margin_top box_header"><span class="fa fa-fire"></span> Meest gelezen</h4>
|
<h4 class="page_margin_top box_header"><span class="fa fa-fire"></span> Meest gelezen</h4>
|
||||||
@include('widgets.populairnieuws')
|
@include('widgets.populairnieuws')
|
||||||
<a class="more page_margin_top" href="{{url('nieuws')}}">Laatste nieuws</a>
|
<a class="more page_margin_top" href="{{url('nieuws')}}">Laatste nieuws</a>
|
||||||
|
|
||||||
|
<h4 class="page_margin_top box_header"><span class="fa fa-calendar"></span> Regioagenda</h4>
|
||||||
|
@include('widgets.regioagenda')
|
||||||
|
<a class="more page_margin_top" href="{{url('agenda')}}">Regio-agenda</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -183,6 +183,9 @@
|
|||||||
@include('widgets.laatstepodcasts')
|
@include('widgets.laatstepodcasts')
|
||||||
<a class="more page_margin_top" href="{{url('radio/gemist')}}">Meer Fragment Gemist</a>
|
<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-calendar"></span> Regioagenda</h4>
|
||||||
|
@include('widgets.regioagenda')
|
||||||
|
<a class="more page_margin_top" href="{{url('agenda')}}">Regio-agenda</a>
|
||||||
|
|
||||||
@if(!$title)
|
@if(!$title)
|
||||||
<h4 class="page_margin_top box_header"><span class="fa fa-tag"></span> Recente berichten</h4>
|
<h4 class="page_margin_top box_header"><span class="fa fa-tag"></span> Recente berichten</h4>
|
||||||
|
|||||||
24
website/resources/views/widgets/regioagenda.blade.php
Normal file
24
website/resources/views/widgets/regioagenda.blade.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<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 $item)
|
||||||
|
@if($loop->index >= 5) @break @endif
|
||||||
|
<li class="post">
|
||||||
|
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||||
|
<img src="{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}" alt="{{$item->title}}">
|
||||||
|
</a>
|
||||||
|
<div class="post_content">
|
||||||
|
<h5>
|
||||||
|
<a href="{{url($item->url)}}" title="{{$item->title}}">{{$item->title}}</a>
|
||||||
|
</h5>
|
||||||
|
<ul class="post_details simple">
|
||||||
|
<li class="category">{{$item->region}}</a></li>
|
||||||
|
<li class="date">
|
||||||
|
{{Formatter::relativeDate($item->starts)}} om {{$item->starts->format('H:i')}} uur
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
Reference in New Issue
Block a user