feat: Add npm dependencies and update vendor paths
- Add package.json dependencies: jquery, jquery-ui, moment, daterangepicker, wavesurfer.js, air-datepicker - Create scripts/setup-vendor.js to copy npm packages to public/assets/vendor - Update view templates to use vendor paths instead of old /js/ or CDN URLs - Clean up legacy commented-out scripts in master layout
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
@foreach($content as $block)
|
||||
@if($block->type == "headerRichA")
|
||||
@php($block->data->image->url = isset($block->data->image->crops)
|
||||
? $block->data->image->crops->{'16:9'}->{'1600'}
|
||||
: $block->data->image->crop)
|
||||
<a href="{{$block->data->image->url}}" class="post_image page_margin_top prettyPhoto" rel="prettyPhoto"
|
||||
title="{{$block->data->image->title}}">
|
||||
<img src="{{$block->data->image->url}}" alt="{{$block->data->image->title}}">
|
||||
</a>
|
||||
<div class="sentence margin_top_10">
|
||||
<span class="text">{{$block->data->image->title}}</span>
|
||||
@if($block->data->image->author)
|
||||
<span class="author">{{$block->data->image->author}}</span>
|
||||
@endif
|
||||
</div>
|
||||
@elseif($block->type == "header")
|
||||
<? $level = (int)$block->data->level; if($level < 2) $level = 2; if($level > 6) $level = 6; ?>
|
||||
<h{{ $level }}>{!!$block->data->text!!}</h{{ $level }}>
|
||||
@elseif($block->type == "paragraph")
|
||||
<div class="text">{!!$block->data->text!!}</div>
|
||||
@elseif($block->type == "intro")
|
||||
<h3 class="excerpt">{!!strip_tags($block->data->text)!!}</h3>
|
||||
@elseif($block->type == "info")
|
||||
@if(strpos($block->data->text, "Meer nieuws uit 't Gooi?") === false)
|
||||
<div class="info" style="background-color: {{$block->data->color}};">{!!($block->data->text)!!}</div>
|
||||
@endif
|
||||
@elseif($block->type == "quote")
|
||||
<blockquote>
|
||||
{!!$block->data->text!!}
|
||||
<div class="author">{{$block->data->caption}}</div>
|
||||
</blockquote>
|
||||
@elseif($block->type == "image")
|
||||
<?php
|
||||
if(isset($block->data->image->imageWide))
|
||||
$image = $block->data->image->imageWide;
|
||||
else if(isset($block->data->image->crop))
|
||||
$image = $block->data->image->crop;
|
||||
else if(isset($block->data->image->crops) && isset($block->data->image->crops->{'16:9'}))
|
||||
foreach($block->data->image->crops->{'16:9'} as $image) break;
|
||||
else if(isset($block->data->image->imageHigh))
|
||||
$image = $block->data->image->imageHigh;
|
||||
else $image = null;
|
||||
?>
|
||||
@if($image)
|
||||
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}"
|
||||
title="{{$block->data->image->title}} © {{$block->data->image->author}}">
|
||||
<img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image"
|
||||
alt="{{$block->data->image->title}}" title="" style="display: block;">
|
||||
</a>
|
||||
<div class="sentence">
|
||||
<?php
|
||||
$sentence = [];
|
||||
if (isset($block->data->image->caption) && $block->data->image->caption) {
|
||||
$sentence[] = '<span class="text">' . $block->data->image->caption . '</span>';
|
||||
} elseif (isset($block->data->image->title) && $block->data->image->title) {
|
||||
$sentence[] = '<span class="text">' . $block->data->image->title . '</span>';
|
||||
}
|
||||
if (isset($block->data->image->author) && $block->data->image->author) {
|
||||
$sentence[] = '<span class="author">' . $block->data->image->author . '</span>';
|
||||
}
|
||||
$sentence = join('<span class="separator">|</span>', $sentence);
|
||||
?>
|
||||
{!!$sentence!!}
|
||||
</div>
|
||||
@endif
|
||||
@elseif($block->type == "video" || $block->type == "headerVideo")
|
||||
@include('widgets/mediaplayer')
|
||||
<?php
|
||||
$attr = '';
|
||||
if (isset($block->data->video->images[0]->imageMedia) && $block->data->video->images[0]->imageMedia) {
|
||||
$attr = ' poster="' . $block->data->video->images[0]->imageMedia . '"';
|
||||
}
|
||||
?>
|
||||
<video controls{!!$attr!!}>
|
||||
@foreach($block->data->video->streams as $stream)
|
||||
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
|
||||
@endforeach
|
||||
</video>
|
||||
<div class="sentence">
|
||||
<span class="author">{{$block->data->video->author}}</span>
|
||||
</div>
|
||||
@elseif($block->type == "carousel")
|
||||
<div class="horizontal_carousel_container gallery">
|
||||
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||
@foreach($block->data->items as $image)
|
||||
<?php
|
||||
if(isset($image->image->imageWide))
|
||||
$img = $image->image->imageWide;
|
||||
else if(isset($block->data->image->crop))
|
||||
$image = $block->data->image->crop;
|
||||
else if(isset($image->image->crops) && isset($image->image->crops->{'16:9'}))
|
||||
foreach($image->image->crops->{'16:9'} as $img) break;
|
||||
else if(isset($image->image->imageHigh))
|
||||
$img = $image->image->imageHigh;
|
||||
else $img = null;
|
||||
?>
|
||||
@if($img)
|
||||
<li>
|
||||
<a href="{{$img}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery]"
|
||||
title="{{$image->image->title}} © {{$image->image->author}}">
|
||||
<img src="{{$img}}" alt="{{$image->image->title}}" title="{{$image->image->title}}">
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@elseif($block->type == "oembed")
|
||||
<div class="oembed" data-url="{{$block->data->url}}">{!!$block->data->html!!}</div>
|
||||
@elseif($block->type == "podcast" && $block->data->id == $news->podcast?->id)
|
||||
@include('widgets/podcastplayer', ['podcast' => $news->podcast])
|
||||
<? $news->podcast = null; // Avoid adding the player again ?>
|
||||
@elseif($block->type == 'article' && count($block->data->articles) && $block->data->articles[0]->published)
|
||||
<div class="block">
|
||||
<h4 class="box_header"><span>{{ $block->data->title }}</span></h4>
|
||||
<div class="box full-width">
|
||||
<ul id="items-more-news" class="blog">
|
||||
@foreach($block->data->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[0] == '/' ? '' : '/' }}{{ $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>
|
||||
@elseif($block->type == 'embed')
|
||||
<iframe src="{{ $block->data->embed }}" class="article-iframe" id="{{ $id = uniqid('iframe_') }}" scrolling="no" frameborder="0" style="width: 0; min-width: 100% !important; border: none;" data-external="1"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",function(a){if(void 0!==a.data["datawrapper-height"]){var e=document.querySelectorAll("iframe");for(var t in a.data["datawrapper-height"])for(var r,i=0;r=e[i];i++)if(r.contentWindow===a.source){var d=a.data["datawrapper-height"][t]+"px";r.style.height=d}}})}();</script>
|
||||
@elseif($block->type == 'iframe')
|
||||
<iframe src="{{ $block->data->url }}" class="article-iframe" id="{{ $id = uniqid('iframe_') }}"></iframe>
|
||||
<style>
|
||||
@if(isset($block->data->ratio))
|
||||
#{{ $id }}.article-iframe {
|
||||
aspect-ratio: {{ str_replace(":", "/", $block->data->ratio) }};
|
||||
}
|
||||
@endif
|
||||
|
||||
@if(isset($block->data->ratioMobile))
|
||||
@media (max-width: 768px) {
|
||||
#{{ $id }}.article-iframe {
|
||||
aspect-ratio: {{ str_replace(":", "/", $block->data->ratioMobile) }};
|
||||
}
|
||||
}
|
||||
@endif
|
||||
</style>
|
||||
@endif
|
||||
@endforeach
|
||||
@@ -0,0 +1,89 @@
|
||||
@foreach($items as $item)
|
||||
<div class="row">
|
||||
<div class="post single small_image">
|
||||
<ul class="post_details clearfix">
|
||||
<li class="detail date">
|
||||
<i class="fa-regular fa-clock"></i>
|
||||
{{Formatter::relativeDate($item->published)}} om {{$item->published->format("H:i")}}
|
||||
@if($item->edited && ($item->edited->format("d m H i") != $item->published->format("d m H i")))
|
||||
| <em>bijgewerkt</em>:
|
||||
@if($item->edited->format("d m") != $item->published->format("d m"))
|
||||
{{strtolower(Formatter::relativeDate($item->edited))}}
|
||||
@endif
|
||||
om {{$item->edited->format("H:i")}} uur
|
||||
@endif
|
||||
</li>
|
||||
@if($item->author)
|
||||
<li class="detail author">{{$item->author}}</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="post_content page_margin_top clearfix">
|
||||
<div class="content_box">
|
||||
@if($item->images)
|
||||
@if(count($item->images) == 1)
|
||||
@if(!$item->images[0]->title) @php($item->images[0]->title = $item->title) @endif
|
||||
<div class="post_image_box">
|
||||
<a href="{{$imgBase . $item->images[0]->url}}" class="post_image prettyPhoto" rel="prettyPhoto" title="{{$item->images[0]->title}}">
|
||||
<img src="{{$imgBase . $item->images[0]->url}}" alt="{{$item->images[0]->title}}">
|
||||
</a>
|
||||
<div class="sentence">
|
||||
<span class="text">{{$item->images[0]->title}}</span>
|
||||
@if(isset($item->images[0]->author))
|
||||
<span class="author">{{$item->images[0]->author}}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="horizontal_carousel_container gallery">
|
||||
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||
@foreach($item->images as $image)
|
||||
@if(!$image->title) @php($image->title = $item->title) @endif
|
||||
<li>
|
||||
<a href="{{$imgBase . $image->url}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery-{{$item->id}}]" title="{{$image->title}}">
|
||||
<img src="{{$imgBase . $image->url}}" alt="{{$image->title}}" title="{{$image->title}}">
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<h3>{{$item->title}}</h3>
|
||||
|
||||
@if(is_array($item->content))
|
||||
@include("partial/nh_story", ["content" => $item->content]);
|
||||
@else
|
||||
<div class="text">
|
||||
<p>{!!$item->content!!}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($item->video)
|
||||
@include('widgets/mediaplayer')
|
||||
@php(createVideoElement($item->video))
|
||||
@endif
|
||||
|
||||
@if($item->source && $item->source->show)
|
||||
<div class="post-source">
|
||||
<p>Bron: {{$item->source->title}}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if($item->podcast)
|
||||
@include("widgets/mediaplayer")
|
||||
<div class="announcement">
|
||||
<div>
|
||||
<audio controls>
|
||||
<source src="{{ $url = url( $apiUrl . "podcast/stream" . $item->podcast->url . "?auth=" . $item->podcast->auth )}}" type="audio/mpeg" />
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
@include('partial/newslist_small', ['id' => 'items-more-news', 'news' => $news])
|
||||
@include('partial/newslist_small', ['id' => 'items-most-read', 'news' => $populair])
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
<div class="row blog post_container">
|
||||
@foreach($images as $item)
|
||||
<div class="post auto_height col-12 col-md-4">
|
||||
<div class="box">
|
||||
<a href="{{$imgBase . $item->images[0]->url}}" class="post_image prettyPhoto" rel="prettyPhoto"
|
||||
title="{{$item->images[0]->title}}">
|
||||
<img style="width: 100%" src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}'
|
||||
alt='{{$item->images && count($item->images) ? $item->images[0]->title : $item->title}}'>
|
||||
</a>
|
||||
<div class="post_body">
|
||||
<h2 class="post_title">
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{{$item->title}}</a>
|
||||
</h2>
|
||||
<ul class="post_details simple clearfix">
|
||||
<li class="category">
|
||||
<!-- <a title="Regio: {{$item->region->title}}" href="{{url('beelden/regio/' . $item->region->slug)}}">{{$item->region->title}}</a> -->
|
||||
<a title="Regio: {{$item->region->title}}" href=".">{{$item->region->title}}</a>
|
||||
</li>
|
||||
@if($item->edited && ($item->edited != $item->published))
|
||||
<li class="date edited">
|
||||
{{Formatter::relativeDate($item->edited)}} bijgewerkt
|
||||
om {{$item->published->format('H:i')}}
|
||||
</li>
|
||||
@else
|
||||
<li class="date">
|
||||
{{Formatter::relativeDate($item->published)}} om {{$item->published->format('H:i')}}
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
<p class="block-lead hidden-xs">
|
||||
{{$item->images[0]->title}} •
|
||||
{{$item->content}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<ul id="{{$id}}" class="blog">
|
||||
@foreach($news as $item)
|
||||
<li class="post">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">
|
||||
@if($item->video)
|
||||
<span class="icon video"></span>
|
||||
@elseif($item->images && count($item->images) > 1)
|
||||
<span class="icon gallery"></span>
|
||||
@endif
|
||||
<img src='{{$item->images && count($item->images) ? $imgBase . $item->images[0]->url : '/images/noimage.png'}}'
|
||||
alt='img'>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<h2 class="post_title"><a class="clipText clipText-3" href="{{url($item->url)}}"
|
||||
title="{{$item->title}}">{!!$item->title!!}</a></h2>
|
||||
<?php
|
||||
$time = Formatter::relativeDate($item->published) . ' om ' . $item->published->format('H:i');
|
||||
if ($item->edited && ($item->edited->format('d m H i') != $item->published->format('d m H i'))) {
|
||||
$time .= ' | bijgewerkt: '
|
||||
. ($item->edited->format('d m') != $item->published->format('d m') ? strtolower(Formatter::relativeDate($item->edited)) : '')
|
||||
. $item->edited->format('H:i') . ' uur';
|
||||
}
|
||||
$time = str_replace(' ', ' ', $time);
|
||||
?>
|
||||
<span class="post_date" title="{{$time}}">
|
||||
<i class="fa-regular fa-clock"></i> {{$time}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="row blocks blocks-large" data-displayswitch="blocksContainer">
|
||||
@php($i = 0)
|
||||
@foreach($news as $newsItem)
|
||||
@php($image = isset($newsItem->images) && count($newsItem->images) ? $newsItem->images[0] : null)
|
||||
|
||||
<div class="block block-news col-md-4 col-sm-6 col-xs-12">
|
||||
<a href="{{url($newsItem->url)}}" title="{{$image ? $image->title : $newsItem->title}}" alt="{{$image ? $image->title : $newsItem->title}}">
|
||||
<figure>
|
||||
<div class="image-box">
|
||||
@if($newsItem->video) <span class="item-type icon-video"></span> @endif
|
||||
<img alt="{{$image ? $image->title : $newsItem->title}}" src="{{ $image ? url( $image->url ) : url( $newsItem->video ? 'images/video.png' : 'images/noimage.png') }}" title="{{ strip_tags($image ? $image->title : $newsItem->title) }}" @if(!$image) class="hidden-xs" @endif>
|
||||
</div>
|
||||
<figcaption>
|
||||
<h3 class="block-title">{!!$newsItem->title!!}</h3>
|
||||
<p class="block-lead hidden-xs">
|
||||
{!!Formatter::excerpt($newsItem->content, 250)!!}
|
||||
</p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@php($i++)
|
||||
@if($i % 3 == 0 && $i != count($news) - 1)
|
||||
</div>
|
||||
<div class="row blocks blocks-large" data-displayswitch="blocksContainer">
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,161 @@
|
||||
@foreach($content as $block)
|
||||
@if($block->type == "headerRichA")
|
||||
@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}}">
|
||||
<img src="{{$block->image->url}}" alt="{{$block->image->title}}">
|
||||
</a>
|
||||
<div class="sentence margin_top_10">
|
||||
<span class="text">{{$block->image->title}}</span>
|
||||
@if($block->image->author)
|
||||
<span class="author">{{$block->image->author}}</span>
|
||||
@endif
|
||||
</div>
|
||||
@elseif($block->type == "text")
|
||||
<div class="text">{!!$block->text!!}</div>
|
||||
@elseif($block->type == "intro")
|
||||
<h3 class="excerpt">{!!strip_tags($block->text)!!}</h3>
|
||||
@elseif($block->type == "info")
|
||||
@if(strpos($block->text, "Meer nieuws uit 't Gooi?") === false)
|
||||
<div class="info" style="background-color: {{$block->color}};">{!!($block->text)!!}</div>
|
||||
@endif
|
||||
@elseif($block->type == "quote")
|
||||
<blockquote>
|
||||
{!!$block->text!!}
|
||||
<div class="author">{{$block->name}}</div>
|
||||
</blockquote>
|
||||
@elseif($block->type == "image")
|
||||
<?php
|
||||
if(isset($block->image->imageWide))
|
||||
$image = $block->image->imageWide;
|
||||
else if(isset($block->image->crop))
|
||||
$image = $block->image->crop;
|
||||
else if(isset($block->image->crops) && isset($block->image->crops->{'16:9'}))
|
||||
foreach($block->image->crops->{'16:9'} as $image) break;
|
||||
else if(isset($block->image->imageHigh))
|
||||
$image = $block->image->imageHigh;
|
||||
else $image = null;
|
||||
?>
|
||||
@if($image)
|
||||
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}"
|
||||
title="{{$block->image->title}} © {{$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
|
||||
$sentence = [];
|
||||
if (isset($block->image->caption) && $block->image->caption) {
|
||||
$sentence[] = '<span class="text">' . $block->image->caption . '</span>';
|
||||
} elseif (isset($block->image->title) && $block->image->title) {
|
||||
$sentence[] = '<span class="text">' . $block->image->title . '</span>';
|
||||
}
|
||||
if (isset($block->image->author) && $block->image->author) {
|
||||
$sentence[] = '<span class="author">' . $block->image->author . '</span>';
|
||||
}
|
||||
$sentence = join('<span class="separator">|</span>', $sentence);
|
||||
?>
|
||||
{!!$sentence!!}
|
||||
</div>
|
||||
@endif
|
||||
@elseif($block->type == "video" || $block->type == "headerVideo")
|
||||
@include('widgets/mediaplayer')
|
||||
<?php
|
||||
$attr = '';
|
||||
if (isset($block->video->images[0]->imageMedia) && $block->video->images[0]->imageMedia) {
|
||||
$attr = ' poster="' . $block->video->images[0]->imageMedia . '"';
|
||||
}
|
||||
?>
|
||||
<video controls{!!$attr!!}>
|
||||
@foreach($block->video->streams as $stream)
|
||||
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
|
||||
@endforeach
|
||||
</video>
|
||||
<div class="sentence">
|
||||
<span class="author">{{$block->video->author}}</span>
|
||||
</div>
|
||||
@elseif($block->type == "carousel")
|
||||
<div class="horizontal_carousel_container gallery">
|
||||
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||
@foreach($block->items as $image)
|
||||
<?php
|
||||
if(isset($image->image->imageWide))
|
||||
$img = $image->image->imageWide;
|
||||
else if(isset($block->image->crop))
|
||||
$image = $block->image->crop;
|
||||
else if(isset($image->image->crops) && isset($image->image->crops->{'16:9'}))
|
||||
foreach($image->image->crops->{'16:9'} as $img) break;
|
||||
else if(isset($image->image->imageHigh))
|
||||
$img = $image->image->imageHigh;
|
||||
else $img = null;
|
||||
?>
|
||||
@if($img)
|
||||
<li>
|
||||
<a href="{{$img}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery]"
|
||||
title="{{$image->image->title}} © {{$image->image->author}}">
|
||||
<img src="{{$img}}" alt="{{$image->image->title}}" title="{{$image->image->title}}">
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@elseif($block->type == "oembed")
|
||||
<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[0] == '/' ? '' : '/' }}{{ $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>
|
||||
@elseif($block->type == 'iframe')
|
||||
<iframe src="{{ $block->url }}" class="article-iframe" id="{{ $id = uniqid('iframe_') }}"></iframe>
|
||||
<style>
|
||||
@if(isset($block->ratio))
|
||||
#{{ $id }}.article-iframe {
|
||||
aspect-ratio: {{ str_replace(":", "/", $block->ratio) }};
|
||||
}
|
||||
@endif
|
||||
|
||||
@if(isset($block->ratioMobile))
|
||||
@media (max-width: 768px) {
|
||||
#{{ $id }}.article-iframe {
|
||||
aspect-ratio: {{ str_replace(":", "/", $block->ratioMobile) }};
|
||||
}
|
||||
}
|
||||
@endif
|
||||
</style>
|
||||
@endif
|
||||
@endforeach
|
||||
@@ -0,0 +1,91 @@
|
||||
@foreach($content as $block)
|
||||
@if($block->type == "headerRichA")
|
||||
@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}}">
|
||||
<img src="{{$block->image->url}}" alt="{{$block->image->title}}">
|
||||
</a>
|
||||
<div class="sentence margin_top_10">
|
||||
<span class="text">{{$block->image->title}}</span>
|
||||
@if($block->image->author)
|
||||
<span class="author">{{$block->image->author}}</span>
|
||||
@endif
|
||||
</div>
|
||||
@elseif($block->type == "text")
|
||||
<div class="text">{!!$block->text!!}</div>
|
||||
@elseif($block->type == "intro")
|
||||
<h3 class="excerpt">{{strip_tags($block->text)}}</h3>
|
||||
@elseif($block->type == "quote")
|
||||
<blockquote>
|
||||
{!!$block->text!!}
|
||||
<div class="author">{{$block->name}}</div>
|
||||
</blockquote>
|
||||
@elseif($block->type == "image")
|
||||
<?php
|
||||
if(isset($block->image->imageWide))
|
||||
$image = $block->image->imageWide;
|
||||
else if(isset($block->image->crop))
|
||||
$image = $block->image->crop;
|
||||
else if(isset($block->image->crops) && isset($block->image->crops->{'16:9'}))
|
||||
foreach($block->image->crops->{'16:9'} as $image) break;
|
||||
else if(isset($block->image->imageHigh))
|
||||
$image = $block->image->imageHigh;
|
||||
else $image = null;
|
||||
?>
|
||||
@if($image)
|
||||
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}" title="{{$block->image->title}} © {{$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">
|
||||
@if($block->image->title)
|
||||
<span class="text">{{$block->image->title}}</span>
|
||||
@endif
|
||||
@if($block->image->author)
|
||||
<span class="author">{{$block->image->author}}</span>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@elseif($block->type == "video" || $block->type == "headerVideo")
|
||||
@include('widgets/mediaplayer')
|
||||
<video controls>
|
||||
@foreach($block->video->streams as $stream)
|
||||
<source src="{!!$stream->stream_url!!}" type="application/x-mpegurl" />
|
||||
@endforeach
|
||||
</video>
|
||||
<span class="author">{{$block->video->author}}</span>
|
||||
@elseif($block->type == "carousel")
|
||||
<div class="horizontal_carousel_container gallery">
|
||||
<ul class="horizontal_carousel visible-5 autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
|
||||
@foreach($block->items as $image)
|
||||
<?php
|
||||
if(isset($image->image->imageWide))
|
||||
$img = $image->image->imageWide;
|
||||
else if(isset($block->image->crop))
|
||||
$image = $block->image->crop;
|
||||
else if(isset($image->image->crops) && isset($image->image->crops->{'16:9'}))
|
||||
foreach($image->image->crops->{'16:9'} as $img) break;
|
||||
else if(isset($image->image->imageHigh))
|
||||
$img = $image->image->imageHigh;
|
||||
else $img = null;
|
||||
?>
|
||||
@if($img)
|
||||
<li>
|
||||
<a href="{{$img}}" class="post_image prettyPhoto" rel="prettyPhoto[gallery]" title="{{$image->image->title}} © {{$image->image->author}}">
|
||||
<img src="{{$img}}" alt="{{$image->image->title}}" title="{{$image->image->title}}">
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<<<<<<< /srv/www/nhgooi-dev/resources/views/partial/nh_story.blade.php
|
||||
@elseif($block->type == "oembed")
|
||||
<div class="oembed" data-url="{{$block->url}}">{{!$block->html!!}</div>
|
||||
=======
|
||||
@elseif($block->type == "oembed")
|
||||
<div class="oembed" data-url="{{$block->url}}">{!!$block->html!!}</div>
|
||||
>>>>>>> /tmp/nh_story.blade.php~other.QK7_yi
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<div>
|
||||
@foreach($podcasts as $podcast)
|
||||
<?php
|
||||
$url = ($isPodcast ? '/podcast/aflevering' : '/gemist/fragment') . $podcast->url;
|
||||
$popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth;
|
||||
?>
|
||||
<div class="box full-width 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'}}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<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="/{{ ($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>
|
||||
<div class="clipText clipText-7" title="{{strip_tags($podcast->content)}}">
|
||||
{!!$podcast->content!!}
|
||||
</div>
|
||||
<a class="action_button btn player" href="{{$popoutUrl}}">
|
||||
<span class="fa fa-external-link-alt"></span>
|
||||
<span>Luister in nieuw venster</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
</div><!--/.row-->
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
$li = array_merge([
|
||||
'class' => '',
|
||||
'style' => ''
|
||||
], $li ?? []);
|
||||
$content = array_merge([
|
||||
'class' => '',
|
||||
'style' => '',
|
||||
], $content ?? []);
|
||||
$ul = array_merge([
|
||||
'class' => ''
|
||||
], $ul ?? []);
|
||||
$body = array_merge([
|
||||
'show' => false,
|
||||
'class' => ''
|
||||
], $body ?? []);
|
||||
$actionButton = array_merge([
|
||||
'class' => ''
|
||||
], $actionButton ?? []);
|
||||
?>
|
||||
<ul id="{{$id ?? ''}}" class="{{$ul['class']}}">
|
||||
@foreach($podcasts as $podcast)
|
||||
<?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">
|
||||
<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 }}"
|
||||
title="{{$podcast->program->name}}">{{$podcast->program->name}}</a>
|
||||
@endif
|
||||
<?php $time = Formatter::relativeDate($podcast->created) . (isset($showTime) && $showTime ? ' om ' . $podcast->published->format('H:i') : ''); ?>
|
||||
<span class="post_date"
|
||||
title="{{$time}}">
|
||||
<i class="fa-regular fa-clock"></i> {{$time}}
|
||||
</span>
|
||||
</div>
|
||||
@if(isset($showImage) && $showImage && $podcast->image)
|
||||
<a href="{{$url}}" title="{{$podcast->title}}" class="fixed-height">
|
||||
<img src='{{$imgBase . $podcast->image->url}}' alt='{{$podcast->image->title}}'>
|
||||
</a>
|
||||
@endif
|
||||
@if($body['show'])
|
||||
<div class="post_body {{$body['class']}}">
|
||||
{!!$podcast->content!!}
|
||||
</div>
|
||||
@endif
|
||||
@if(isset($showAction) && $showAction)
|
||||
<div class="action_button {{$actionButton['class']}}">
|
||||
<a class="btn" href="{{$url}}">Luister fragment</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
$li = array_merge([
|
||||
'class' => '',
|
||||
'style' => ''
|
||||
], $li ?? []);
|
||||
$content = array_merge([
|
||||
'class' => '',
|
||||
'style' => '',
|
||||
], $content ?? []);
|
||||
$ul = array_merge([
|
||||
'class' => ''
|
||||
], $ul ?? []);
|
||||
$body = array_merge([
|
||||
'show' => false,
|
||||
'class' => ''
|
||||
], $body ?? []);
|
||||
$actionButton = array_merge([
|
||||
'class' => ''
|
||||
], $actionButton ?? []);
|
||||
?>
|
||||
<ul id="{{$id ?? ''}}" class="{{$ul['class']}}">
|
||||
@foreach($programs as $program)
|
||||
<?php $url = route('programma') . $program->program->url; ?>
|
||||
<?php $endStartDiff = $program->end->diff($program->start);
|
||||
$duration = 24 * $endStartDiff->d + $endStartDiff->h; ?>
|
||||
<li style="{{$li['style']}}" class="post {{$li['class']}}">
|
||||
<div style="{{$content['style']}}" class="post_content {{$content['class']}}">
|
||||
<h2 class="post_title">
|
||||
<a href="{{$url}}" title="{{$program->program->name}}">{!!$program->program->name!!}</a>
|
||||
</h2>
|
||||
@if($program->current)
|
||||
<ul class="post_tags">
|
||||
<li><a href="{{route('luister.live')}}" class="onair player" title="Nu live!">Nu live!</a></li>
|
||||
</ul>
|
||||
@else
|
||||
<div class="sub_title">
|
||||
<?php $time = Formatter::relativeDate($program->start) . (isset($showTime) && $showTime ? ' om ' . $program->start->format('H:i') : ''); ?>
|
||||
<span class="post_date" title="{{$time}}">
|
||||
<i class="fa-regular fa-clock"></i> {{$time}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@if(isset($showAction) && $showAction)
|
||||
<div class="row action_button" style="margin-top: 20px;">
|
||||
@if(!$program->current)
|
||||
<div class="col">
|
||||
<a href="{{route('luister.programma') . '/' . $program->start->format('Y/m/d/H') . '/' . $duration}}"
|
||||
class="player btn" style="padding: 10px 0;width: 100%;">Luister terug</a>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col">
|
||||
<a href="{{route('programma') . $program->program->url}}" class="btn"
|
||||
style="padding: 10px 0;width: 100%;">Meer informatie</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($body['show'])
|
||||
<p class="post_body {{$body['class']}}">
|
||||
{!!strip_tags($program->program->description)!!}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
@@ -0,0 +1,30 @@
|
||||
@php($now = new \DateTime("now"))
|
||||
@foreach($days as $title => $day)
|
||||
<div id="tab_radio_items_{{$title}}" class="tab_content{{(!$date && $title == 'today') || ($date && $title == 'custom') ? ' active' : ''}}">
|
||||
<div class="row">
|
||||
@if(isset($schedule[$day]) && $schedule[$day])
|
||||
@foreach($schedule[$day] as $item)
|
||||
@php($isCurrent = ($now >= $item['starttime']) && ($now <= $item['endtime']))
|
||||
<div class="col-12 col-md-3">
|
||||
<a class="box full-width full-height" href="{{route('programma') . $item['program']->url}}"
|
||||
title="{{$item['program']->name . ($item['program']->tagline ? "\n" . $item['program']->tagline : "")}}">
|
||||
<img src="{{$item['program']->image ?? 'images/noimage.png'}}">
|
||||
@if($isCurrent)
|
||||
<div href="{{route('luister.live')}}" class="onair" title="Nu live!">Nu live!</div>
|
||||
@endif
|
||||
<div class="program-title">
|
||||
{{$item['program']->name}}
|
||||
</div>
|
||||
<div class="program-times"><i class="fa-regular fa-clock"></i>
|
||||
{{$item['starttime']->format('H:i')}} – {{$item['endtime']->format('H:i')}}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="no-results col-12">Geen resultaten gevonden.</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
Reference in New Issue
Block a user