@extends('news.layout', [ 'metaTitle' => config('news.rss_title', 'News'), 'metaDescription' => config('news.rss_description', ''), 'metaCanonical' => route('news.index'), ]) @section('news_content') @php $articleItems = collect([$featured]) ->merge($highlights) ->merge($articles->items()) ->filter(fn ($article) => $article !== null) ->unique('id') ->values(); $headerBreadcrumbs = collect([ (object) ['name' => 'News', 'url' => route('news.index')], ]); $structuredData = [ [ '@context' => 'https://schema.org', '@type' => 'CollectionPage', 'name' => config('news.rss_title', 'News'), 'description' => config('news.rss_description', 'Latest news, feature rollouts, and team updates from Skinbase.'), 'url' => route('news.index'), ], ]; if ($articleItems->isNotEmpty()) { $structuredData[] = [ '@context' => 'https://schema.org', '@type' => 'ItemList', 'name' => config('news.rss_title', 'News') . ' Articles', 'description' => config('news.rss_description', 'Latest news, feature rollouts, and team updates from Skinbase.'), 'url' => route('news.index'), 'numberOfItems' => $articleItems->count(), 'itemListElement' => $articleItems->map(fn ($article, int $index): array => [ '@type' => 'ListItem', 'position' => $index + 1, 'name' => $article->title, 'url' => route('news.show', $article->slug), ])->all(), ]; } $seo = \App\Support\Seo\SeoDataBuilder::fromArray([ 'title' => config('news.rss_title', 'News'), 'description' => config('news.rss_description', 'Latest news, feature rollouts, and team updates from Skinbase.'), 'canonical' => route('news.index'), 'breadcrumbs' => $headerBreadcrumbs, 'structured_data' => $structuredData, ])->build(); @endphp
@if(($articles->total() ?? 0) > 0) {{ number_format($articles->total()) }} articles @endif RSS feed
@if($featured)
@if($featured->cover_url) cover_srcset) srcset="{{ $featured->cover_srcset }}" sizes="(max-width: 1023px) 100vw, 768px" @endif alt="{{ $featured->title }}" class="h-full w-full object-cover transition duration-500 group-hover:scale-[1.03]"> @else
@endif
{{ $featured->is_pinned ? 'Pinned story' : 'Featured story' }} {{ $featured->type_label }} @if($featured->category) {{ $featured->category->name }} @endif

{{ $featured->title }}

@if($featured->excerpt)

{{ Str::limit(strip_tags((string) $featured->excerpt), 220) }}

@endif
{{ $featured->author?->name ?? 'Skinbase' }} {{ $featured->published_at?->format('d M Y') }} {{ $featured->reading_time }} min read {{ number_format((int) $featured->views) }} views
@endif @if(!empty($highlights) && $highlights->isNotEmpty())
@foreach($highlights as $article) @include('news._article_card', ['article' => $article]) @endforeach
@endif
@if($articles->isEmpty())
No announcements have been published yet.
@else
@foreach($articles as $article) @include('news._article_card', ['article' => $article]) @endforeach
{{ $articles->links() }}
@endif
@endsection