Files
nhgooi.nl/resources/views/newsitem.blade.php
T
eric.busandClaude Opus 5.5 df8c8a9c4f Show at most 4 categories, the rest behind a '+N' tag
- New partial/tag_list: first 4 categories, then a '+N' tag that opens
  the remaining ones (hover/keyboard on desktop, tap on touch screens;
  short close delay so the mouse can reach the list)
- Used on the homepage, the article page and the news overview / tag
  pages (the latter now use the same pills instead of text links)
- Article page: tag row grows when the tags wrap (was a fixed height)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:48:50 +01:00

128 lines
4.2 KiB
PHP

@extends('layouts/sidebar')
@section('title')
{!!$news->title!!}
@endsection
@section('page_class')news_post post_container @endsection
{{-- The article itself is an <article> element (title, details and text) --}}
@section('content_tag', 'article')
@push('head')
@include('partial/news_jsonld', ['news' => $news])
@endpush
@section('breadcrumb')
<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="Nieuws" href="{{route('nieuws')}}">Nieuws</a></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>{!!$news->title!!}</li>
</ul>
@endsection
@section('tags')
<ul class="post_tags">
@include('partial/tag_list', ['tags' => $news->tags])
</ul>
@endsection
@section('content')
<div class="post_body">
<ul class="post_details clearfix">
<li class="detail date">
<i class="fa-regular fa-clock"></i>
<time datetime="{{$news->published->format(DATE_ATOM)}}">{{Formatter::relativeDate($news->published)}} om {{$news->published->format('H:i')}}</time>
@if($news->edited && ($news->edited->format('d m H i') != $news->published->format('d m H i')))
| bijgewerkt:
<time datetime="{{$news->edited->format(DATE_ATOM)}}">@if($news->edited->format('d m') != $news->published->format('d m')){{strtolower(Formatter::relativeDate($news->edited))}} @endif om {{$news->edited->format('H:i')}} uur</time>
@endif
</li>
@if($news->author)
<li class="detail author"><i class="fa-solid fa-pen"></i> {{$news->author}}</li>
@endif
</ul>
<div class="post_content clearfix">
<div class="content_box">
@if($news->images)
@if(count($news->images) == 1)
<div class="post_image_box">
<a href="{{$imgBase . $news->images[0]->url}}" class="post_image prettyPhoto" rel="prettyPhoto" title="{{$news->images[0]->title}}">
<img src='{{$imgBase . $news->images[0]->url}}' alt='{{$news->images[0]->title}}'>
</a>
<div class="sentence">
<span class="text">{{$news->images[0]->title}}</span>
@if(isset($news->images[0]->author))
<span class="author">{{$news->images[0]->author}}</span>
@endif
</div>
</div>
@else
<div class="horizontal_carousel_container thin page_margin_top gallery_control">
<ul class="horizontal_carousel control-for-post-gallery visible-5 autoplay-0 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
@foreach($news->images as $image)
<li>
<a href="#"><img src='{{$imgBase . $image->url}}'></a>
</li>
@endforeach
</ul>
</div>
<div id="control-by-post-gallery" class="horizontal_carousel_container big margin_top_10">
<ul id="post-gallery" class="horizontal_carousel visible-1 autoplay-0 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
@foreach($news->images as $image)
<li>
<a href="{{$imgBase . $image->url}}" data-rel="gallery" title="{{$image->title}}">
<span class="icon fullscreen animated"></span>
<img src='{{$imgBase . $image->url}}' alt='{{$image->title}}'>
</a>
</li>
</ul>
@endforeach
</div>
@endif
@endif
@if($type == "nhnieuws")
@include('partial/nh_story', ['content' => $news->content])
@elseif($type == "artikel")
@include('partial/block_story', ['content' => $news->content])
@else
<div class="text">
<p>{!!$news->content!!}</p>
</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>
</div>
@endif
{{--
@include('widgets/share')
--}}
<div class="share_buttons row">
<div class="col-12 col-md-auto">
<a data-share="native" href="javascript:void(0)" class="btn">
Delen
</a>
</div>
</div>
</div>
</div>
</div>
@endsection