Files
nhgooi.nl/resources/views/newsitem.blade.php
T
eric.busandClaude Opus 5.5 dbbdca504e SEO: structured data and correct meta tags for news articles
- NewsArticle + BreadcrumbList JSON-LD (headline, summary, images, ISO
  dates, authors, GOOI&meer as NewsMediaOrganization publisher, section)
- Per-article meta description instead of the generic site text
- article:published_time / modified_time in ISO 8601 (was og:article:*
  in RFC 2822), article:section / article:tag, og:image:alt, og:locale nl_NL
- Canonical URL, twitter:card, robots max-image-preview:large
- <html lang="nl">, title without leading whitespace, no keywords meta
- Article wrapped in <article>, dates in <time datetime>
- Metadata is rebuilt after the controller fills in API v2 data (dates,
  author, content blocks were not reflected before)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 14:00:58 +01:00

130 lines
4.3 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">
@foreach($news->tags as $tag)
<li><a href="{{route('nieuws.tag', $tag->slug)}}" title="{{$tag->titel}}">{{$tag->titel}}</a></li>
@endforeach
</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