10 Commits

Author SHA1 Message Date
NH Gooi
e551e55158 Lees ook... alleen laten zien als het naar loakle artikelen verwijst 2024-06-23 23:46:51 +02:00
NH Gooi
2799b1843f Podcasts en lees meer... toegevoegd aan nieuwsartikelen 2024-06-23 23:18:38 +02:00
NH Gooi
52f38b4c00 Inline podcastplayer toegevoegd 2024-06-22 22:58:22 +02:00
NH Gooi
e2f114a7a8 Podcast player embedded obv links in tekst 2024-06-22 22:47:20 +02:00
NH Gooi
cc58f5931c API key toegevoegd voor statistieken 2024-06-20 23:30:13 +02:00
NH Gooi
23d88ac143 Fix API call 2024-06-20 22:10:11 +02:00
NH Gooi
56adc60788 Merge branch 'release/dev' into new-api 2024-06-20 11:28:38 +02:00
NH Gooi
2db970e8c6 Nieuwe API aanpassingen 2024-06-18 22:04:46 +02:00
NH Gooi
80256669b1 Wijzigingen voor nieuwe API 2024-06-17 23:11:07 +02:00
NH Gooi
738107515c Wijzigingen voor nieuwe API 2024-06-15 22:45:53 +02:00
17 changed files with 265 additions and 276 deletions

View File

