Liveblog - start work
This commit is contained in:
@@ -9,15 +9,18 @@ class HomeController extends Controller
|
|||||||
{
|
{
|
||||||
public function show(Request $request)
|
public function show(Request $request)
|
||||||
{
|
{
|
||||||
$page = (int)$request->get('pagina', 1);
|
$page = (int) $request->get('pagina', 1);
|
||||||
$apiResult = $this->API('nieuws/overzicht?pagina=' . (int)max(1, $page) . '&aantal=10');
|
$apiResult = $this->API('nieuws/overzicht?pagina=' . (int) max(1, $page) . '&aantal=10');
|
||||||
$news = [];
|
$news = [];
|
||||||
foreach ($apiResult->news as $newsItem) {
|
foreach ($apiResult->news as $newsItem) {
|
||||||
$news[] = new \Model\NewsItem($newsItem);
|
$news[] = new \Model\NewsItem($newsItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$apiResult = $this->API('nieuws/liveblogs');
|
||||||
|
$liveblogs = $apiResult->liveblogs;
|
||||||
|
|
||||||
$populair = [];
|
$populair = [];
|
||||||
$apiResult = $this->API('nieuws/populair?pagina=' . (int)max(1, $page) . '&aantal=5');
|
$apiResult = $this->API('nieuws/populair?pagina=' . (int) max(1, $page) . '&aantal=5');
|
||||||
foreach ($apiResult->news as $newsItem) {
|
foreach ($apiResult->news as $newsItem) {
|
||||||
$populair[] = new \Model\NewsItem($newsItem);
|
$populair[] = new \Model\NewsItem($newsItem);
|
||||||
}
|
}
|
||||||
@@ -25,6 +28,6 @@ class HomeController extends Controller
|
|||||||
$apiResult = $this->API('podcast/overzicht?aantal=15');
|
$apiResult = $this->API('podcast/overzicht?aantal=15');
|
||||||
$index = array_rand($apiResult->podcasts);
|
$index = array_rand($apiResult->podcasts);
|
||||||
$podcast = new \Model\Podcast($apiResult->podcasts[$index]);
|
$podcast = new \Model\Podcast($apiResult->podcasts[$index]);
|
||||||
return view('home', ['populair' => $populair, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
|
return view('home', ['populair' => $populair, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'liveblogs' => $liveblogs, 'searchURL' => 'nieuws/zoeken']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class NewsController extends Controller
|
|||||||
{
|
{
|
||||||
parent::registerView($request, 'nieuws', $id);
|
parent::registerView($request, 'nieuws', $id);
|
||||||
$preview = "";
|
$preview = "";
|
||||||
if(request()->get('preview', null) != null) {
|
if (request()->get('preview', null) != null) {
|
||||||
$preview = "?preview=" . request()->get('preview');
|
$preview = "?preview=" . request()->get('preview');
|
||||||
}
|
}
|
||||||
$apiResult = $this->API('nieuws/bericht/' . $id . $preview);
|
$apiResult = $this->API('nieuws/bericht/' . $id . $preview);
|
||||||
@@ -26,10 +26,11 @@ class NewsController extends Controller
|
|||||||
|
|
||||||
switch ($apiResult->version) {
|
switch ($apiResult->version) {
|
||||||
case 1:
|
case 1:
|
||||||
if (!$newsItem->content) return redirect('//nhnieuws.nl/gooi');
|
if (!$newsItem->content)
|
||||||
|
return redirect('//nhnieuws.nl/gooi');
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if(isset($apiResult->source->article)) {
|
if (isset($apiResult->source->article)) {
|
||||||
$source = $apiResult->source->article;
|
$source = $apiResult->source->article;
|
||||||
$newsItem->published = self::TimestampToDateTime($source->created);
|
$newsItem->published = self::TimestampToDateTime($source->created);
|
||||||
$newsItem->edited = self::TimestampToDateTime($source->updated);
|
$newsItem->edited = self::TimestampToDateTime($source->updated);
|
||||||
@@ -37,7 +38,7 @@ class NewsController extends Controller
|
|||||||
$newsItem->images = null; // Images will be embedded
|
$newsItem->images = null; // Images will be embedded
|
||||||
$newsItem->video = null; // Videos will be embedded
|
$newsItem->video = null; // Videos will be embedded
|
||||||
$newsItem->content = $source->blocks;
|
$newsItem->content = $source->blocks;
|
||||||
} elseif(isset($apiResult->source->blocks)) {
|
} elseif (isset($apiResult->source->blocks)) {
|
||||||
$newsItem->content = $apiResult->source->blocks;
|
$newsItem->content = $apiResult->source->blocks;
|
||||||
}
|
}
|
||||||
return view('newsitem', array_merge($this->getSidebareData(), ['type' => $apiResult->type, 'news' => $newsItem, 'metadata' => $newsItem->metadata, 'searchURL' => 'nieuws/zoeken']));
|
return view('newsitem', array_merge($this->getSidebareData(), ['type' => $apiResult->type, 'news' => $newsItem, 'metadata' => $newsItem->metadata, 'searchURL' => 'nieuws/zoeken']));
|
||||||
@@ -51,9 +52,9 @@ class NewsController extends Controller
|
|||||||
|
|
||||||
public function more(Request $request)
|
public function more(Request $request)
|
||||||
{
|
{
|
||||||
$page = (int)$request->get('pagina', 1);
|
$page = (int) $request->get('pagina', 1);
|
||||||
$id = $request->get('id', '');
|
$id = $request->get('id', '');
|
||||||
$apiResult = $this->API('nieuws/overzicht?pagina=' . (int)max(1, $page) . '&aantal=5');
|
$apiResult = $this->API('nieuws/overzicht?pagina=' . (int) max(1, $page) . '&aantal=5');
|
||||||
$news = [];
|
$news = [];
|
||||||
foreach ($apiResult->news as $newsItem) {
|
foreach ($apiResult->news as $newsItem) {
|
||||||
$news[] = new \Model\NewsItem($newsItem);
|
$news[] = new \Model\NewsItem($newsItem);
|
||||||
@@ -64,10 +65,10 @@ class NewsController extends Controller
|
|||||||
|
|
||||||
public function populair(Request $request)
|
public function populair(Request $request)
|
||||||
{
|
{
|
||||||
$page = (int)$request->get('pagina', 1);
|
$page = (int) $request->get('pagina', 1);
|
||||||
$id = $request->get('id', '');
|
$id = $request->get('id', '');
|
||||||
$populair = [];
|
$populair = [];
|
||||||
$apiResult = $this->API('nieuws/populair?pagina=' . (int)max(1, $page) . '&aantal=5');
|
$apiResult = $this->API('nieuws/populair?pagina=' . (int) max(1, $page) . '&aantal=5');
|
||||||
foreach ($apiResult->news as $_newsItem) {
|
foreach ($apiResult->news as $_newsItem) {
|
||||||
$populair[] = new \Model\NewsItem($_newsItem);
|
$populair[] = new \Model\NewsItem($_newsItem);
|
||||||
}
|
}
|
||||||
@@ -109,30 +110,19 @@ class NewsController extends Controller
|
|||||||
return abort(404);
|
return abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function blog(Request $request, $id)
|
public function liveblog(Request $request, $id)
|
||||||
{
|
{
|
||||||
parent::registerView($request, 'blog', $id);
|
parent::registerView($request, 'blog', $id);
|
||||||
|
|
||||||
$page = (int)$request->get('pagina', 1);
|
$blog = $this->API('nieuws/liveblog/' . (int) $id);
|
||||||
$hasNext = true;
|
foreach( $blog->artikelen as &$item ) {
|
||||||
while ($page > 0) {
|
$item = new \Model\NewsItem( $item );
|
||||||
$apiResult = $this->API('blog/overzicht/' . (int)$id . '?pagina=' . (int)max(1, $page));
|
}
|
||||||
|
if (count($blog->artikelen)) {
|
||||||
$blog = new \Model\Blog($apiResult->blog);
|
return view('blog', ['blog' => $blog]);
|
||||||
$items = [];
|
|
||||||
foreach ($apiResult->items as $blogItem) {
|
|
||||||
$items[] = new \Model\NewsItem($blogItem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($items) || ($page == 1)) {
|
return abort();
|
||||||
return view('blog', ['blog' => $blog, 'pagina' => $page, 'items' => $items, 'hasNext' => $hasNext && count($items) == 15]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$hasNext = false;
|
|
||||||
--$page;
|
|
||||||
}
|
|
||||||
|
|
||||||
return abort(404);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function listNews(Request $request, $url, $title = null, $id = 'items', $total = null)
|
private function listNews(Request $request, $url, $title = null, $id = 'items', $total = null)
|
||||||
@@ -140,11 +130,11 @@ class NewsController extends Controller
|
|||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
$total = 5;
|
$total = 5;
|
||||||
}
|
}
|
||||||
$page = (int)$request->get('pagina', 1);
|
$page = (int) $request->get('pagina', 1);
|
||||||
if ($url == 'overzicht' && $request->get('dateStart', null) && $request->get('dateEnd', null)) {
|
if ($url == 'overzicht' && $request->get('dateStart', null) && $request->get('dateEnd', null)) {
|
||||||
$url = 'datum/' . $request->get('dateStart', null) . '/' . $request->get('dateEnd', null);
|
$url = 'datum/' . $request->get('dateStart', null) . '/' . $request->get('dateEnd', null);
|
||||||
}
|
}
|
||||||
$apiResult = $this->API('nieuws/' . $url . '?pagina=' . (int)max(1, $page) . ($total ? '&aantal=' . $total : ''));
|
$apiResult = $this->API('nieuws/' . $url . '?pagina=' . (int) max(1, $page) . ($total ? '&aantal=' . $total : ''));
|
||||||
$news = [];
|
$news = [];
|
||||||
foreach ($apiResult->news ?? [] as $newsItem) {
|
foreach ($apiResult->news ?? [] as $newsItem) {
|
||||||
$news[] = new \Model\NewsItem($newsItem);
|
$news[] = new \Model\NewsItem($newsItem);
|
||||||
@@ -154,8 +144,10 @@ class NewsController extends Controller
|
|||||||
if ($title == null) {
|
if ($title == null) {
|
||||||
$total = 5;
|
$total = 5;
|
||||||
}
|
}
|
||||||
$apiResult = $this->API('nieuws/populair?pagina=' . (int)max(1,
|
$apiResult = $this->API('nieuws/populair?pagina=' . (int) max(
|
||||||
$page) . ($total ? '&aantal=' . $total : ''));
|
1,
|
||||||
|
$page
|
||||||
|
) . ($total ? '&aantal=' . $total : ''));
|
||||||
foreach ($apiResult->news as $newsItem) {
|
foreach ($apiResult->news as $newsItem) {
|
||||||
$populair[] = new \Model\NewsItem($newsItem);
|
$populair[] = new \Model\NewsItem($newsItem);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class NewsItem extends Model {
|
|||||||
public $podcast;
|
public $podcast;
|
||||||
public $images;
|
public $images;
|
||||||
public $video;
|
public $video;
|
||||||
|
public $type;
|
||||||
public $url;
|
public $url;
|
||||||
public $metadata;
|
public $metadata;
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,58 @@
|
|||||||
@extends('layouts/sidebar')
|
@extends('layouts/sidebar')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
@if($blog->title) {{$blog->title}} | Live blog @endif
|
@if($blog->titel) {{$blog->titel}} | Live blog @endif
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('controls')
|
@section('page_class')news_post post_container @endsection
|
||||||
<p>
|
|
||||||
<a href="{{Request::url()}}" class="action_button"><span class="fa fa-undo" class="action_button"></span><span>Verversen (nieuwste)</span></a>
|
|
||||||
|
{{-- @section('controls')
|
||||||
|
<p>
|
||||||
|
<a href="{{Request::url()}}" class="action_button"><span class="fa fa-undo"
|
||||||
|
class="action_button"></span><span>Verversen (nieuwste)</span></a>
|
||||||
|
|
||||||
@if($pagina > 1)
|
@if($pagina > 1)
|
||||||
<a href="{{Request::url()}}?pagina={{$pagina - 1}}" class="action_button"><span class="fa fa-arrow-left"></span><span>Terug (nieuwer)</span></a>
|
<a href="{{Request::url()}}?pagina={{$pagina - 1}}" class="action_button"><span
|
||||||
|
class="fa fa-arrow-left"></span><span>Terug (nieuwer)</span></a>
|
||||||
@else
|
@else
|
||||||
<a href="#" class="action_button disabled"><span class="fa fa-arrow-left"></span><span>Terug (nieuwere berichten)</span></a>
|
<a href="#" class="action_button disabled"><span class="fa fa-arrow-left"></span><span>Terug (nieuwere
|
||||||
|
berichten)</span></a>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($hasNext)
|
@if($hasNext)
|
||||||
<a href="{{Request::url()}}?pagina={{$pagina + 1}}" class="action_button"><span class="fa fa-arrow-right"></span><span>Verder (ouder)</span></a>
|
<a href="{{Request::url()}}?pagina={{$pagina + 1}}" class="action_button"><span
|
||||||
|
class="fa fa-arrow-right"></span><span>Verder (ouder)</span></a>
|
||||||
@else
|
@else
|
||||||
<a href="#" class="action_button disabled"><span class="fa fa-arrow-right"></span><span>Verder (ouder)</span></a>
|
<a href="#" class="action_button disabled"><span class="fa fa-arrow-right"></span><span>Verder (ouder)</span></a>
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
@endsection
|
@endsection --}}
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<h3 class="excerpt">
|
<h3 class="excerpt">
|
||||||
{!!$blog->description!!}
|
@if($blog->is_actief)
|
||||||
<span style="font-size: 75%; margin: 5px; text-align: center">
|
<span style="font-family: sans-serif; padding: 3px; color: white; background-color: #BD0013; border-radius: 5px;"
|
||||||
@if($blog->is_active)
|
titel="Dit blog wordt momenteel actief bijgewerkt.">
|
||||||
<span style="padding: 3px; color: white; background-color: #BD0013; border-radius: 5px;" title="Dit blog wordt momenteel actief bijgewerkt.">
|
|
||||||
Nu live!
|
Nu live!
|
||||||
</span>
|
</span>
|
||||||
@else
|
@else
|
||||||
<span style="padding: 3px; background-color: #BDBDBD; border-radius: 5px;" title="Dit blog is gesloten en wordt hier getoond als archief.">
|
<span style="font-family: sans-serif; padding: 3px; background-color: #BDBDBD; border-radius: 5px;"
|
||||||
|
titel="Dit blog is gesloten en wordt hier getoond als archief.">
|
||||||
Archief
|
Archief
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@yield('controls')
|
{{-- @yield('controls') --}}
|
||||||
|
|
||||||
<div id="items">
|
<div id="items">
|
||||||
@include('partial/blogitems', ['items' => $items])
|
@include('partial/blogitems', ['items' => $blog->artikelen])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@yield('controls')
|
{{-- @yield('controls')
|
||||||
<p class="center">(Pagina {{$pagina}})</p>
|
<p class="center">(Pagina {{$pagina}})</p> --}}
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
@extends('layouts.master')
|
@extends('layouts.master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Home
|
Home
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
|
{{-- Liveblogs --}}
|
||||||
|
@if(count($liveblogs))
|
||||||
|
<div class="box full-width">
|
||||||
|
@foreach($liveblogs as $liveblog)
|
||||||
|
<a href="/nieuws/liveblog/{{ $liveblog->id }}/{{ $liveblog->slug }}" class="liveblog"
|
||||||
|
title="{{$liveblog->titel}}">
|
||||||
|
<span class="bi bi-blog"></span>
|
||||||
|
<b>Liveblog: {{$liveblog->titel}}</b>
|
||||||
|
</a>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="blog_grid" data-snapto="{}">
|
<div class="blog_grid" data-snapto="{}">
|
||||||
{{-- Desktop --}}
|
{{-- Desktop --}}
|
||||||
<div class="grid_view">
|
<div class="grid_view">
|
||||||
@@ -19,21 +32,19 @@
|
|||||||
@elseif($item->images && count($item->images) > 1)
|
@elseif($item->images && count($item->images) > 1)
|
||||||
<span class="icon gallery"></span>
|
<span class="icon gallery"></span>
|
||||||
@endif
|
@endif
|
||||||
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}'
|
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '
|
||||||
alt='img'>
|
/images/noimage.png'}}' alt='img'>
|
||||||
</a>
|
</a>
|
||||||
<div class="slider_content_box">
|
<div class="slider_content_box">
|
||||||
<ul class="post_details simple">
|
<ul class="post_details simple">
|
||||||
@foreach($item->tags as $tag)
|
@foreach($item->tags as $tag)
|
||||||
<li class="category">
|
<li class="category">
|
||||||
<a title="{{$tag->titel}}"
|
<a title="{{$tag->titel}}" href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
|
||||||
href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
|
|
||||||
class="over_image">{{$tag->titel}}</a>
|
class="over_image">{{$tag->titel}}</a>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
<h2><a href="{{url($item->url)}}"
|
<h2><a href="{{url($item->url)}}" title="{{$item->title}}">{!!$item->title!!}</a></h2>
|
||||||
title="{{$item->title}}">{!!$item->title!!}</a></h2>
|
|
||||||
<?php
|
<?php
|
||||||
$time = Formatter::relativeDate($item->published) . ' om ' . $item->published->format('H:i');
|
$time = Formatter::relativeDate($item->published) . ' om ' . $item->published->format('H:i');
|
||||||
if ($item->edited && ($item->edited->format('d m H i') != $item->published->format('d m H i'))) {
|
if ($item->edited && ($item->edited->format('d m H i') != $item->published->format('d m H i'))) {
|
||||||
@@ -56,21 +67,19 @@
|
|||||||
@elseif($item->images && count($item->images) > 1)
|
@elseif($item->images && count($item->images) > 1)
|
||||||
<span class="icon gallery"></span>
|
<span class="icon gallery"></span>
|
||||||
@endif
|
@endif
|
||||||
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}'
|
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '
|
||||||
alt='img'>
|
/images/noimage.png'}}' alt='img'>
|
||||||
</a>
|
</a>
|
||||||
<div class="slider_content_box">
|
<div class="slider_content_box">
|
||||||
<ul class="post_details simple">
|
<ul class="post_details simple">
|
||||||
@foreach($item->tags as $tag)
|
@foreach($item->tags as $tag)
|
||||||
<li class="category">
|
<li class="category">
|
||||||
<a title="{{$tag->titel}}"
|
<a title="{{$tag->titel}}" href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
|
||||||
href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
|
|
||||||
class="over_image">{{$tag->titel}}</a>
|
class="over_image">{{$tag->titel}}</a>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
<h2><a href="{{url($item->url)}}"
|
<h2><a href="{{url($item->url)}}" title="{{$item->title}}">{!!$item->title!!}</a></h2>
|
||||||
title="{{$item->title}}">{!!$item->title!!}</a></h2>
|
|
||||||
<?php
|
<?php
|
||||||
$time = Formatter::relativeDate($item->published) . ' om ' . $item->published->format('H:i');
|
$time = Formatter::relativeDate($item->published) . ' om ' . $item->published->format('H:i');
|
||||||
if ($item->edited && ($item->edited->format('d m H i') != $item->published->format('d m H i'))) {
|
if ($item->edited && ($item->edited->format('d m H i') != $item->published->format('d m H i'))) {
|
||||||
@@ -89,23 +98,22 @@
|
|||||||
<div class="col-8 col-md-6">
|
<div class="col-8 col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@php(prev($news))
|
@php(prev($news))
|
||||||
@for($i = 0; ($i < 5) && ($item = next($news)); ++$i)
|
@for($i = 0; ($i < 5) && ($item=next($news)); ++$i) <div
|
||||||
<div class="post small col-6{{$i == 0 ? ' d-none d-md-block' : ''}}{{$i == 4 ? ' d-block d-md-none' : ''}}">
|
class="post small col-6{{$i == 0 ? ' d-none d-md-block' : ''}}{{$i == 4 ? ' d-block d-md-none' : ''}}">
|
||||||
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||||
@if($item->video)
|
@if($item->video)
|
||||||
<span class="icon video"></span>
|
<span class="icon video"></span>
|
||||||
@elseif($item->images && count($item->images) > 1)
|
@elseif($item->images && count($item->images) > 1)
|
||||||
<span class="icon gallery"></span>
|
<span class="icon gallery"></span>
|
||||||
@endif
|
@endif
|
||||||
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}'
|
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '
|
||||||
alt='img'>
|
/images/noimage.png'}}' alt='img'>
|
||||||
</a>
|
</a>
|
||||||
<div class="slider_content_box">
|
<div class="slider_content_box">
|
||||||
<ul class="post_details simple">
|
<ul class="post_details simple">
|
||||||
@foreach($item->tags as $tag)
|
@foreach($item->tags as $tag)
|
||||||
<li class="category">
|
<li class="category">
|
||||||
<a title="{{$tag->titel}}"
|
<a title="{{$tag->titel}}" href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
|
||||||
href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
|
|
||||||
class="over_image">{{$tag->titel}}</a>
|
class="over_image">{{$tag->titel}}</a>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -130,10 +138,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- body --}}
|
{{-- body --}}
|
||||||
<div class="grey_background">
|
<div class="grey_background">
|
||||||
<div class="body_container row">
|
<div class="body_container row">
|
||||||
@if(!isset($disableBanners) || !$disableBanners)
|
@if(!isset($disableBanners) || !$disableBanners)
|
||||||
<div class="homepage-body-banners d-none d-md-flex justify-content-center mb-4">
|
<div class="homepage-body-banners d-none d-md-flex justify-content-center mb-4">
|
||||||
@@ -146,7 +154,8 @@
|
|||||||
<div class="col-md-6 col-12">
|
<div class="col-md-6 col-12">
|
||||||
<h4 class="box_header"><span>Meer nieuws</span></h4>
|
<h4 class="box_header"><span>Meer nieuws</span></h4>
|
||||||
<div class="box full-width">
|
<div class="box full-width">
|
||||||
@include('partial/newslist_small', ['id' => 'items-more-news', 'news' => array_slice($news, 5, 5)])
|
@include('partial/newslist_small', ['id' => 'items-more-news', 'news' => array_slice($news, 5,
|
||||||
|
5)])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -172,7 +181,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<a href="{{$url}}" title="{{$podcast->title}}">
|
<a href="{{$url}}" title="{{$podcast->title}}">
|
||||||
<img src="{{($hasImage = $podcast->image && $podcast->image->url) ? $imgBase . $podcast->image->url : '/images/noimage.png'}}"/>
|
<img
|
||||||
|
src="{{($hasImage = $podcast->image && $podcast->image->url) ? $imgBase . $podcast->image->url : '/images/noimage.png'}}" />
|
||||||
<div class="sentence">
|
<div class="sentence">
|
||||||
<?php
|
<?php
|
||||||
$sentence = [];
|
$sentence = [];
|
||||||
@@ -192,12 +202,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<h2 class="post_title"><a href="{{$url}}"
|
<h2 class="post_title"><a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->title!!}</a>
|
||||||
title="{{$podcast->title}}">{!!$podcast->title!!}</a></h2>
|
</h2>
|
||||||
<div class="sub_title">
|
<div class="sub_title">
|
||||||
@if ($podcast->program)
|
@if ($podcast->program)
|
||||||
<a class="program_name"
|
<a class="program_name" href="{{ route('programma') . $podcast->program->url }}"
|
||||||
href="{{ route('programma') . $podcast->program->url }}"
|
|
||||||
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
||||||
@endif
|
@endif
|
||||||
<span class="post_date" title="{{Formatter::relativeDate($podcast->created)}}">
|
<span class="post_date" title="{{Formatter::relativeDate($podcast->created)}}">
|
||||||
@@ -221,7 +230,6 @@
|
|||||||
@include('widgets/contact', [])
|
@include('widgets/contact', [])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|||||||
@@ -1,89 +1,101 @@
|
|||||||
@foreach($items as $item)
|
@foreach($items as $news)
|
||||||
<div class="row">
|
<div class="post_body">
|
||||||
<div class="post single small_image">
|
<h2>{{ $news->title }}</h2>
|
||||||
<ul class="post_details clearfix">
|
<ul class="post_details clearfix">
|
||||||
<li class="detail date">
|
<li class="detail date">
|
||||||
<i class="fa-regular fa-clock"></i>
|
<i class="fa-regular fa-clock"></i>
|
||||||
{{Formatter::relativeDate($item->published)}} om {{$item->published->format("H:i")}}
|
{{Formatter::relativeDate($news->published)}} om {{$news->published->format('H:i')}}
|
||||||
@if($item->edited && ($item->edited->format("d m H i") != $item->published->format("d m H i")))
|
@if($news->edited && ($news->edited->format('d m H i') != $news->published->format('d m H i')))
|
||||||
| <em>bijgewerkt</em>:
|
| bijgewerkt:
|
||||||
@if($item->edited->format("d m") != $item->published->format("d m"))
|
@if($news->edited->format('d m') != $news->published->format('d m'))
|
||||||
{{strtolower(Formatter::relativeDate($item->edited))}}
|
{{strtolower(Formatter::relativeDate($news->edited))}}
|
||||||
@endif
|
@endif
|
||||||
om {{$item->edited->format("H:i")}} uur
|
om {{$news->edited->format('H:i')}} uur
|
||||||
@endif
|
@endif
|
||||||
</li>
|
</li>
|
||||||
@if($item->author)
|
@if($news->author)
|
||||||
<li class="detail author">{{$item->author}}</li>
|
<li class="detail author"><i class="fa-solid fa-pen"></i> {{$news->author}}</li>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<div class="post_content page_margin_top clearfix">
|
<div class="post_content clearfix">
|
||||||
<div class="content_box">
|
<div class="content_box">
|
||||||
@if($item->images)
|
@if($news->images)
|
||||||
@if(count($item->images) == 1)
|
@if(count($news->images) == 1)
|
||||||
@if(!$item->images[0]->title) @php($item->images[0]->title = $item->title) @endif
|
|
||||||
<div class="post_image_box">
|
<div class="post_image_box">
|
||||||
<a href="{{$imgBase . $item->images[0]->url}}" class="post_image prettyPhoto" rel="prettyPhoto" title="{{$item->images[0]->title}}">
|
<a href="{{$imgBase . $news->images[0]->url}}" class="post_image prettyPhoto" rel="prettyPhoto"
|
||||||
<img src="{{$imgBase . $item->images[0]->url}}" alt="{{$item->images[0]->title}}">
|
title="{{$news->images[0]->title}}">
|
||||||
|
<img src='{{$imgBase . $news->images[0]->url}}' alt='{{$news->images[0]->title}}'>
|
||||||
</a>
|
</a>
|
||||||
<div class="sentence">
|
<div class="sentence">
|
||||||
<span class="text">{{$item->images[0]->title}}</span>
|
<span class="text">{{$news->images[0]->title}}</span>
|
||||||
@if(isset($item->images[0]->author))
|
@if(isset($news->images[0]->author))
|
||||||
<span class="author">{{$item->images[0]->author}}</span>
|
<span class="author">{{$news->images[0]->author}}</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="horizontal_carousel_container gallery">
|
<div class="horizontal_carousel_container thin page_margin_top gallery_control">
|
||||||
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
<ul
|
||||||
@foreach($item->images as $image)
|
class="horizontal_carousel control-for-post-gallery visible-5 autoplay-0 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||||
@if(!$image->title) @php($image->title = $item->title) @endif
|
@foreach($news->images as $image)
|
||||||
<li>
|
<li>
|
||||||
<a href="{{$imgBase . $image->url}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery-{{$item->id}}]" title="{{$image->title}}">
|
<a href="#"><img src='{{$imgBase . $image->url}}'></a>
|
||||||
<img src="{{$imgBase . $image->url}}" alt="{{$image->title}}" title="{{$image->title}}">
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="control-by-post-gallery" class="horizontal_carousel_container big margin_top_10">
|
||||||
|
<ul id="post-gallery"
|
||||||
|
class="horizontal_carousel visible-1 autoplay-0 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||||
|
@foreach($news->images as $image)
|
||||||
|
<li>
|
||||||
|
<a href="{{$imgBase . $image->url}}" data-rel="gallery" title="{{$image->title}}">
|
||||||
|
<span class="icon fullscreen animated"></span>
|
||||||
|
<img src='{{$imgBase . $image->url}}' alt='{{$image->title}}'>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<h3>{{$item->title}}</h3>
|
{{-- @if($news->type == "nhnieuws") --}}
|
||||||
|
{{-- @include('partial/nh_story', ['content' => $news->content]) --}}
|
||||||
@if(is_array($item->content))
|
{{-- @elseif($news->type == "artikel") --}}
|
||||||
@include("partial/nh_story", ["content" => $item->content]);
|
{{-- @include('partial/block_story', ['content' => $news->content]) --}}
|
||||||
@else
|
{{-- @else --}}
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>{!!$item->content!!}</p>
|
<p>{!!$news->content!!}</p>
|
||||||
</div>
|
</div>
|
||||||
|
{{-- @endif --}}
|
||||||
|
|
||||||
|
@if($news->podcast)
|
||||||
|
@include('widgets/podcastplayer', ['podcast' => $news->podcast])
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($item->video)
|
@if($news->source && $news->source->show)
|
||||||
@include('widgets/mediaplayer')
|
|
||||||
@php(createVideoElement($item->video))
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if($item->source && $item->source->show)
|
|
||||||
<div class="post-source">
|
<div class="post-source">
|
||||||
<p>Bron: {{$item->source->title}}</p>
|
<p>Bron: {{$news->source->title}}</p>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{--
|
||||||
|
@include('widgets/share')
|
||||||
|
--}}
|
||||||
|
|
||||||
|
{{-- <div class="share_buttons row">
|
||||||
|
<div class="col-12 col-md-auto">
|
||||||
|
<a data-share="native" href="javascript:void(0)" class="btn">
|
||||||
|
<i class="fa-solid fa-share"></i>
|
||||||
|
Delen
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
@if($item->podcast)
|
|
||||||
@include("widgets/mediaplayer")
|
|
||||||
<div class="announcement">
|
|
||||||
<div>
|
|
||||||
<audio controls>
|
|
||||||
<source src="{{ $url = url( $apiUrl . "podcast/stream" . $item->podcast->url . "?auth=" . $item->podcast->auth )}}" type="audio/mpeg" />
|
|
||||||
</audio>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<hr />
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -27,6 +27,7 @@ Route::get('/nieuws/zoeken', function(Illuminate\Http\Request $request) {
|
|||||||
}
|
}
|
||||||
return redirect('/nieuws');
|
return redirect('/nieuws');
|
||||||
});
|
});
|
||||||
|
Route::get('/nieuws/liveblog/{id}/{title}', 'NewsController@liveblog')->where(['id' => '\d+'])->name('nieuws.liveblog');
|
||||||
|
|
||||||
Route::get('/blog/{id}/{title}', 'NewsController@blog')->where(['id' => '\d+'])->name('blog');
|
Route::get('/blog/{id}/{title}', 'NewsController@blog')->where(['id' => '\d+'])->name('blog');
|
||||||
Route::get('/blog', 'NewsController@activeblog');
|
Route::get('/blog', 'NewsController@activeblog');
|
||||||
|
|||||||
Reference in New Issue
Block a user