From 738107515c28d04245118b63bf4ea2a1b08ab18e Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Sat, 15 Jun 2024 22:45:53 +0200 Subject: [PATCH 01/20] Wijzigingen voor nieuwe API --- app/Http/Controllers/NewsController.php | 9 ++++-- public/css/style.css | 2 ++ resources/views/home.blade.php | 38 ++++++++++++------------- resources/views/newsitem.blade.php | 34 ++++------------------ resources/views/newslist.blade.php | 15 ++++------ routes/web.php | 1 + 6 files changed, 39 insertions(+), 60 deletions(-) diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php index f5678748..6e827c06 100644 --- a/app/Http/Controllers/NewsController.php +++ b/app/Http/Controllers/NewsController.php @@ -72,14 +72,19 @@ class NewsController extends Controller 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) diff --git a/public/css/style.css b/public/css/style.css index 334eac24..73c9b2a1 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -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; diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index f2e19ffe..ab06f92f 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -24,13 +24,13 @@

{!!$item->title!!}

@@ -61,13 +61,13 @@

{!!$item->title!!}

@@ -102,13 +102,13 @@
{!!$item->title!!}
diff --git a/resources/views/newsitem.blade.php b/resources/views/newsitem.blade.php index 79aedbcf..5ec55082 100644 --- a/resources/views/newsitem.blade.php +++ b/resources/views/newsitem.blade.php @@ -11,16 +11,18 @@
  • Home
  • Nieuws
  • -
  • +{{--
  • {{$news->region->title}}
  • -
  • +--}}
  • {!!$news->title!!}
  • @endsection @section('tags') @endsection @@ -28,12 +30,6 @@
    +
    + @endif +@endif + From 2799b1843f7835b82d6f74d292e998d41852841b Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Sun, 23 Jun 2024 23:18:38 +0200 Subject: [PATCH 08/20] Podcasts en lees meer... toegevoegd aan nieuwsartikelen --- public/js/main.js | 7 - resources/views/newsitem.blade.php | 28 +-- resources/views/partial/nh_story.blade.php | 181 +++++++++++------- .../views/widgets/podcastplayer.blade.php | 89 ++++----- 4 files changed, 154 insertions(+), 151 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 6ea6ddb3..e69de29b 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -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); - }); -}); diff --git a/resources/views/newsitem.blade.php b/resources/views/newsitem.blade.php index 5ec55082..6b2b81a2 100644 --- a/resources/views/newsitem.blade.php +++ b/resources/views/newsitem.blade.php @@ -47,30 +47,6 @@ - @if($news->podcast) - @include('widgets/mediaplayer') -
    -
    - -
    - -
    - @endif -
    @if($news->images) @@ -119,6 +95,10 @@
    @endif + @if($news->podcast) + @include('widgets/podcastplayer', ['podcast' => $news->podcast]) + @endif + @if($news->source && $news->source->show)

    Bron: {{$news->source->title}}

    diff --git a/resources/views/partial/nh_story.blade.php b/resources/views/partial/nh_story.blade.php index d325b421..b3ceab43 100644 --- a/resources/views/partial/nh_story.blade.php +++ b/resources/views/partial/nh_story.blade.php @@ -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) - - {{$block->image->title}} - -
    - {{$block->image->title}} - @if($block->image->author) - {{$block->image->author}} - @endif -
    - @elseif($block->type == "text") -
    {!!$block->text!!}
    - @if (preg_match('!/gemist/fragment/([0-9]*)/!', $block->text, $match)) -
    - @endif - @elseif($block->type == "intro") -

    {!!strip_tags($block->text)!!}

    - @elseif($block->type == "info") - @if(strpos($block->text, "Meer nieuws uit 't Gooi?") === false) -
    {!!($block->text)!!}
    - @endif - @elseif($block->type == "quote") -
    - {!!$block->text!!} -
    {{$block->name}}
    -
    - @elseif($block->type == "image") - type == "headerRichA") +@php($block->image->url = isset($block->image->crops) +? $block->image->crops->{'16:9'}->{'1600'} +: $block->image->crop) + + {{$block->image->title}} + +
    + {{$block->image->title}} + @if($block->image->author) + {{$block->image->author}} + @endif +
    +@elseif($block->type == "text") +
    {!!$block->text!!}
    +@elseif($block->type == "intro") +

    {!!strip_tags($block->text)!!}

    +@elseif($block->type == "info") +@if(strpos($block->text, "Meer nieuws uit 't Gooi?") === false) +
    {!!($block->text)!!}
    +@endif +@elseif($block->type == "quote") +
    + {!!$block->text!!} +
    {{$block->name}}
    +
    +@elseif($block->type == "image") +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) - - {{$block->image->title}} - -
    - image->title}} © {{$block->image->author}}"> + {{$block->image->title}} + +
    + image->caption) && $block->image->caption) { $sentence[] = '' . $block->image->caption . ''; @@ -57,52 +57,87 @@ } $sentence = join('|', $sentence); ?> - {!!$sentence!!} -
    - @endif - @elseif($block->type == "video" || $block->type == "headerVideo") - @include('widgets/mediaplayer') - +@endif +@elseif($block->type == "video" || $block->type == "headerVideo") +@include('widgets/mediaplayer') +video->images[0]->imageMedia) && $block->video->images[0]->imageMedia) { $attr = ' poster="' . $block->video->images[0]->imageMedia . '"'; } ?> - -
    - {{$block->video->author}} -
    - @elseif($block->type == "carousel") - +@elseif($block->type == "oembed") +
    {!!$block->html!!}
    +@elseif($block->type == "podcast" && $block->id == $news->podcast?->id) +@include('widgets/podcastplayer', ['podcast' => $news->podcast]) +podcast = null; // Avoid adding the player again ?> +@elseif($block->type == 'article' && count($block->articles)) +
    +

    {{ $block->title }}

    +
    +
      + @foreach($block->articles as $article) + published = new \DateTime($article->published) ?> +
    • +
      + @if($article->image) +
      + + {{ $article->image_title }} + +
      + @endif +
      +

      {!! $article->title !!}

      + +
      +
      +
    • + @endforeach +
    +
    +
    +@endif +@endforeach \ No newline at end of file diff --git a/resources/views/widgets/podcastplayer.blade.php b/resources/views/widgets/podcastplayer.blade.php index 1b31b201..00d1b3ce 100644 --- a/resources/views/widgets/podcastplayer.blade.php +++ b/resources/views/widgets/podcastplayer.blade.php @@ -1,61 +1,56 @@
    -@if($podcast == null) + @if($podcast == null) De podcast kan helaas (op dit moment) niet weergegeven worden. -@else + @else @include('widgets/mediaplayer') @if ($podcast) - url . "?auth=" . $podcast->auth); $popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth; ?> -
    -

    {{$podcast->title}}

    -
    - +
    +

    {{$podcast->title}}

    +
    + - - - -
    - @if($podcast->image) -
    - -
    - {{$podcast->image->title}} -
    -
    - @endif -
    {!!$podcast->content!!}
    -
    -
    - -
    -
    + + +
    + @if($podcast->image) +
    + +
    + {{$podcast->image->title}}
    + @endif +
    {!!$podcast->content!!}
    +
    - @endif -@endif +
    + @endif + @endif +
    \ No newline at end of file From e551e551583554ec3440853450a6c17251257e4b Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Sun, 23 Jun 2024 23:46:51 +0200 Subject: [PATCH 09/20] Lees ook... alleen laten zien als het naar loakle artikelen verwijst --- resources/views/partial/nh_story.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/partial/nh_story.blade.php b/resources/views/partial/nh_story.blade.php index b3ceab43..0259f022 100644 --- a/resources/views/partial/nh_story.blade.php +++ b/resources/views/partial/nh_story.blade.php @@ -107,13 +107,14 @@ @elseif($block->type == "podcast" && $block->id == $news->podcast?->id) @include('widgets/podcastplayer', ['podcast' => $news->podcast]) podcast = null; // Avoid adding the player again ?> -@elseif($block->type == 'article' && count($block->articles)) +@elseif($block->type == 'article' && count($block->articles) && $block->articles[0]->published)

    {{ $block->title }}

      @foreach($block->articles as $article) - published = new \DateTime($article->published) ?> + published)) continue; + $article->published = new \DateTime($article->published); ?>
    • @if($article->image) From 539dd88d42540c55cc7bb06bc8efeee638551f02 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Tue, 2 Jul 2024 15:32:48 +0200 Subject: [PATCH 10/20] Content wijzigingen voor Petra en Leon plus een kleine CSS fix op toolbar --- public/css/style.css | 2 +- resources/views/contact.blade.php | 13 ++++++++++++- resources/views/layouts/master.blade.php | 15 ++++++++------- resources/views/widgets/menu.blade.php | 4 ++-- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 334eac24..b50b4f76 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -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; } diff --git a/resources/views/contact.blade.php b/resources/views/contact.blade.php index e1cca86f..59d6dc72 100644 --- a/resources/views/contact.blade.php +++ b/resources/views/contact.blade.php @@ -18,7 +18,18 @@
      -
      +
      +

      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.

      + +

      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.

      + +

      De redactie van NH Gooi is journalistiek onafhankelijk en wordt geleid door de chef redactie.

      +

      Contactinformatie

      Neem contact op met NH Gooi, de streekomroep voor Gooi & Vechtstreek.

      diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php index cb59819d..76596255 100644 --- a/resources/views/layouts/master.blade.php +++ b/resources/views/layouts/master.blade.php @@ -45,7 +45,7 @@ Tip
    • @if(isset($searchURL)) -
    • +
    • @if(isset($searchURL)) -
    • +
    • - Home + Nieuws
    • @php($newsUrl = '/nieuws')
    • From 50d6a97fce0302573cfe1f2360f9780f7d68d117 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Tue, 2 Jul 2024 17:23:38 +0200 Subject: [PATCH 11/20] Regioagenda naar streekagenda hernoemd --- resources/views/calendarevent.blade.php | 4 ++-- resources/views/calendarlist.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/calendarevent.blade.php b/resources/views/calendarevent.blade.php index 429a1f6a..9daa8e2c 100644 --- a/resources/views/calendarevent.blade.php +++ b/resources/views/calendarevent.blade.php @@ -12,7 +12,7 @@ @@ -24,7 +24,7 @@
        @if($event->region) -
      • Regio {{$event->region}}
      • +
      • {{$event->region}}
      • @endif
      • diff --git a/resources/views/calendarlist.blade.php b/resources/views/calendarlist.blade.php index 7dcf207f..bfb9f657 100644 --- a/resources/views/calendarlist.blade.php +++ b/resources/views/calendarlist.blade.php @@ -1,7 +1,7 @@ @extends('layouts/sidebar') @section('title') - Regioagenda + Streekagenda @endsection @section('page_class') @@ -28,7 +28,7 @@ @if(!count($events)) @section('content')
        -

        Er zijn geen items in de regioagenda. Iets te melden? Mail het naar {{Html::mailto("info@nhgooi.nl")}} +

        Er zijn geen items in de streekagenda. Iets te melden? Mail het naar {{Html::mailto("info@nhgooi.nl")}} .

        @endsection From e7bae27951b44805cede4a15d451c5ce589ec15a Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Tue, 2 Jul 2024 17:23:50 +0200 Subject: [PATCH 12/20] Podcasts en fragment gemist gescheiden --- app/Http/Controllers/PodcastController.php | 15 ++++++++-- app/Http/Controllers/RadioController.php | 8 ++--- .../partial/podcastdirectitems.blade.php | 6 ++-- .../views/partial/podcastitems.blade.php | 2 +- resources/views/podcastitem.blade.php | 29 +++++++++++-------- resources/views/podcastlist.blade.php | 5 ++-- resources/views/podcastseries.blade.php | 23 ++++++++------- routes/web.php | 2 +- 8 files changed, 53 insertions(+), 37 deletions(-) diff --git a/app/Http/Controllers/PodcastController.php b/app/Http/Controllers/PodcastController.php index e1c3da86..9b945911 100644 --- a/app/Http/Controllers/PodcastController.php +++ b/app/Http/Controllers/PodcastController.php @@ -29,14 +29,23 @@ 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) { 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]); + $podcast = new \Model\Podcast($apiResult); + $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]); } } diff --git a/app/Http/Controllers/RadioController.php b/app/Http/Controllers/RadioController.php index 39c45c71..ba2087cf 100644 --- a/app/Http/Controllers/RadioController.php +++ b/app/Http/Controllers/RadioController.php @@ -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])); } } diff --git a/resources/views/partial/podcastdirectitems.blade.php b/resources/views/partial/podcastdirectitems.blade.php index 7fbd39fa..85e396ef 100644 --- a/resources/views/partial/podcastdirectitems.blade.php +++ b/resources/views/partial/podcastdirectitems.blade.php @@ -1,8 +1,8 @@
        @foreach($podcasts as $podcast) url; - $popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth; + $url = ($isPodcast ? '/podcast/aflevering' : '/gemist/fragment') . $podcast->url; + $popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth; ?>
        -@endforeach +@endforeach From f4444d44e3a98760c267e9ad5ae3e695cf242c12 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Sat, 7 Sep 2024 10:50:40 +0200 Subject: [PATCH 16/20] Lettertype en overflow fragment gefixt --- resources/views/partial/podcastdirectitems.blade.php | 4 ++-- resources/views/partial/podcastitems.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/partial/podcastdirectitems.blade.php b/resources/views/partial/podcastdirectitems.blade.php index 85e396ef..358167d9 100644 --- a/resources/views/partial/podcastdirectitems.blade.php +++ b/resources/views/partial/podcastdirectitems.blade.php @@ -22,9 +22,9 @@ {{Formatter::relativeDate($podcast->created)}}
      -

      +

      {!!$podcast->content!!} -

      +
      Luister in nieuw venster diff --git a/resources/views/partial/podcastitems.blade.php b/resources/views/partial/podcastitems.blade.php index a7c45d24..ec2bc884 100644 --- a/resources/views/partial/podcastitems.blade.php +++ b/resources/views/partial/podcastitems.blade.php @@ -43,9 +43,9 @@ $actionButton = array_merge([ @endif @if($body['show']) -

      +

      {!!$podcast->content!!} -

      +
      @endif @if(isset($showAction) && $showAction)
      From 3b55a1cf42b622a897be76a0866ab1c4abd31827 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Tue, 10 Sep 2024 20:48:42 +0200 Subject: [PATCH 17/20] Spelling --- resources/views/radioprogram.blade.php | 2 +- resources/views/widgets/contact.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/radioprogram.blade.php b/resources/views/radioprogram.blade.php index a38b9179..478e98d6 100644 --- a/resources/views/radioprogram.blade.php +++ b/resources/views/radioprogram.blade.php @@ -129,7 +129,7 @@
        @foreach($hosts as $host) -
      • {{ Html::mailto($host->email . '@nhgooi.nl', $host->name, ['class' => 'action_button']) }}
      • +
      • {{ $host->name }}
      • @endforeach
      diff --git a/resources/views/widgets/contact.blade.php b/resources/views/widgets/contact.blade.php index e287fe3e..0f94682c 100644 --- a/resources/views/widgets/contact.blade.php +++ b/resources/views/widgets/contact.blade.php @@ -3,7 +3,7 @@

      Contact met de redactie

      Heb jij een tip voor onze streekredactie? Bel of app de tiplijn: 06 - 42 91 36 37, stuur een - mail of kom lang op de Gooise Brink, + mail of kom langs op de Gooise Brink, Kerkstraat 63/27 in Hilversum

      - Lees meer + Contactinformatie
      From cc1eba59599be8becd73b49619788ed8f226dfcd Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Tue, 10 Sep 2024 20:54:56 +0200 Subject: [PATCH 18/20] Luister popout gefixt --- app/Http/Controllers/StreamController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/StreamController.php b/app/Http/Controllers/StreamController.php index dfa1a6bc..4ecb75d5 100644 --- a/app/Http/Controllers/StreamController.php +++ b/app/Http/Controllers/StreamController.php @@ -50,7 +50,7 @@ class StreamController extends Controller } return view('listen', [ - 'source' => $this->API_URL . 'podcast/download' . $apiResult->url . '?auth=' . $podcast->auth, + 'source' => $this->API_URL . 'podcast/download/' . $apiResult->url, 'title' => $podcast->title, 'content' => $podcast->title, 'isStream' => false, From 5ebf7f20bea19b5d246cdc9551ca5ca2e0ff6755 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Thu, 12 Sep 2024 13:45:41 +0200 Subject: [PATCH 19/20] API ondersteunt /stream en /download --- app/Http/Controllers/StreamController.php | 10 +++++----- resources/views/calendarevent.blade.php | 2 +- resources/views/kerkdienst.blade.php | 2 +- resources/views/listen.blade.php | 5 ++--- resources/views/partial/blogitems.blade.php | 2 +- resources/views/podcastitem.blade.php | 3 ++- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/StreamController.php b/app/Http/Controllers/StreamController.php index 4ecb75d5..841cf341 100644 --- a/app/Http/Controllers/StreamController.php +++ b/app/Http/Controllers/StreamController.php @@ -50,11 +50,11 @@ class StreamController extends Controller } return view('listen', [ - 'source' => $this->API_URL . 'podcast/download/' . $apiResult->url, + '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) { @@ -69,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', @@ -88,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' ]); } } diff --git a/resources/views/calendarevent.blade.php b/resources/views/calendarevent.blade.php index 9daa8e2c..9e7911f4 100644 --- a/resources/views/calendarevent.blade.php +++ b/resources/views/calendarevent.blade.php @@ -41,7 +41,7 @@
        diff --git a/resources/views/kerkdienst.blade.php b/resources/views/kerkdienst.blade.php index 54b6e5fc..a68efd63 100644 --- a/resources/views/kerkdienst.blade.php +++ b/resources/views/kerkdienst.blade.php @@ -18,7 +18,7 @@

        diff --git a/resources/views/listen.blade.php b/resources/views/listen.blade.php index 145b5c74..1297be65 100644 --- a/resources/views/listen.blade.php +++ b/resources/views/listen.blade.php @@ -42,8 +42,8 @@

        - @if(!$isStream && $canDownload) - + @if(!$isStream && $canDownload !== false) + Download .mp3-bestand @endif @@ -52,7 +52,6 @@ Schakel naar live-uitzending @endif -

        @endif
      @endsection diff --git a/resources/views/partial/blogitems.blade.php b/resources/views/partial/blogitems.blade.php index a04e7499..75f066ee 100644 --- a/resources/views/partial/blogitems.blade.php +++ b/resources/views/partial/blogitems.blade.php @@ -78,7 +78,7 @@
      diff --git a/resources/views/podcastitem.blade.php b/resources/views/podcastitem.blade.php index d9cd1d4b..17f28226 100644 --- a/resources/views/podcastitem.blade.php +++ b/resources/views/podcastitem.blade.php @@ -90,6 +90,7 @@ @if ($podcast) url . "?auth=" . $podcast->auth); + $streamUrl = url($apiUrl . 'podcast/stream' . $podcast->url . "?auth=" . $podcast->auth); $popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth; ?> @@ -112,7 +113,7 @@
      From 6d91e1d3ca56ff203b09f55ccb710b5cb4df1e38 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Thu, 12 Sep 2024 14:06:28 +0200 Subject: [PATCH 20/20] Uitgelicht podcast [#00028] --- app/Http/Controllers/HomeController.php | 12 ++++-------- public/css/style.css | 6 ++++-- resources/views/home.blade.php | 20 ++++++++++++++++++-- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f54d5ff0..668adff1 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -22,13 +22,9 @@ class HomeController extends Controller $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']); } } diff --git a/public/css/style.css b/public/css/style.css index 1e7a9005..c4e245a6 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1231,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; @@ -1240,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 { diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index ab06f92f..0065330f 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -170,12 +170,28 @@ @if ($podcast) url; ?> -

      Uitgelicht

      +

      Uitgelicht fragment