@@ -6,56 +6,10 @@ use \Illuminate\Http\Request;
class CalendarController extends Controller class CalendarController extends Controller
{ {
private $events = [
1 => [
'id' => 1,
'title' => 'Seinconcert Hilversum',
'region' => 'Hilversum',
'content' => 'Vrijdag 19 april treedt het Barbican Quartet op in de serie Seinconcerten in Hilversum. Op het programma staan werken van Schubert, Ravel en Britten.',
'starts' => '16-04-2024',
'ends' => '19-04-2024',
'url' => 'seinconcert-hilversum',
'images' => [
['url' => '/img/news/rHjgm6CM0D.jpg']
]
],
2 => [
'id' => 2,
'title' => 'Orgelconcert Blaricum',
'region' => 'Blaricum',
'content' => '<p><strong>In april van dit jaar bestaat het Maarschalkerweerd orgel van de Vituskerk in Blaricum 150 jaar. Ter gelegenheid hiervan is er op zondag 21 april van 14.00 15.00 uur een orgelconcert in de Vituskerk. De vaste organisten van de Vituskerk, Bas Groenewoud en Herman van Dijk, zullen het orgel bespelen en er zal iets worden verteld over de geschiedenis van het orgel.</strong></p><p>Het orgel is in 1874 gebouw door Michaël Maarschalkerweerd. Hij bouwde orgels die in de traditie van de neogotiek passen en zijn orgels zijn zeer geschikt voor het spelen van 19e-eeuwse romantische werken. Het orgel in het Amsterdamse concertgebouw is ook van zijn hand. In zijn bedrijf werkten rond 1900 ruim twintig mensen. Na Michaels dood in 1915 werd het bedrijf voortgezet door C.H. van Brussel, J.J. Elbertse en L. Collard, die tot dan toe meesterknechten geweest waren. Elbertse verliet de firma na twee jaar om zijn eigen orgelmakerij op te richten. De firma Elbertse uit Soest heeft jarenlang dit orgel in onderhoud gehad (de tweede én derde generatie trad toe).</p><p>In 2023 fuseerde het bedrijf met de firma Van Vulpen. Het orgel in de Vituskerk was oorspronkelijk gebouwd op de koorzolder maar tijdens de grondige verbouwing van de kerk in 2004 werd het orgel naar beneden gehaald zodat het in al zijn pracht te bewonderen is en ook nodig is om dienst te doen als ondersteuning van het koor. Afgelopen jaar is het orgel in de Vituskerk grondig gerenoveerd.</p><p>Het concert begint om 14:00 uur en de entree is vrij. Collecte na afloop.</p>',
'starts' => '21-04-2024',
'ends' => '21-04-2024',
'url' => 'orgelconcert-blaricum',
'images' => [
['url' => '/img/news/tgrOh0kbIS.jpg']
]
],
];
public function __construct()
{
parent::__construct();
$events = [];
foreach ($this->events as $index => $event) {
$object = new \stdClass();
foreach ($event as $key => $value) {
$object->$key = $value;
}
$events[$index] = $object;
}
$this->events = $events;
}
public function show(Request $request, $id) public function show(Request $request, $id)
{ {
parent::registerView($request, 'agenda', $id); parent::registerView($request, 'agenda', $id);
if ($id > 3) { $apiResult = $this->API('agenda/item/' . (int)$id);
$apiResult = $this->API('agenda/item/' . (int)$id);
} else {
$apiResult = $this->events[$id];
}
$calendarEvent = new \Model\CalendarEvent($apiResult); $calendarEvent = new \Model\CalendarEvent($apiResult);
return view('calendarevent', array_merge($this->getSidebareData(), ['event' => $calendarEvent, 'metadata' => $calendarEvent->metadata])); return view('calendarevent', array_merge($this->getSidebareData(), ['event' => $calendarEvent, 'metadata' => $calendarEvent->metadata]));
@@ -64,11 +18,8 @@ class CalendarController extends Controller
public function overview(Request $request) public function overview(Request $request)
{ {
$apiResult = $this->API('agenda/overzicht'); $apiResult = $this->API('agenda/overzicht');
if (!count($apiResult)) {
$apiResult = $this->events;
}
$calendar = []; $calendar = [];
foreach($apiResult as $calendarItem) foreach($apiResult->events as $calendarItem)
{ {
$calendar[] = new \Model\CalendarEvent($calendarItem); $calendar[] = new \Model\CalendarEvent($calendarItem);
} }

View File

@@ -22,14 +22,14 @@ class Controller extends BaseController
$data = json_decode(Storage::disk('local')->get($file)); $data = json_decode(Storage::disk('local')->get($file));
foreach ($path as $subobject) { foreach ($path as $subobject) {
$data = $data->$subobject; $data = $data->$subobject;
} }
$items = []; $items = [];
foreach ($data as $item_data) { foreach ($data as $item_data) {
$items[] = new $class($item_data); $items[] = new $class($item_data);
if ($maxItems && count($items) == $maxItems) { if ($maxItems && count($items) == $maxItems) {
break; break;
} }
} }
return $items; return $items;
} }
@@ -49,17 +49,15 @@ class Controller extends BaseController
$view->with('data', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem')); $view->with('data', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'));
}); });
View::composer('widgets.populairnieuws', function ($view) { View::composer('widgets.populairnieuws', function ($view) {
$view->with('data', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem')); $view->with('data', $this->getDataFromFileAndConvert('populair_nieuws.json', ['news'], '\Model\NewsItem'));
}); });
View::composer('widgets.nustraks', function ($view) { View::composer('widgets.nustraks', function ($view) {
$data = json_decode(Storage::disk('local')->get('nu_straks.json'))->schedule; $data = json_decode(Storage::disk('local')->get('nu_straks.json'))->schedule;
$programs = []; $programs = [];
foreach ($data as $item_data) { foreach ($data as $item_data) {
$programs[] = $program = new \Model\Program($item_data->program); $programs[] = $program = new \Model\Program($item_data->program);
$program->start = new \DateTimeImmutable($item_data->start->date, $program->start = self::JsonToDateTime($item_data->start);
new \DateTimeZone($item_data->start->timezone)); $program->end = self::JsonToDateTime($item_data->end);
$program->end = new \DateTimeImmutable($item_data->end->date,
new \DateTimeZone($item_data->end->timezone));
} }
// Need a bit of slack here, otherwise the current program may show up // Need a bit of slack here, otherwise the current program may show up
@@ -68,10 +66,8 @@ class Controller extends BaseController
$i = 0; $i = 0;
foreach (array_reverse($data) as $item_data) { foreach (array_reverse($data) as $item_data) {
$recent = $program = new \Model\Program($item_data->program); $recent = $program = new \Model\Program($item_data->program);
$recent->start = new \DateTimeImmutable($item_data->start->date, $recent->start = self::JsonToDateTime($item_data->start);
new \DateTimeZone($item_data->start->timezone)); $recent->end = self::JsonToDateTime($item_data->end);
$recent->end = new \DateTimeImmutable($item_data->end->date,
new \DateTimeZone($item_data->end->timezone));
if (($recent->end < $now) && (!$recent->nonstop) && (!$recent->rerun)) { if (($recent->end < $now) && (!$recent->nonstop) && (!$recent->rerun)) {
$view->with('recent', $recent); $view->with('recent', $recent);
break; break;
@@ -92,7 +88,7 @@ class Controller extends BaseController
}); });
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', ['news'], '\Model\NewsItem', 3))
->with('podcasts', ->with('podcasts',
$this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast')); $this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
}); });
@@ -118,16 +114,16 @@ class Controller extends BaseController
protected function API($url) protected function API($url)
{ {
// if (strpos($url, 'nieuws/overzicht') !== false) {
// return json_decode(file_get_contents(__DIR__ . '/../../../storage/app/laatste_nieuws.json'));
// }
// return [];
$arrContextOptions = [ $arrContextOptions = [
'ssl' => [ 'ssl' => [
"verify_peer" => false, "verify_peer" => false,
"verify_peer_name" => false, "verify_peer_name" => false,
], ],
'http' => [
'method' => 'GET',
'header' => 'X-Api-Key: ' . sha1(request()->server('REMOTE_ADDR')) . "\r\n"
. 'X-User-Agent: ' . request()->server('HTTP_USER_AGENT') . "\r\n"
]
]; ];
return json_decode(file_get_contents($this->API_URL . $url, false, stream_context_create($arrContextOptions))); return json_decode(file_get_contents($this->API_URL . $url, false, stream_context_create($arrContextOptions)));
@@ -148,7 +144,7 @@ class Controller extends BaseController
protected static function JsonToDateTime($obj) protected static function JsonToDateTime($obj)
{ {
return new \DateTime($obj->date, new \DateTimeZone($obj->timezone)); return is_object($obj) ? new \DateTime($obj->date, new \DateTimeZone($obj->timezone)) : new \DateTime($obj);
} }
public function __call($method, $arguments) public function __call($method, $arguments)
@@ -166,8 +162,8 @@ class Controller extends BaseController
public function getSidebareData() public function getSidebareData()
{ {
$populair = []; $populair = [];
$apiResult = $this->API('nieuws/populair?aantal=5'); $apiResult = $this->API('nieuws/populair?aantal=5');
foreach ($apiResult as $_newsItem) { foreach ($apiResult->news as $_newsItem) {
$populair[] = new \Model\NewsItem($_newsItem); $populair[] = new \Model\NewsItem($_newsItem);
} }

View File

@@ -18,7 +18,7 @@ class HomeController extends Controller
$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 as $newsItem) { foreach ($apiResult->news as $newsItem) {
$populair[] = new \Model\NewsItem($newsItem); $populair[] = new \Model\NewsItem($newsItem);
} }

View File

@@ -29,12 +29,12 @@ class JobsController extends Controller
private function listJobs(Request $request, $url, $title = null) private function listJobs(Request $request, $url, $title = null)
{ {
$page = (int)$request->get('pagina', 1); $page = (int)$request->get('pagina', 1);
$apiResult = $this->API('vacatures/' . $url . '?pagina=' . (int)max(1, $page)); #$apiResult = $this->API('vacatures/' . $url . '?pagina=' . (int)max(1, $page));
$jobs = []; $jobs = [];
foreach($apiResult->jobs as $jobsItem) #foreach($apiResult->jobs as $jobsItem)
{ #{
$jobs[] = new \Model\JobOpening($jobsItem); # $jobs[] = new \Model\JobOpening($jobsItem);
} #}
return view('jobslist', array_merge($this->getSidebareData(), ['title' => $title, 'jobs' => $jobs])); return view('jobslist', array_merge($this->getSidebareData(), ['title' => $title, 'jobs' => $jobs]));
//return view($request->ajax() ? 'partial/jobslist_small' : ($title == null ? 'home' : 'jobslist'), ['title' => $title, 'jobs' => $jobs, 'searchURL' => 'vacatures/zoeken']); //return view($request->ajax() ? 'partial/jobslist_small' : ($title == null ? 'home' : 'jobslist'), ['title' => $title, 'jobs' => $jobs, 'searchURL' => 'vacatures/zoeken']);

View File

@@ -27,7 +27,7 @@ class NewsController extends Controller
break; break;
case 2: case 2:
$source = $apiResult->source; $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);
$newsItem->author = $source->author; $newsItem->author = $source->author;
@@ -65,21 +65,26 @@ class NewsController extends Controller
$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 as $_newsItem) { foreach ($apiResult->news as $_newsItem) {
$populair[] = new \Model\NewsItem($_newsItem); $populair[] = new \Model\NewsItem($_newsItem);
} }
return view('partial/newslist_small', ['id' => $id, 'news' => $populair]); return view('partial/newslist_small', ['id' => $id, 'news' => $populair]);
} }
public function taglist(Request $request, $tag)
{
return $this->listNews($request, 'tag/' . $tag, ucfirst($tag));
}
public function regionlist(Request $request, $region) public function regionlist(Request $request, $region)
{ {
return $this->listNews($request, 'regio/' . $region, ucfirst($region)); return $this->listNews($request, 'tag/' . $region, ucfirst($region));
} }
public function themelist(Request $request, $theme) public function themelist(Request $request, $theme)
{ {
return $this->listNews($request, 'thema/' . $theme, ucfirst($theme)); return $this->listNews($request, 'tag/' . $theme, ucfirst($theme));
} }
public function search(Request $request, $query) public function search(Request $request, $query)
@@ -145,7 +150,7 @@ class NewsController extends Controller
} }
$apiResult = $this->API('nieuws/populair?pagina=' . (int)max(1, $apiResult = $this->API('nieuws/populair?pagina=' . (int)max(1,
$page) . ($total ? '&aantal=' . $total : '')); $page) . ($total ? '&aantal=' . $total : ''));
foreach ($apiResult as $newsItem) { foreach ($apiResult->news as $newsItem) {
$populair[] = new \Model\NewsItem($newsItem); $populair[] = new \Model\NewsItem($newsItem);
} }
@@ -172,7 +177,7 @@ class NewsController extends Controller
{ {
$apiResult = $this->API('nieuws/populair'); $apiResult = $this->API('nieuws/populair');
$news = []; $news = [];
foreach ($apiResult as $newsItem) { foreach ($apiResult->news as $newsItem) {
$news[] = new \Model\NewsItem($newsItem); $news[] = new \Model\NewsItem($newsItem);
} }

View File

@@ -30,6 +30,17 @@ class StreamController extends Controller
return view('watch', ['title' => 'Kijk NH Gooi Tv Studio', 'stream' => 'https://studiocam.nhgooi.nl/studiocam/live/index.m3u8']); return view('watch', ['title' => 'Kijk NH Gooi Tv Studio', 'stream' => 'https://studiocam.nhgooi.nl/studiocam/live/index.m3u8']);
} }
public function inline(Request $request, $id)
{
$apiResult = $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast($apiResult);
if(sha1($id . ':' . date('Y-m-d')) != $request->get('auth')) {
// return view('widgets/podcastplayer', ['podcast' => null]);
}
return view('widgets/podcastplayer', ['podcast' => $podcast]);
}
public function podcast(Request $request, $id) public function podcast(Request $request, $id)
{ {
$apiResult = $this->API('podcast/details/' . (int)$id); $apiResult = $this->API('podcast/details/' . (int)$id);

View File

@@ -725,6 +725,8 @@ div.pp_default .pp_close:hover {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
display: flex;
gap: 3px;
} }
.blog_grid .post .slider_content_box .post_details .category a { .blog_grid .post .slider_content_box .post_details .category a {
padding: 6px 11px 7px; padding: 6px 11px 7px;
@@ -1647,4 +1649,10 @@ a, a:hover, a:active {
} }
} }
.podcast-player .content {
border: solid 1px #333;
border-radius: 5px;
padding: 0.4rem;
}
/*# sourceMappingURL=style.css.map */ /*# sourceMappingURL=style.css.map */

1
public/js/main.js vendored
View File

@@ -1 +0,0 @@

View File

@@ -37,40 +37,9 @@
@section('content') @section('content')
@parent @parent
<div data-tabs class="page_body"> <div data-tabs class="page_body">
<div class="tabs"> <div style="padding: 0" class="tab_content active" id="agenda">
<h4 data-tab-content-id="tab_previous" class="box_header small flex-grow-1"><span>Eerder</span></h4>
<h4 data-tab-content-id="tab_current_week" class="box_header small flex-grow-1 active"><span>Komende week</span></h4>
<h4 data-tab-content-id="tab_everything" class="box_header small flex-grow-1"><span>Toon alles</span></h4>
<h4 data-tab-content-id="tab_next" class="box_header small"><span>Later</span></h4>
</div>
@php($tabs = [
[
'id' => 'tab_previous',
'start' => new DateTime('1-1-1990'),
'end' => new DateTime('sunday previous week'),
],
[
'id' => 'tab_current_week',
'start' => new DateTime('monday this week'),
'end' => new DateTime('sunday this week'),
],
[
'id' => 'tab_everything',
'start' => new DateTime('1-1-1990'),
'end' => new DateTime('31-12-3000'),
],
[
'id' => 'tab_next',
'start' => new DateTime('monday next week'),
'end' => new DateTime('31-12-3000'),
]
])
@foreach($tabs as $tab)
<div style="padding: 0" class="tab_content{{$tab['id'] == 'tab_current_week' ? ' active' : ''}}" id="{{$tab['id']}}">
@php($count = 0) @php($count = 0)
@foreach($events as $event) @foreach($events as $event)
@if($event->starts >= $tab['start'] && $event->ends <= $tab['end'])
@php($count++) @php($count++)
<?php $url = route('agenda.details', ['id' => $event->id, 'title' => $event->title]); ?> <?php $url = route('agenda.details', ['id' => $event->id, 'title' => $event->title]); ?>
<div class="box featured"> <div class="box featured">
@@ -83,8 +52,10 @@
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<h2 class="post_title"><a href="{{$url}}" title="{{$event->title}}">{!!$event->title!!}</a></h2> <h2 class="post_title"><a href="{{$url}}" title="{{$event->title}}">{!!$event->title!!}</a></h2>
<div class="sub_title" style="flex-wrap: wrap"> <div class="sub_title" style="flex-wrap: wrap">
<ul class="post_tags" style="width: 100%; margin: 0 0 8px 0;height: 25px;"> <ul class="post_tags" style="width: 100%; margin: 0 0 8px 0;height: 25px;">
<li><a style="padding: 3px 8px 3px" title="{{$event->region}}">{{$event->region}}</a></li> @foreach($event->tags as $tag)
<li><a style="padding: 3px 8px 3px" title="{{$tag->title}}">{{$tag->title}}</a></li>
@endforeach
</ul> </ul>
<span class="post_date" style="line-height: 1.17; height: 14px;" title="{{Formatter::relativeDate($event->starts, 'W d m y?')}}"> <span class="post_date" style="line-height: 1.17; height: 14px;" title="{{Formatter::relativeDate($event->starts, 'W d m y?')}}">
<i class="fa-regular fa-clock"></i> {{Formatter::relativeDate($event->starts, 'W d m y?')}} <i class="fa-regular fa-clock"></i> {{Formatter::relativeDate($event->starts, 'W d m y?')}}
@@ -99,14 +70,12 @@
<a class="btn fit_content" href="{{$url}}">Lees verder</a> <a class="btn fit_content" href="{{$url}}">Lees verder</a>
</div> </div>
</div> </div>
</div>
@endif
@endforeach
@if($count == 0) @if($count == 0)
<p>Er zijn geen items gevonden. Iets te melden? Mail het naar <a href="mailto:info@nhgooi.nl">info@nhgooi.nl</a>.</p> <p>Er zijn geen items gevonden. Iets te melden? Mail het naar <a href="mailto:info@nhgooi.nl">info@nhgooi.nl</a>.</p>
@endif @endif
</div> </div>
@endforeach @endforeach
</div> </div>
</div>
@endsection @endsection
@endif @endif

View File

@@ -24,13 +24,13 @@
</a> </a>
<div class="slider_content_box"> <div class="slider_content_box">
<ul class="post_details simple"> <ul class="post_details simple">
@if($item->region) @foreach($item->tags as $tag)
<li class="category"> <li class="category">
<a title="Regio: {{$item->region->title}}" <a title="{{$tag->titel}}"
href="{{route('nieuws.regio', ['region' => $item->region->slug])}}" href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
class="over_image">{{$item->region->title}}</a> class="over_image">{{$tag->titel}}</a>
</li> </li>
@endif @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>
@@ -61,13 +61,13 @@
</a> </a>
<div class="slider_content_box"> <div class="slider_content_box">
<ul class="post_details simple"> <ul class="post_details simple">
@if($item->region) @foreach($item->tags as $tag)
<li class="category"> <li class="category">
<a title="Regio: {{$item->region->title}}" <a title="{{$tag->titel}}"
href="{{route('nieuws.regio', ['region' => $item->region->slug])}}" href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
class="over_image">{{$item->region->title}}</a> class="over_image">{{$tag->titel}}</a>
</li> </li>
@endif @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>
@@ -102,13 +102,13 @@
</a> </a>
<div class="slider_content_box"> <div class="slider_content_box">
<ul class="post_details simple"> <ul class="post_details simple">
@if($item->region) @foreach($item->tags as $tag)
<li class="category"> <li class="category">
<a title="Regio: {{$item->region->title}}" <a title="{{$tag->titel}}"
href="{{route('nieuws.regio', ['region' => $item->region->slug])}}" href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
class="over_image">{{$item->region->title}}</a> class="over_image">{{$tag->titel}}</a>
</li> </li>
@endif @endforeach
</ul> </ul>
<h5 class="post_title"><a href="{{url($item->url)}}" <h5 class="post_title"><a href="{{url($item->url)}}"
title="{{$item->title}}">{!!$item->title!!}</a></h5> title="{{$item->title}}">{!!$item->title!!}</a></h5>

View File

@@ -61,6 +61,7 @@
</a> </a>
<div class="clearfix"></div> <div class="clearfix"></div>
@if(count($jobs))
<h2 class="first">Wie zoeken wij?</h2> <h2 class="first">Wie zoeken wij?</h2>
<ul> <ul>
@foreach($jobs as $job) @foreach($jobs as $job)
@@ -73,7 +74,8 @@
</ul> </ul>
<div class="clearfix"></div> <div class="clearfix"></div>
<div style="margin: 1em; border-bottom: solid 1px #333;"></div> <div style="margin: 1em; border-bottom: solid 1px #333;"></div>
<h2>Niet wat je zoekt?</h2> <h2>Niet wat je zoekt?</h2>
@endif
<a class="btn" style="width: fit-content" href="mailto:meebouwen@nhgooi.nl?subject=Open sollicitatie" <a class="btn" style="width: fit-content" href="mailto:meebouwen@nhgooi.nl?subject=Open sollicitatie"
title="Mail direct je reactie op deze vacature."> title="Mail direct je reactie op deze vacature.">
<span>Open sollicitatie</span> <span>Open sollicitatie</span>

View File

@@ -186,8 +186,8 @@
<script type="text/javascript" src="/js/jquery.hint.js"></script> <script type="text/javascript" src="/js/jquery.hint.js"></script>
<script type="text/javascript" src="/js/jquery.qtip.min.js"></script> <script type="text/javascript" src="/js/jquery.qtip.min.js"></script>
<script type="text/javascript" src="/js/jquery.blockUI.js"></script> <script type="text/javascript" src="/js/jquery.blockUI.js"></script>
<script type="text/javascript" src="/js/main.js"></script>
<script type="text/javascript" src="/js/odometer.min.js"></script>--> <script type="text/javascript" src="/js/odometer.min.js"></script>-->
<script type="text/javascript" src="/js/main.js"></script>
<script type="text/javascript" src="/js/jquery-3.7.1.min.js"></script> <script type="text/javascript" src="/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.prettyPhoto.js"></script> <script type="text/javascript" src="/js/jquery.prettyPhoto.js"></script>
<script type="text/javascript" src="/js/jquery.carouFredSel-6.2.1.min.js"></script> <script type="text/javascript" src="/js/jquery.carouFredSel-6.2.1.min.js"></script>

View File

@@ -11,16 +11,18 @@
<li><a title="Home" href="/">Home</a></li> <li><a title="Home" href="/">Home</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li> <li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li><a title="Nieuws" href="{{route('nieuws')}}">Nieuws</a></li> <li><a title="Nieuws" href="{{route('nieuws')}}">Nieuws</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li> {{-- <li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li><a title="{{$news->region->title}}" href="{{route('nieuws.regio', $news->region->slug)}}">{{$news->region->title}}</a></li> <li><a title="{{$news->region->title}}" href="{{route('nieuws.regio', $news->region->slug)}}">{{$news->region->title}}</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li> --}} <li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li>{!!$news->title!!}</li> <li>{!!$news->title!!}</li>
</ul> </ul>
@endsection @endsection
@section('tags') @section('tags')
<ul class="post_tags"> <ul class="post_tags">
<li><a href="{{route('nieuws.regio', $news->region->slug)}}" title="{{$news->region->title}}">{{$news->region->title}}</a></li> @foreach($news->tags as $tag)
<li><a href="{{route('nieuws.tag', $tag->slug)}}" title="{{$tag->titel}}">{{$tag->titel}}</a></li>
@endforeach
</ul> </ul>
@endsection @endsection
@@ -28,12 +30,6 @@
<div class="post_body"> <div class="post_body">
<ul class="post_details clearfix"> <ul class="post_details clearfix">
@if($news->region && $news->region->title != "Regio")
<li class="detail category"><i class="fa-solid fa-location-dot"></i> Regio <a href="{{route('nieuws.regio', $news->region->slug)}}" title="{{$news->region->title}}">{{$news->region->title}}</a></li>
@endif
@if($news->theme && $news->theme->title != "Overig")
<li class="detail category"><i class="fa-solid fa-tag fa-rotate-90"></i> Thema <a href="{{route('nieuws.thema', $news->theme->slug)}}" title="{{$news->theme->title}}">{{$news->theme->title}}</a></li>
@endif
<li class="detail date"> <li class="detail date">
<i class="fa-regular fa-clock"></i> <i class="fa-regular fa-clock"></i>
{{Formatter::relativeDate($news->published)}} om {{$news->published->format('H:i')}} {{Formatter::relativeDate($news->published)}} om {{$news->published->format('H:i')}}
@@ -51,30 +47,6 @@
</ul> </ul>
@if($news->podcast)
@include('widgets/mediaplayer')
<div class="announcement">
<div>
<audio controls>
<source src="{{ $url = url( $apiUrl . 'podcast/download' . $news->podcast->url . "?auth=" . $news->podcast->auth )}}" type="audio/mpeg" />
</audio>
</div>
<ul class="post_details clearfix">
<li class="detail date">
<i class="fa-regular fa-clock"></i>
{{ Formatter::relativeDate($news->podcast->created) }} uitgezonden
@if($news->podcast->program) in <a href="{{ route('programma') . $news->podcast->program->url }}">{{ $news->podcast->program->name }}</a> @endif
</li>
<li class="detail category">
<a href="{{ route('gemist.fragment') . $news->podcast->url }}">
<span class="fa "></span>
<span>Meer over dit fragment</span>
</a>
</li>
</ul>
</div>
@endif
<div class="post_content clearfix"> <div class="post_content clearfix">
<div class="content_box"> <div class="content_box">
@if($news->images) @if($news->images)
@@ -123,6 +95,10 @@
</div> </div>
@endif @endif
@if($news->podcast)
@include('widgets/podcastplayer', ['podcast' => $news->podcast])
@endif
@if($news->source && $news->source->show) @if($news->source && $news->source->show)
<div class="post-source"> <div class="post-source">
<p>Bron: {{$news->source->title}}</p> <p>Bron: {{$news->source->title}}</p>
@@ -133,26 +109,6 @@
@include('widgets/share') @include('widgets/share')
--}} --}}
{{--
<ul class="taxonomies tags left clearfix">
@if($news->keywords)
@foreach($news->keywords as $keyword)
<li>
<a href="{{route('nieuws/onderwerp/' . $keyword)}}" title="Zoek meer nieuws met het onderwerp {{$keyword}}">{{$keyword}}</a>
</li>
@endforeach
@endif
</ul>
--}}
<ul class="post_tags clearfix">
<li>Tags:</li>
<li>
<a href="{{route('nieuws.thema', $news->theme->slug)}}" title="Zoek meer nieuws met het thema {{$news->theme->title}}">{{$news->theme->title}}</a>
</li>
<li>
<a href="{{route('nieuws.regio', $news->region->slug)}}" title="Zoek meer nieuws uit de regio {{$news->region->title}}">{{$news->region->title}}</a>
</li>
</ul>
<div class="share_buttons row"> <div class="share_buttons row">
<div class="col-12 col-md-auto"> <div class="col-12 col-md-auto">
<a data-share="native" href="javascript:void(0)" class="btn"> <a data-share="native" href="javascript:void(0)" class="btn">

