Merge pull request 'Pull new-api into release/dev' (#5) from new-api into release/dev

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2024-09-12 15:04:09 +02:00
37 changed files with 398 additions and 373 deletions

View File

@@ -6,56 +6,10 @@ use \Illuminate\Http\Request;
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)
{
parent::registerView($request, 'agenda', $id);
if ($id > 3) {
$apiResult = $this->API('agenda/item/' . (int)$id);
} else {
$apiResult = $this->events[$id];
}
$calendarEvent = new \Model\CalendarEvent($apiResult);
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)
{
$apiResult = $this->API('agenda/overzicht');
if (!count($apiResult)) {
$apiResult = $this->events;
}
$calendar = [];
foreach($apiResult as $calendarItem)
foreach($apiResult->events as $calendarItem)
{
$calendar[] = new \Model\CalendarEvent($calendarItem);
}

View File

@@ -49,17 +49,15 @@ class Controller extends BaseController
$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->with('data', $this->getDataFromFileAndConvert('populair_nieuws.json', ['news'], '\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));
$program->start = self::JsonToDateTime($item_data->start);
$program->end = self::JsonToDateTime($item_data->end);
}
// Need a bit of slack here, otherwise the current program may show up
@@ -68,10 +66,8 @@ class Controller extends BaseController
$i = 0;
foreach (array_reverse($data) as $item_data) {
$recent = $program = new \Model\Program($item_data->program);
$recent->start = new \DateTimeImmutable($item_data->start->date,
new \DateTimeZone($item_data->start->timezone));
$recent->end = new \DateTimeImmutable($item_data->end->date,
new \DateTimeZone($item_data->end->timezone));
$recent->start = self::JsonToDateTime($item_data->start);
$recent->end = self::JsonToDateTime($item_data->end);
if (($recent->end < $now) && (!$recent->nonstop) && (!$recent->rerun)) {
$view->with('recent', $recent);
break;
@@ -92,7 +88,7 @@ class Controller extends BaseController
});
View::composer('widgets.menu', function ($view) {
$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',
$this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
});
@@ -118,16 +114,16 @@ class Controller extends BaseController
protected function API($url)
{
// if (strpos($url, 'nieuws/overzicht') !== false) {
// return json_decode(file_get_contents(__DIR__ . '/../../../storage/app/laatste_nieuws.json'));
// }
// return [];
$arrContextOptions = [
'ssl' => [
"verify_peer" => 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)));
@@ -148,7 +144,7 @@ class Controller extends BaseController
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)) : \Carbon\Carbon::parse($obj)->setTimezone(date_default_timezone_get());
}
public function __call($method, $arguments)
@@ -167,7 +163,7 @@ class Controller extends BaseController
{
$populair = [];
$apiResult = $this->API('nieuws/populair?aantal=5');
foreach ($apiResult as $_newsItem) {
foreach ($apiResult->news as $_newsItem) {
$populair[] = new \Model\NewsItem($_newsItem);
}

View File

@@ -18,17 +18,13 @@ class HomeController extends Controller
$populair = [];
$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);
}
$podcasts = [];
$apiResult = $this->API('podcast/overzicht?aantal=3');
$podcast = new \Model\Podcast($apiResult->podcasts[0]);
foreach ($apiResult->podcasts as $_podcast) {
$podcasts[] = new \Model\Podcast($_podcast);
}
return view('home', ['populair' => $populair, 'podcasts' => $podcasts, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
$apiResult = $this->API('podcast/overzicht?aantal=15');
$index = array_rand($apiResult->podcasts);
$podcast = new \Model\Podcast($apiResult->podcasts[$index]);
return view('home', ['populair' => $populair, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
}
}

View File

@@ -29,12 +29,12 @@ class JobsController extends Controller
private function listJobs(Request $request, $url, $title = null)
{
$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 = [];
foreach($apiResult->jobs as $jobsItem)
{
$jobs[] = new \Model\JobOpening($jobsItem);
}
#foreach($apiResult->jobs as $jobsItem)
#{
# $jobs[] = new \Model\JobOpening($jobsItem);
#}
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']);

View File

@@ -27,7 +27,7 @@ class NewsController extends Controller
break;
case 2:
$source = $apiResult->source;
$source = $apiResult->source->article;
$newsItem->published = self::TimestampToDateTime($source->created);
$newsItem->edited = self::TimestampToDateTime($source->updated);
$newsItem->author = $source->author;
@@ -65,21 +65,26 @@ class NewsController extends Controller
$id = $request->get('id', '');
$populair = [];
$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);
}
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)
{
return $this->listNews($request, 'regio/' . $region, ucfirst($region));
return $this->listNews($request, 'tag/' . $region, ucfirst($region));
}
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)
@@ -145,7 +150,7 @@ class NewsController extends Controller
}
$apiResult = $this->API('nieuws/populair?pagina=' . (int)max(1,
$page) . ($total ? '&aantal=' . $total : ''));
foreach ($apiResult as $newsItem) {
foreach ($apiResult->news as $newsItem) {
$populair[] = new \Model\NewsItem($newsItem);
}
@@ -172,7 +177,7 @@ class NewsController extends Controller
{
$apiResult = $this->API('nieuws/populair');
$news = [];
foreach ($apiResult as $newsItem) {
foreach ($apiResult->news as $newsItem) {
$news[] = new \Model\NewsItem($newsItem);
}

View File

@@ -29,7 +29,7 @@ class PodcastController extends Controller
$podcasts[] = new \Model\Podcast($podcast);
}
return view($request->ajax() ? 'partial.podcastitems' : 'podcastseries', array_merge($viewData, ['podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']));
return view($request->ajax() ? 'partial.podcastitems' : 'podcastseries', array_merge($viewData, ['podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => true]));
}
public function podcast(Request $request, $id)
@@ -37,6 +37,15 @@ class PodcastController extends Controller
parent::registerView($request, 'podcast', $id);
$apiResult = $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast($apiResult);
return view('podcastitem', ['podcast' => $podcast, 'metadata' => $podcast->metadata]);
$podcasts = [];
if($podcast->program) {
$apiResult = $this->API('podcast/programma/' . (int)$podcast->program->id . '?pagina=1&aantal=5');
$podcasts = [];
foreach($apiResult->podcasts as $p)
{
$podcasts[] = new \Model\Podcast($p);
}
}
return view('podcastitem', ['podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'isPodcast' => true]);
}
}

View File

@@ -56,7 +56,7 @@ class RadioController extends Controller
public function podcast(Request $request, $id, $title = '')
{
if($this->checkAPI('podcast/details/' . (int)$id) != "200"){
return view('podcastitem', array_merge($this->getSidebareData(), ['title' => $title, 'podcast' => null, 'metadata' => null, 'related' => [], 'searchURL' => 'gemist/zoeken']));
return view('podcastitem', array_merge($this->getSidebareData(), ['title' => $title, 'podcast' => null, 'metadata' => null, 'related' => [], 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]));
}
parent::registerView($request, 'podcast', $id);
@@ -71,7 +71,7 @@ class RadioController extends Controller
$podcasts[] = new \Model\Podcast($_podcast);
}
return view($request->ajax() ? 'partial/podcastitems' : 'podcastitem', ['title' => $title, 'podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']);
return view($request->ajax() ? 'partial/podcastitems' : 'podcastitem', ['title' => $title, 'podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]);
}
public function podcasts(Request $request, $programma = null)
@@ -107,7 +107,7 @@ class RadioController extends Controller
}
}
return view($request->ajax() ? 'partial/programitems' : 'programlist', ['programs' => array_reverse($programs)]);
return view($request->ajax() ? 'partial/programitems' : 'programlist', ['programs' => array_reverse($programs), 'isPodcast' => false]);
}
private function getPodcastList(Request $request, $action, $viewData = [])
@@ -120,7 +120,7 @@ class RadioController extends Controller
$podcasts[] = new \Model\Podcast($podcast);
}
return view($request->ajax() ? 'partial/podcastitems' : 'podcastlist', array_merge($viewData, ['id' => 'items-podcasts', 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken']));
return view($request->ajax() ? 'partial/podcastitems' : 'podcastlist', array_merge($viewData, ['id' => 'items-podcasts', 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]));
}
}

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']);
}
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)
{
$apiResult = $this->API('podcast/details/' . (int)$id);
@@ -39,11 +50,11 @@ class StreamController extends Controller
}
return view('listen', [
'source' => $this->API_URL . 'podcast/download' . $apiResult->url . '?auth=' . $podcast->auth,
'source' => $this->API_URL . 'podcast/stream/' . $apiResult->url,
'title' => $podcast->title,
'content' => $podcast->title,
'isStream' => false,
'canDownload' => true ]);
'canDownload' => $this->API_URL . 'podcast/download/' . $apiResult->url ]);
}
public function program(Request $request, $year, $month, $day, $hour, $duration, $offset = 0) {
@@ -58,7 +69,7 @@ class StreamController extends Controller
}
return view('listen', [
'source' => $this->API_URL . 'programma/download/' . $current->format('Y/m/d/H') . '/1',
'source' => $this->API_URL . 'programma/stream/' . $current->format('Y/m/d/H') . '/1',
'tabs' => $hours,
'title' => 'Uitzending terugluisteren',
'content' => 'de uitzending van ' . $current->format('d-m-Y, H') . ':00 uur',
@@ -77,10 +88,10 @@ class StreamController extends Controller
public function kerkdienst(Request $request) {
return view('listen', [
'source' => $this->API_URL . 'kerkdienst/download',
'source' => $this->API_URL . 'kerkdienst/stream',
'title' => 'Kerkdienst gemist',
'content' => 'de kerkdienst van afgelopen zondag',
'isStream' => false,
'canDownload' => true ]);
'canDownload' => $this->API_URL . 'kerkdienst/download' ]);
}
}

