Podcasts en lees meer... toegevoegd aan nieuwsartikelen
This commit is contained in:
7
public/js/main.js
vendored
7
public/js/main.js
vendored
@@ -1,7 +0,0 @@
|
||||
$(function() {
|
||||
$('.podcast-player').each(function() {
|
||||
var id = $(this).data('id');
|
||||
var auth = $(this).data('auth');
|
||||
$(this).load('/luister/fragment/inline/' + id + '?auth=' + auth);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -47,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)
|
||||
@@ -119,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>
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
@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>
|
||||
@if (preg_match('!/gemist/fragment/([0-9]*)/!', $block->text, $match))
|
||||
<div class="podcast-player" data-id="{{ $match[1] }}" data-auth="{{ sha1($match[1] . ':' . date('Y-m-d')) }}"></div>
|
||||
@endif
|
||||
@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($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;
|
||||
$image = $block->image->imageWide;
|
||||
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'}))
|
||||
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
|
||||
@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>';
|
||||
@@ -57,52 +57,87 @@
|
||||
}
|
||||
$sentence = join('<span class="separator">|</span>', $sentence);
|
||||
?>
|
||||
{!!$sentence!!}
|
||||
</div>
|
||||
@endif
|
||||
@elseif($block->type == "video" || $block->type == "headerVideo")
|
||||
@include('widgets/mediaplayer')
|
||||
<?php
|
||||
{!!$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)
|
||||
<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;
|
||||
$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;
|
||||
$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>
|
||||
<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>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@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))
|
||||
<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)
|
||||
<? $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
|
||||
@@ -1,61 +1,56 @@
|
||||
<div class="content pt-2">
|
||||
@if($podcast == null)
|
||||
@if($podcast == null)
|
||||
<span>De podcast kan helaas (op dit moment) niet weergegeven worden.</span>
|
||||
@else
|
||||
@else
|
||||
@include('widgets/mediaplayer')
|
||||
|
||||
@if ($podcast)
|
||||
<?php
|
||||
<?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>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
Reference in New Issue
Block a user