View File

@@ -51,16 +51,11 @@
title="{{strip_tags($item->title)}}">{!!$item->title!!}</a> title="{{strip_tags($item->title)}}">{!!$item->title!!}</a>
</h2> </h2>
<ul class="post_details clearfix"> <ul class="post_details clearfix">
@if($item->region) @foreach($item->tags as $tag)
<li class="detail category"><i class="fa-solid fa-location-dot"></i> Regio <a <li class="detail category"><i class="fa-solid fa-location-dot"></i> <a
href="{{route('nieuws.regio', $item->region->slug)}}" href="{{route('nieuws.tag', $tag->slug)}}"
title="{{$item->region->title}}">{{$item->region->title}}</a></li> title="{{$tag->titel}}">{{$tag->titel}}</a></li>
@endif @endforeach
@if($item->theme)
<li class="detail category"><i class="fa-solid fa-tag fa-rotate-90"></i> Thema
<a href="{{route('nieuws.thema', $item->theme->slug)}}"
title="{{$item->theme->title}}">{{$item->theme->title}}</a></li>
@endif
@if($item->edited && ($item->edited != $item->published)) @if($item->edited && ($item->edited != $item->published))
<li class="date edited"> <li class="date edited">
<i class="fa-regular fa-clock"></i> <i class="fa-regular fa-clock"></i>