16
public/css/style.css vendored
View File

@@ -319,7 +319,7 @@ div.pp_default .pp_close:hover {
padding: 3px 9px 3px 6px;
margin: 8px auto;
}
.top_menu_container ul.right_menu li:last-child, .menu_mobile_container ul.right_menu li:last-child {
.top_menu_container ul.right_menu li.search, .menu_mobile_container ul.right_menu li.search {
border: none;
line-height: 1;
}
@@ -725,6 +725,8 @@ div.pp_default .pp_close:hover {
margin: 0;
padding: 0;
list-style: none;
display: flex;
gap: 3px;
}
.blog_grid .post .slider_content_box .post_details .category a {
padding: 6px 11px 7px;
@@ -1229,7 +1231,8 @@ div.pp_default .pp_close:hover {
.post_container .post_body h3 {
font-size: 15px;
}
.post_container .post_body .sentence {
.post_container .post_body .sentence,
.box.featured .sentence {
font-size: 12px;
font-style: italic;
line-height: 1.3;
@@ -1238,7 +1241,8 @@ div.pp_default .pp_close:hover {
display: block;
width: 100%;
}
.post_container .post_body .sentence span {
.post_container .post_body .sentence span,
.box.featured .sentence span {
padding: 0 5px;
}
.post_container .post_body blockquote {
@@ -1647,4 +1651,10 @@ a, a:hover, a:active {
}
}
.podcast-player .content {
border: solid 1px #333;
border-radius: 5px;
padding: 0.4rem;
}
/*# sourceMappingURL=style.css.map */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

1
public/js/main.js vendored
View File

@@ -1 +0,0 @@

View File

@@ -12,7 +12,7 @@
<ul class="bread_crumb">
<li><a title="Home" href="/">Home</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li><a title="Regio-agenda" href="{{route('agenda')}}">Regio-agenda</a></li>
<li><a title="Streekagenda" href="{{route('agenda')}}">Streekagenda</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li>Details</li>
</ul>
@@ -24,7 +24,7 @@
<div class="post single small_image">
<ul class="post_details clearfix">
@if($event->region)
<li class="detail category"><i class="fa-solid fa-location-dot"></i> Regio <a title="{{$event->region}}">{{$event->region}}</a></li>
<li class="detail category"><i class="fa-solid fa-location-dot"></i> <a title="{{$event->region}}">{{$event->region}}</a></li>
@endif
<li class="detail date">
<i class="fa-regular fa-clock"></i>
@@ -41,7 +41,7 @@
<div class="announcement">
<div>
<audio controls>
<source src="{{ $url = url( $apiUrl . 'podcast/download/' . $event->podcast->url . "?auth=" . $event->podcast->auth )}}" type="audio/mpeg" />
<source src="{{ $url = url( $apiUrl . 'podcast/stream/' . $event->podcast->url . "?auth=" . $event->podcast->auth )}}" type="audio/mpeg" />
</audio>
</div>
<ul class="post_details clearfix">

View File

@@ -1,7 +1,7 @@
@extends('layouts/sidebar')
@section('title')
Regioagenda
Streekagenda
@endsection
@section('page_class')
@@ -28,7 +28,7 @@
@if(!count($events))
@section('content')
<div class="page_body margin_bottom">
<p>Er zijn geen items in de regioagenda. Iets te melden? Mail het naar {{Html::mailto("info@nhgooi.nl")}}
<p>Er zijn geen items in de streekagenda. Iets te melden? Mail het naar {{Html::mailto("info@nhgooi.nl")}}
.</p>
</div>
@endsection
@@ -37,40 +37,9 @@
@section('content')
@parent
<div data-tabs class="page_body">
<div class="tabs">
<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']}}">
<div style="padding: 0" class="tab_content active" id="agenda">
@php($count = 0)
@foreach($events as $event)
@if($event->starts >= $tab['start'] && $event->ends <= $tab['end'])
@php($count++)
<?php $url = route('agenda.details', ['id' => $event->id, 'title' => $event->title]); ?>
<div class="box featured">
@@ -84,7 +53,9 @@
<h2 class="post_title"><a href="{{$url}}" title="{{$event->title}}">{!!$event->title!!}</a></h2>
<div class="sub_title" style="flex-wrap: wrap">
<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>
<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?')}}
@@ -99,14 +70,12 @@
<a class="btn fit_content" href="{{$url}}">Lees verder</a>
</div>
</div>
</div>
@endif
@endforeach
@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>
@endif
</div>
@endforeach
</div>
</div>
@endsection
@endif

View File

@@ -19,6 +19,17 @@
<div class="page_body">
<div class="row ">
<div class="col-12 col-md">
<p>NH Gooi is de publieke streekomroep van Gooi en Vechtstreek. We houden je 24 uur per dag
op de hoogte van al het nieuws, betrouwbaar en snel. Dat doen we via een eigen nieuws-
app, onze website en social media, maar ook op radio en televisie. Daarnaast brengen we
een gevarieerd aanbod van podcasts, radio- en televisieprogramma's.</p>
<p>Ons team van journalisten en programmamakers bestaat uit betaalde krachten, vrijwilligers
en stagiaires. We vinden het belangrijk mensen op te leiden en een goede plek te bieden
voor talent.</p>
<p>De redactie van NH Gooi is journalistiek onafhankelijk en wordt geleid door de chef redactie.</p>
<h3>Contactinformatie</h3>
<p>Neem contact op met NH Gooi, de streekomroep voor Gooi &amp; Vechtstreek.</p>

View File

@@ -24,13 +24,13 @@
</a>
<div class="slider_content_box">
<ul class="post_details simple">
@if($item->region)
@foreach($item->tags as $tag)
<li class="category">
<a title="Regio: {{$item->region->title}}"
href="{{route('nieuws.regio', ['region' => $item->region->slug])}}"
class="over_image">{{$item->region->title}}</a>
<a title="{{$tag->titel}}"
href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
class="over_image">{{$tag->titel}}</a>
</li>
@endif
@endforeach
</ul>
<h2><a href="{{url($item->url)}}"
title="{{$item->title}}">{!!$item->title!!}</a></h2>
@@ -61,13 +61,13 @@
</a>
<div class="slider_content_box">
<ul class="post_details simple">
@if($item->region)
@foreach($item->tags as $tag)
<li class="category">
<a title="Regio: {{$item->region->title}}"
href="{{route('nieuws.regio', ['region' => $item->region->slug])}}"
class="over_image">{{$item->region->title}}</a>
<a title="{{$tag->titel}}"
href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
class="over_image">{{$tag->titel}}</a>
</li>
@endif
@endforeach
</ul>
<h2><a href="{{url($item->url)}}"
title="{{$item->title}}">{!!$item->title!!}</a></h2>
@@ -102,13 +102,13 @@
</a>
<div class="slider_content_box">
<ul class="post_details simple">
@if($item->region)
@foreach($item->tags as $tag)
<li class="category">
<a title="Regio: {{$item->region->title}}"
href="{{route('nieuws.regio', ['region' => $item->region->slug])}}"
class="over_image">{{$item->region->title}}</a>
<a title="{{$tag->titel}}"
href="{{route('nieuws.tag', ['tag' => $tag->slug])}}"
class="over_image">{{$tag->titel}}</a>
</li>
@endif
@endforeach
</ul>
<h5 class="post_title"><a href="{{url($item->url)}}"
title="{{$item->title}}">{!!$item->title!!}</a></h5>
@@ -170,12 +170,28 @@
@if ($podcast)
<?php $url = route('gemist.fragment') . $podcast->url; ?>
<h4 class="box_header"><span>Uitgelicht</span></h4>
<h4 class="box_header"><span>Uitgelicht fragment</span></h4>
<div class="box featured">
<div class="row">
<div class="col-12 col-md-6">
<a href="{{$url}}" title="{{$podcast->title}}">
<img src="{{$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">
<?php
$sentence = [];
if ($hasImage) {
$sentence[] = '<span class="text">' . $podcast->image->title . '</span>';
} elseif (isset($podcast->image->title) && $podcast->image->title) {
$sentence[] = '<span class="text">' . $podcast->image->title . '</span>';
}
if (isset($podcast->image->author) && $podcast->image->author) {
$sentence[] = '<span class="author">' . $podcast->image->author . '</span>';
}
$sentence = join('<span class="separator">|</span>', $sentence);
?>
{!!$sentence!!}
</div>
</a>
</div>
<div class="col-12 col-md-6">

View File

@@ -18,7 +18,7 @@
</p>
<p>
<audio controls>
<source src="{{ url( $apiUrl . 'kerkdienst/download' ) }}" type="audio/mpeg" />
<source src="{{ url( $apiUrl . 'kerkdienst/stream' ) }}" type="audio/mpeg" />
</audio>
</p>
<p>

View File

@@ -10,7 +10,8 @@
<!--style-->
<link href='//fonts.googleapis.com/css?family=Roboto:300,400,700' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700' rel='stylesheet' type='text/css'>
<!--<link rel="stylesheet" type="text/css" href="/css/reset.css">
{{--
<link rel="stylesheet" type="text/css" href="/css/reset.css">
<link rel="stylesheet" type="text/css" href="/css/superfish.css">
<link rel="stylesheet" type="text/css" href="/css/jquery.qtip.css">
<link rel="stylesheet" type="text/css" href="/css/style.css">
@@ -19,7 +20,8 @@
<link rel="stylesheet" type="text/css" href="/css/responsive.css">
<link rel="stylesheet" type="text/css" href="/css/odometer-theme-default.css">
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" type="text/css" href="/css/nhgooi.css">-->
<link rel="stylesheet" type="text/css" href="/css/nhgooi.css">
--}}
<link rel="stylesheet" type="text/css" href="/css/prettyPhoto.css">
<link rel="stylesheet" type="text/css" href="/css/bootstrap-grid.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
@@ -35,9 +37,11 @@
} ?>
@stack('styles')
<link rel="shortcut icon" href="/favicon.ico">
{{--
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
--}}
<link rel="manifest" href="/site.webmanifest">
<!--rss-->
<link rel="alternate" type="application/rss+xml" title="Abonneren op NH Gooi Nieuws" href="{{env('API_URL')}}rss/nieuws" />

View File

@@ -45,7 +45,7 @@
<a href="https://wa.me/31888505651" target="_blank">Tip <i class="fa-solid fa-circle-plus"></i></a>
</li>
@if(isset($searchURL))
<li>
<li class="search">
<form class="search_form" action="{{url($searchURL)}}">
<input type="text" name="query" placeholder="Zoeken..."
value="{{isset($query) ? $query : null}}" class="search_input">
@@ -73,7 +73,7 @@
<a href="https://wa.me/31888505651" style="{{!isset($searchURL) ? 'margin-top: 3px' : ''}}" target="_blank"><span>Tip de streekredactie </span><i style="margin-top: 2px" class="fa-solid fa-circle-plus"></i></a>
</li>
@if(isset($searchURL))
<li>
<li class="search">
<form class="search_form" action="{{url($searchURL)}}">
<input type="text" name="query" placeholder="Zoeken..."
value="{{isset($query) ? $query : null}}" class="search_input">
@@ -110,17 +110,18 @@
<div class="col-12 col-md-3">
<h4 class="box_header"><span>NH Gooi</span></h4>
<p class="about">
NH Gooi is de streekomroep voor Gooi & Vechtstreek. Wij bieden een gevarieerd programma op
radio, podcasts, tv en online met muziek, achtergronden en actueel regionieuws.
NH Gooi is de streekomroep voor Gooi &amp; Vechtstreek. Wij brengen nieuws en achtergronden
op onze website, radio en televisie. Daarnaast brengen we boeiende en belangrijke podcasts
en een gevari&euml;erd programma-aanbod op al onze media-kanalen.
</p>
</div>
<div class="col-12 col-md-3">
<h4 class="box_header"><span style="height: 30px;display: block;width: 0;"></span></h4>
<p class="about">
Altijd op de hoogte blijven van nieuws en achtergronden uit de regio? <a href="{{url('app')}}">Download onze app</a>.
Altijd op de hoogte blijven van nieuws en achtergronden uit de regio? <span class="fas fa-mobile"></span> <a href="{{url('app')}}">Download onze app</a>.
</p>
<p class="about">
<a href="{{url('frequenties')}}">Klik hier</a> waar je ons kunt zien en horen.
<span class="fa fa-list"></span> <a href="{{url('frequenties')}}">Bekijk hier</a> waar je ons kunt zien en horen.
</p>
</div>
<div class="col-12 col-md-3">
@@ -186,8 +187,8 @@
<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.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/main.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.carouFredSel-6.2.1.min.js"></script>

View File

@@ -42,8 +42,8 @@
</p>
<p>
@if(!$isStream && $canDownload)
<a href="{{$source}}" class="action_button">
@if(!$isStream && $canDownload !== false)
<a href="{{$canDownload}}" class="action_button">
<span class="fa fa-download"></span><span>Download .mp3-bestand</span>
</a>
@endif
@@ -52,7 +52,6 @@
<span class="fa fa-music"></span><span>Schakel naar live-uitzending</span>
</a>
@endif
</p>
@endif
</div>
@endsection

View File

@@ -52,7 +52,7 @@
<div class="podcast_items">
<h4 class="box_header small"><span>Fragment gemist</span></h4>
<div class="box">
@include('partial/podcastitems', ['showTime' => false, 'showImage' => false, 'podcasts' => $podcasts])
@include('partial/podcastitems', ['showTime' => false, 'showImage' => false, 'podcasts' => $podcasts, 'isPodcast' => false])
</div>
</div>

View File

@@ -11,16 +11,18 @@
<li><a title="Home" href="/">Home</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></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 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>
</ul>
@endsection
@section('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>
@endsection
@@ -28,12 +30,6 @@
<div class="post_body">
<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">
<i class="fa-regular fa-clock"></i>
{{Formatter::relativeDate($news->published)}} om {{$news->published->format('H:i')}}
@@ -51,30 +47,6 @@
</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="content_box">
@if($news->images)
@@ -123,6 +95,10 @@
</div>
@endif
@if($news->podcast)
@include('widgets/podcastplayer', ['podcast' => $news->podcast])
@endif
@if($news->source && $news->source->show)
<div class="post-source">
<p>Bron: {{$news->source->title}}</p>
@@ -133,26 +109,6 @@
@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="col-12 col-md-auto">
<a data-share="native" href="javascript:void(0)" class="btn">

View File

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

View File

@@ -78,7 +78,7 @@
<div class="announcement">
<div>
<audio controls>
<source src="{{ $url = url( $apiUrl . "podcast/download" . $item->podcast->url . "?auth=" . $item->podcast->auth )}}" type="audio/mpeg" />
<source src="{{ $url = url( $apiUrl . "podcast/stream" . $item->podcast->url . "?auth=" . $item->podcast->auth )}}" type="audio/mpeg" />
</audio>
</div>
</div>

View File

@@ -3,7 +3,8 @@
@php($block->image->url = isset($block->image->crops)
? $block->image->crops->{'16:9'}->{'1600'}
: $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"
title="{{$block->image->title}}">
<img src="{{$block->image->url}}" alt="{{$block->image->title}}">
</a>
<div class="sentence margin_top_10">
@@ -38,8 +39,10 @@
else $image = null;
?>
@if($image)
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}" title="{{$block->image->title}} &copy; {{$block->image->author}}">
<img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image" alt="{{$block->image->title}}" title="" style="display: block;">
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}"
title="{{$block->image->title}} &copy; {{$block->image->author}}">
<img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image"
alt="{{$block->image->title}}" title="" style="display: block;">
</a>
<div class="sentence">
<?php
@@ -90,7 +93,8 @@
?>
@if($img)
<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]"
title="{{$image->image->title}} &copy; {{$image->image->author}}">
<img src="{{$img}}" alt="{{$image->image->title}}" title="{{$image->image->title}}">
</a>
</li>
@@ -99,7 +103,42 @@
</ul>
</div>
@elseif($block->type == "oembed")
<div class="oembed" data-url="{{$block->url}}">{!!$block->html!!}</div>
<div class="oembed" data-url="{{$block->url}}">{!!$block->html!!}</div>
@elseif($block->type == "podcast" && $block->id == $news->podcast?->id)
@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

@@ -1,7 +1,7 @@
<div>
@foreach($podcasts as $podcast)
<?php
$url = route('gemist.fragment') . $podcast->url;
$url = ($isPodcast ? '/podcast/aflevering' : '/gemist/fragment') . $podcast->url;
$popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth;
?>
<div class="box full-width featured">
@@ -15,16 +15,16 @@
<h2 class="post_title"><a href="{{$url}}" title="{{$podcast->title}}">{!!$podcast->titleWithoutProgram()!!}</a></h2>
<div class="sub_title">
@if ($podcast->program)
<a class="program_name" href="{{ route('programma') . $podcast->program->url }}"
<a class="program_name" href="/{{ ($isPodcast ? 'podcast' : 'programma') . $podcast->program->url }}"
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
@endif
<span class="post_date" title="{{Formatter::relativeDate($podcast->created)}}">
<i class="fa-regular fa-clock"></i> {{Formatter::relativeDate($podcast->created)}}
</span>
</div>
<p class="clipText clipText-7" title="{{strip_tags($podcast->content)}}">
<div class="clipText clipText-7" title="{{strip_tags($podcast->content)}}">
{!!$podcast->content!!}
</p>
</div>
<a class="action_button btn player" href="{{$popoutUrl}}">
<span class="fa fa-external-link-alt"></span>
<span>Luister in nieuw venster</span>

View File

@@ -20,7 +20,7 @@ $actionButton = array_merge([
?>
<ul id="{{$id ?? ''}}" class="{{$ul['class']}}">
@foreach($podcasts as $podcast)
<?php $url = route('gemist.fragment') . $podcast->url; ?>
<?php $url = ($isPodcast ? '/podcast/aflevering' : '/gemist/fragment') . $podcast->url; ?>
<li style="{{$li['style']}}" class="post {{$li['class']}}">
<div style="{{$content['style']}}" class="post_content {{$content['class']}}">
<h2 class="post_title">
@@ -43,9 +43,9 @@ $actionButton = array_merge([
</a>
@endif
@if($body['show'])
<p class="post_body {{$body['class']}}">
<div class="post_body {{$body['class']}}">
{!!$podcast->content!!}
</p>
</div>
@endif
@if(isset($showAction) && $showAction)
<div class="action_button {{$actionButton['class']}}">

View File

@@ -26,5 +26,5 @@
@endif
</div>
</div>
@endforeach
@endforeach

View File

@@ -4,9 +4,11 @@
@section('title')
@if($podcast)
Fragment gemist
{{ $podcast->title }}
@elseif($isPodcast)
NH Gooi Podcast
@else
Fragment {{$title}} niet gevonden
Fragment gemist
@endif
@endsection
@@ -18,14 +20,18 @@
<ul class="bread_crumb">
<li><a title="Home" href="/">Home</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li><a title="Fragment gemist" href="{{route('gemist')}}">Fragment gemist</a></li>
@if($isPodcast)
<li>NH Gooi podcast</li>
@else
<li><a title="Home" href="/gemist/fragment">Fragment gemist</a></li>
@endif
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
@if($podcast && $podcast->program)
<li><a title="{{$podcast->program->name}}"
href="{{route('gemist.programma') . $podcast->program->url}}">{{$podcast->program->name}}</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
@endif
<li>Fragment</li>
<li>{{ $podcast->title }}</li>
</ul>
@endsection
@@ -84,6 +90,7 @@
@if ($podcast)
<?php
$audioUrl = url($apiUrl . 'podcast/download' . $podcast->url . "?auth=" . $podcast->auth);
$streamUrl = url($apiUrl . 'podcast/stream' . $podcast->url . "?auth=" . $podcast->auth);
$popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth;
?>
@@ -91,7 +98,6 @@
<div class="row news_post">
<div class="col-12 col-md content_container">
<div class="box full-width post single small_image md_margin_top">
<h1 class="page_title">{{$podcast->title}}</h1>
<div class="post_body">
<ul class="post_details clearfix">
<li class="detail date">
@@ -100,14 +106,14 @@
</li>
@if($podcast->program)
<li class="detail author">
<a href="{{ route('programma') . $podcast->program->url }}">{{ $podcast->program->name }}</a>
<a href="/{{ ($isPodcast ? 'podcast' : 'programma') . $podcast->program->url }}">{{ $podcast->program->name }}</a>
</li>
@endif
</ul>
<div class="announcement">
<audio controls>
<source src="{{$audioUrl}}" type="audio/mpeg"/>
<source src="{{$streamUrl}}" type="audio/mpeg"/>
</audio>
<div class="clearfix">
<a class="action_button btn" href="{{$audioUrl}}" title="Download dit fragment als MP3">
@@ -150,15 +156,15 @@
<div data-tabs>
<div class="tabs">
<h4 data-tab-content-id="tab_more_fragmenten"
class="box_header small flex-grow-1 active"><span>Meer fragmenten</span>
class="box_header small flex-grow-1 active"><span>Meer {{$isPodcast ? 'afleveringen' : 'fragmenten'}}</span>
</h4>
</div>
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => $podcasts])
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => $podcasts, 'isPodcast' => $isPodcast])
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
data-loadmorenews='{"container":["#items-podcasts"]}'>
<span class="fas fa-spinner fa-spin" id="loading"></span>
Meer fragmenten
Meer {{$isPodcast ? 'afleveringen' : 'fragmenten'}}
</a>
</div>
</div>

View File

@@ -79,7 +79,8 @@
'class' => 'd-flex flex-column justify-content-end flex-grow-1'
],
'showAction' => true,
'podcasts' => array_slice($podcasts, 0, 8)])
'podcasts' => array_slice($podcasts, 0, 8),
'isPodcast' => $isPodcast])
</div>
@else
@@ -98,7 +99,7 @@
</h4>
</div>
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 8)])
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 8), 'isPodcast' => $isPodcast])
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
data-loadmorenews='{"container":["#items-podcasts"]}'>
<span class="fas fa-spinner fa-spin" id="loading"></span>

