Add tests for featured thumbnail generation; apply Pint formatting and related edits

This commit is contained in:
2026-05-06 18:55:40 +02:00
parent 7a8bc8e22a
commit 82f2b1f660
65 changed files with 11325 additions and 49545 deletions

View File

@@ -6,14 +6,55 @@
@section('news_content')
@php
$articleItems = collect([$featured])
->merge($highlights)
->merge($articles->items())
->filter(fn ($article) => $article !== null)
->unique('id')
->values();
$headerBreadcrumbs = collect([
(object) ['name' => 'Community', 'url' => route('community.activity')],
(object) ['name' => 'Announcements', 'url' => route('news.index')],
(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
<x-nova-page-header
section="Community"
section="News"
title="News"
icon="fa-newspaper"
:breadcrumbs="$headerBreadcrumbs"
@@ -44,7 +85,7 @@
<div class="grid lg:grid-cols-[1.25fr_0.95fr]">
<div class="relative min-h-[280px] overflow-hidden bg-black/20">
@if($featured->cover_url)
<img src="{{ $featured->cover_url }}" alt="{{ $featured->title }}" class="h-full w-full object-cover transition duration-500 group-hover:scale-[1.03]">
<img src="{{ $featured->cover_url }}" @if($featured->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
<div class="absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(56,189,248,0.14),transparent_45%),linear-gradient(180deg,rgba(15,23,42,0.96),rgba(2,6,23,0.98))]"></div>
@endif