View File

@@ -1,48 +1,51 @@
@foreach($content as $block) @foreach($content as $block)
@if($block->type == "headerRichA") @if($block->type == "headerRichA")
@php($block->image->url = isset($block->image->crops) @php($block->image->url = isset($block->image->crops)
? $block->image->crops->{'16:9'}->{'1600'} ? $block->image->crops->{'16:9'}->{'1600'}
: $block->image->crop) : $block->image->crop)
<a href="{{$block->image->url}}" class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" title="{{$block->image->title}}"> <a href="{{$block->image->url}}" class="post_image page_margin_top prettyPhoto" rel="prettyPhoto"
<img src="{{$block->image->url}}" alt="{{$block->image->title}}"> title="{{$block->image->title}}">
</a> <img src="{{$block->image->url}}" alt="{{$block->image->title}}">
<div class="sentence margin_top_10"> </a>
<span class="text">{{$block->image->title}}</span> <div class="sentence margin_top_10">
@if($block->image->author) <span class="text">{{$block->image->title}}</span>
<span class="author">{{$block->image->author}}</span> @if($block->image->author)
@endif <span class="author">{{$block->image->author}}</span>
</div> @endif
@elseif($block->type == "text") </div>
<div class="text">{!!$block->text!!}</div> @elseif($block->type == "text")
@elseif($block->type == "intro") <div class="text">{!!$block->text!!}</div>
<h3 class="excerpt">{!!strip_tags($block->text)!!}</h3> @elseif($block->type == "intro")
@elseif($block->type == "info") <h3 class="excerpt">{!!strip_tags($block->text)!!}</h3>
@if(strpos($block->text, "Meer nieuws uit 't Gooi?") === false) @elseif($block->type == "info")
<div class="info" style="background-color: {{$block->color}};">{!!($block->text)!!}</div> @if(strpos($block->text, "Meer nieuws uit 't Gooi?") === false)
@endif <div class="info" style="background-color: {{$block->color}};">{!!($block->text)!!}</div>
@elseif($block->type == "quote") @endif
<blockquote> @elseif($block->type == "quote")
{!!$block->text!!} <blockquote>
<div class="author">{{$block->name}}</div> {!!$block->text!!}
</blockquote> <div class="author">{{$block->name}}</div>
@elseif($block->type == "image") </blockquote>
<?php @elseif($block->type == "image")
<?php
if(isset($block->image->imageWide)) if(isset($block->image->imageWide))
$image = $block->image->imageWide; $image = $block->image->imageWide;
else if(isset($block->image->crop)) else if(isset($block->image->crop))
$image = $block->image->crop; $image = $block->image->crop;
else if(isset($block->image->crops) && isset($block->image->crops->{'16:9'})) else if(isset($block->image->crops) && isset($block->image->crops->{'16:9'}))
foreach($block->image->crops->{'16:9'} as $image) break; foreach($block->image->crops->{'16:9'} as $image) break;
else if(isset($block->image->imageHigh)) else if(isset($block->image->imageHigh))
$image = $block->image->imageHigh; $image = $block->image->imageHigh;
else $image = null; else $image = null;
?> ?>
@if($image) @if($image)
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}" title="{{$block->image->title}} &copy; {{$block->image->author}}"> <a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}"
<img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image" alt="{{$block->image->title}}" title="" style="display: block;"> title="{{$block->image->title}} &copy; {{$block->image->author}}">
</a> <img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image"
<div class="sentence"> alt="{{$block->image->title}}" title="" style="display: block;">
<?php </a>
<div class="sentence">
<?php
$sentence = []; $sentence = [];
if (isset($block->image->caption) && $block->image->caption) { if (isset($block->image->caption) && $block->image->caption) {
$sentence[] = '<span class="text">' . $block->image->caption . '</span>'; $sentence[] = '<span class="text">' . $block->image->caption . '</span>';
@@ -54,52 +57,88 @@
} }
$sentence = join('<span class="separator">|</span>', $sentence); $sentence = join('<span class="separator">|</span>', $sentence);
?> ?>
{!!$sentence!!} {!!$sentence!!}
</div> </div>
@endif @endif
@elseif($block->type == "video" || $block->type == "headerVideo") @elseif($block->type == "video" || $block->type == "headerVideo")
@include('widgets/mediaplayer') @include('widgets/mediaplayer')
<?php <?php
$attr = ''; $attr = '';
if (isset($block->video->images[0]->imageMedia) && $block->video->images[0]->imageMedia) { if (isset($block->video->images[0]->imageMedia) && $block->video->images[0]->imageMedia) {
$attr = ' poster="' . $block->video->images[0]->imageMedia . '"'; $attr = ' poster="' . $block->video->images[0]->imageMedia . '"';
} }
?> ?>
<video controls{!!$attr!!}> <video controls{!!$attr!!}>
@foreach($block->video->streams as $stream) @foreach($block->video->streams as $stream)
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" /> <source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
@endforeach @endforeach
</video> </video>
<div class="sentence"> <div class="sentence">
<span class="author">{{$block->video->author}}</span> <span class="author">{{$block->video->author}}</span>
</div> </div>
@elseif($block->type == "carousel") @elseif($block->type == "carousel")
<div class="horizontal_carousel_container gallery"> <div class="horizontal_carousel_container gallery">
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750"> <ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
@foreach($block->items as $image) @foreach($block->items as $image)
<?php <?php
if(isset($image->image->imageWide)) if(isset($image->image->imageWide))
$img = $image->image->imageWide; $img = $image->image->imageWide;
else if(isset($block->image->crop)) else if(isset($block->image->crop))
$image = $block->image->crop; $image = $block->image->crop;
else if(isset($image->image->crops) && isset($image->image->crops->{'16:9'})) else if(isset($image->image->crops) && isset($image->image->crops->{'16:9'}))
foreach($image->image->crops->{'16:9'} as $img) break; foreach($image->image->crops->{'16:9'} as $img) break;
else if(isset($image->image->imageHigh)) else if(isset($image->image->imageHigh))
$img = $image->image->imageHigh; $img = $image->image->imageHigh;
else $img = null; else $img = null;
?> ?>
@if($img) @if($img)
<li> <li>
<a href="{{$img}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery]" title="{{$image->image->title}} &copy; {{$image->image->author}}"> <a href="{{$img}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery]"
<img src="{{$img}}" alt="{{$image->image->title}}" title="{{$image->image->title}}"> title="{{$image->image->title}} &copy; {{$image->image->author}}">
</a> <img src="{{$img}}" alt="{{$image->image->title}}" title="{{$image->image->title}}">
</li> </a>
</li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</div> </div>
@elseif($block->type == "oembed") @elseif($block->type == "oembed")
<div class="oembed" data-url="{{$block->url}}">{!!$block->html!!}</div> <div class="oembed" data-url="{{$block->url}}">{!!$block->html!!}</div>
@endif @elseif($block->type == "podcast" && $block->id == $news->podcast?->id)
@endforeach @include('widgets/podcastplayer', ['podcast' => $news->podcast])
<? $news->podcast = null; // Avoid adding the player again ?>
@elseif($block->type == 'article' && count($block->articles) && $block->articles[0]->published)
<div class="block">
<h4 class="box_header"><span>{{ $block->title }}</span></h4>
<div class="box full-width">
<ul id="items-more-news" class="blog">
@foreach($block->articles as $article)
<? if(!isset($article->published)) continue;
$article->published = new \DateTime($article->published); ?>
<li class="post">
<div class="row">
@if($article->image)
<div class="col-4">
<a href="{{ route('nieuws.detail', ['id' => $article->id, 'title' => $article->slug]) }}"
title="{{ $article->title }}">
<img src="{{ $article->image }}" alt="{{ $article->image_title }}">
</a>
</div>
@endif
<div class="col-8">
<h2 class="post_title"><a class="clipText clipText-3"
href="{{ route('nieuws.detail', ['id' => $article->id, 'title' => $article->slug]) }}"
title="{!! $article->title !!}">{!! $article->title !!}</a></h2>
<span class="post_date" title="Vandaag om 09:30">
<i class="fa-regular fa-clock"></i>
{{Formatter::relativeDate($article->published)}} om {{$article->published->format('H:i')}}
</span>
</div>
</div>
</li>
@endforeach
</ul>
</div>
</div>
@endif
@endforeach