View File

@@ -1,7 +1,11 @@
@extends('layouts/full')
@section('title')
Fragment gemist
@if(isset($program))
{{ $program->name }}
@else
NH Gooi Podcast
@endif
@endsection
@section('page_class')
@@ -12,14 +16,12 @@
<ul class="bread_crumb ">
<li><a title="Home" href="/">Home</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li><a title="Fragment gemist" href="{{route('gemist')}}">Fragment gemist</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li>NH Gooi podcast</li>
@if(isset($program))
<li><a title="{{$program->name}}"
href="{{route('gemist.programma') . $program->url}}">{{$program->name}}</a></li>
<li class="separator"><i class="fa-solid fa-chevron-right"></i></li>
<li><a title="{{$program->name}}"
href="/podcast{{$program->url}}">{{$program->name}}</a></li>
@endif
<li>Fragmenten</li>
</ul>
@endsection
@@ -28,8 +30,7 @@
<div class="row news_post">
<div class="col-12 col-md content_container md_padding_top_80">
@if(isset($program))
<div class="box full-width post single">
<h1 class="page_title">{{$program->name}}</h1>
<div class="no-box full-width post single">
<div class="post_body">
<div class="content_box clearfix section_margin_top">
<div class="post_content page_margin_top_section ">
@@ -43,12 +44,12 @@
<div class="page_layout clearfix">
<div class="grid" id="items">
@include('partial/podcastdirectitems', ['podcasts' => array_slice($podcasts, 0, 2)])
@include('partial/podcastdirectitems', ['podcasts' => array_slice($podcasts, 0, 2), 'isPodcast' => $isPodcast])
</div><!--/.row-->
</div>
@else
<div class="box full-width">
<p class="page_body">Er zijn geen fragmenten beschikbaar.</p>
<p class="page_body">Er zijn geen items beschikbaar.</p>
</div>
@endif
</div>
@@ -62,7 +63,7 @@
</h4>
</div>
<div id="tab_more_fragmenten" class="box tab_content podcast_items active">
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 2)])
@include('partial/podcastitems', ['id' => 'items-podcasts', 'showTime' => false, 'showImage' => false, 'podcasts' => array_slice($podcasts, 2), 'isPodcast' => $isPodcast])
<a class="btn auto_width" id="meer-nieuws-more-podcast" href="#"
data-loadmorenews='{"container":["#items-podcasts"]}'>
<span class="fas fa-spinner fa-spin" id="loading"></span>