View File

@@ -0,0 +1,56 @@
<div class="content pt-2">
@if($podcast == null)
<span>De podcast kan helaas (op dit moment) niet weergegeven worden.</span>
@else
@include('widgets/mediaplayer')
@if ($podcast)
<?php
$audioUrl = url($apiUrl . 'podcast/download' . $podcast->url . "?auth=" . $podcast->auth);
$popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth;
?>
<div class="announcement p-3">
<h3 class="page_title">{{$podcast->title}}</h3>
<div class="post_body">
<ul class="post_details clearfix">
<li class="detail date">
<i class="fa-regular fa-clock"></i>
{{ Formatter::relativeDate($podcast->created) }}
</li>
@if($podcast->program)
<li class="detail author">
<a href="{{ route('programma') . $podcast->program->url }}">{{ $podcast->program->name }}</a>
</li>
@endif
</ul>
<audio controls>
<source src="{{$audioUrl}}" type="audio/mpeg" />
</audio>
<div class="clearfix">
<a class="action_button btn" href="{{$audioUrl}}" title="Download dit fragment als MP3">
<span>Download fragment</span>
</a>
<a class="action_button btn player" href="{{$popoutUrl}}">
<span>Luister in nieuw venster</span>
</a>
</div>
<div class="row content_box clearfix mt-2">
@if($podcast->image)
<div class="col-3">
<img src="{{$imgBase . $podcast->image->url}}" title="{{$podcast->image->title}}"
style="display: block; width: 100%;" />
<div class="sentence">
<span class="text">{{$podcast->image->title}}</span>
</div>
</div>
@endif
<div class="col excerpt">{!!$podcast->content!!}</div>
</div>
</div>
</div>
@endif
@endif
</div>

View File

@@ -17,6 +17,7 @@ Route::get('/nieuws', 'NewsController@overview')->name('nieuws');
Route::get('/nieuws/more', 'NewsController@more')->name('nieuws.more'); Route::get('/nieuws/more', 'NewsController@more')->name('nieuws.more');
Route::get('/nieuws/populair', 'NewsController@populair')->name('nieuws.populair'); Route::get('/nieuws/populair', 'NewsController@populair')->name('nieuws.populair');
Route::get('/nieuws/regio/{region}', 'NewsController@regionlist' )->where(['region' => '[a-z0-9]+'])->name('nieuws.regio'); Route::get('/nieuws/regio/{region}', 'NewsController@regionlist' )->where(['region' => '[a-z0-9]+'])->name('nieuws.regio');
Route::get('/nieuws/tag/{tag}', 'NewsController@taglist' )->where(['tag' => '[a-z0-9-]+'])->name('nieuws.tag');
Route::get('/nieuws/thema/{theme}', 'NewsController@themelist' )->where(['themelist' => '[a-z0-9]+'])->name('nieuws.thema'); Route::get('/nieuws/thema/{theme}', 'NewsController@themelist' )->where(['themelist' => '[a-z0-9]+'])->name('nieuws.thema');
Route::get('/nieuws/{id}/{title}', 'NewsController@show')->where(['id' => '\d+'])->name('nieuws.detail'); Route::get('/nieuws/{id}/{title}', 'NewsController@show')->where(['id' => '\d+'])->name('nieuws.detail');
Route::get('/nieuws/zoeken/{query}', 'NewsController@search')->name('nieuws.zoeken'); Route::get('/nieuws/zoeken/{query}', 'NewsController@search')->name('nieuws.zoeken');
@@ -52,6 +53,7 @@ Route::get('/luister/fragment')->name('luister.podcast');
Route::get('/luister/programma/{year}/{month}/{day}/{hour}/{duration}/{offset?}', 'StreamController@program') Route::get('/luister/programma/{year}/{month}/{day}/{hour}/{duration}/{offset?}', 'StreamController@program')
->where(['id' => '\d+', 'year' => '20\d\d', 'month' => '\d\d?', 'day' => '\d\d?', 'hour' => '\d\d?', 'duration' => '\d\d?', 'offset' => '\d\d?']); ->where(['id' => '\d+', 'year' => '20\d\d', 'month' => '\d\d?', 'day' => '\d\d?', 'hour' => '\d\d?', 'duration' => '\d\d?', 'offset' => '\d\d?']);
Route::get('/luister/programma')->name('luister.programma'); Route::get('/luister/programma')->name('luister.programma');
Route::get('/luister/fragment/inline/{id}', 'StreamController@inline')->where(['id' => '\d+']);
Route::get('/gemist', 'RadioController@podcasts')->name('gemist'); Route::get('/gemist', 'RadioController@podcasts')->name('gemist');
Route::get('/gemist/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken'); Route::get('/gemist/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');