View File

@@ -129,7 +129,7 @@
<div id="host" class="box">
<ul class="list">
@foreach($hosts as $host)
<li><i class="fa-solid fa-user-tie"></i> {{ Html::mailto($host->email . '@nhgooi.nl', $host->name, ['class' => 'action_button']) }}</li>
<li><i class="fa-solid fa-user-tie"></i> {{ $host->name }}</li>
@endforeach
</ul>
</div>

View File

@@ -3,7 +3,7 @@
<h2>Contact met de redactie</h2>
<p>Heb jij een tip voor onze streekredactie? Bel of app de tiplijn:
<a href="tel:06 - 42 91 36 37" target="_blank">06 - 42 91 36 37</a>, stuur een
<a href="mailto:info@nhgooi.nl">mail</a> of kom lang op de Gooise Brink,
<a href="mailto:info@nhgooi.nl">mail</a> of kom langs op de Gooise Brink,
Kerkstraat 63/27 in Hilversum</p>
<a class="read_more" href="{{url('contact')}}">Lees meer <i class="fa-solid fa-angle-right"></i></a>
<a class="read_more" href="{{url('contact')}}">Contactinformatie <i class="fa-solid fa-angle-right"></i></a>
</div>

View File

@@ -119,13 +119,9 @@ function buildMenu($menu, $ismobile)
<nav class="d-none d-md-flex">
<div></div>
<ul class="menu d-none d-lg-block">
<li class="{{isActive('/', false) ? "selected" : ""}}">
<a href="/" title="Home">Home</a>
<li class="{{isActive('/', false) || isActive('/nieuws', false) ? "selected" : ""}}">
<a href="/" title="Nieuws">Nieuws</a>
</li>
<?php /*@php($newsUrl = '/nieuws')
<li class="{{isActive($newsUrl, false) ? "selected" : ""}}">
<a href="{{$newsUrl}}" title="Nieuws">Nieuws</a>
</li>*/ ?>
{!! buildMenu($menu, false) !!}
<li></li>
</ul>
@@ -142,12 +138,8 @@ function buildMenu($menu, $ismobile)
<a href="javascript:void(0)"><i class="fa-solid fa-xmark"></i></a>
</div>
</li>
<li class="{{isActive('/', false) ? "selected" : ""}}">
<a href="/" title="Home">Home</a>
</li>
@php($newsUrl = '/nieuws')
<li class="{{isActive($newsUrl, false) ? "selected" : ""}}">
<a href="{{$newsUrl}}" title="Nieuws">Nieuws</a>
<li class="{{isActive('/', false) || isActive('/nieuws', false) ? "selected" : ""}}">
<a href="/" title="Nieuws">Nieuws</a>
</li>
{!! buildMenu($menu, true) !!}
</ul>

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/populair', 'NewsController@populair')->name('nieuws.populair');
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/{id}/{title}', 'NewsController@show')->where(['id' => '\d+'])->name('nieuws.detail');
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')
->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/fragment/inline/{id}', 'StreamController@inline')->where(['id' => '\d+']);
Route::get('/gemist', 'RadioController@podcasts')->name('gemist');
Route::get('/gemist/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');
@@ -67,7 +69,7 @@ Route::get('/gemist/fragment/{id}/{title}', 'RadioController@podcast')->where(['
Route::get('/gemist/programma', 'RadioController@terugluisteren')->name('gemist.programma');
Route::get('/gemist/programma/{programma}/{title}', 'RadioController@podcasts')->where(['programma' => '\d+']);
Route::get('/podcast/{programma}/{title}', 'PodcastController@podcasts')->where(['programma' => '\d+']);
Route::get('/podcast/{programma}/{title}', 'PodcastController@podcasts')->where(['programma' => '\d+'])->name('podcast.overzicht');
Route::get('/podcast/fragment/{id}/{title}', 'RadioController@podcast')->where(['id' => '\d+', 'title' => '.*']);
Route::get('/podcast/aflevering/{id}/{title}', 'PodcastController@podcast')->where(['id' => '\d+']);
Route::get('/podcast/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');