@php $isPreview = (bool) ($previewMode ?? false); $articleUrl = $isPreview ? ($previewCanonical ?? url()->current()) : route('news.show', $article->slug); $articleSchemaImage = $article->effective_og_image ? url($article->effective_og_image) : url((string) config('seo.fallback_image_path', '/gfx/skinbase_back_001.webp')); $articleCoverSizes = '(max-width: 767px) calc(100vw - 3rem), (max-width: 1279px) calc(100vw - 5rem), 768px'; $articleCoverPreloadHref = $article->cover_desktop_url ?: $article->cover_url; $seo = \App\Support\Seo\SeoDataBuilder::fromArray([ 'title' => $article->meta_title ?: $article->title, 'description' => $article->meta_description ?: Str::limit(strip_tags((string) $article->excerpt), 160), 'keywords' => $article->meta_keywords, 'canonical' => $isPreview ? $articleUrl : ($article->canonical_url ?: $articleUrl), 'robots' => $isPreview ? 'noindex,nofollow' : 'index,follow', 'og_type' => 'article', 'og_title' => $article->effective_og_title, 'og_description' => $article->effective_og_description, 'og_image' => $article->effective_og_image, 'breadcrumbs' => collect([ (object) ['name' => 'Home', 'url' => url('/')], (object) ['name' => 'News', 'url' => route('news.index')], $article->category ? (object) ['name' => $article->category->name, 'url' => route('news.category', $article->category->slug)] : null, ])->filter()->values(), ]) ->addJsonLd(array_filter([ '@context' => 'https://schema.org', '@type' => 'NewsArticle', 'headline' => $article->title, 'description' => $article->meta_description ?: Str::limit(strip_tags((string) $article->excerpt), 160), 'image' => $articleSchemaImage ? array_filter([ '@type' => 'ImageObject', 'url' => $articleSchemaImage, 'contentUrl' => $articleSchemaImage, 'thumbnailUrl' => $article->cover_mobile_url, 'caption' => $article->title, ], fn (mixed $value): bool => $value !== null && $value !== '') : null, 'datePublished' => $article->published_at?->toIso8601String(), 'dateModified' => $article->updated_at?->toIso8601String(), 'articleSection' => $article->category?->name, 'author' => array_filter([ '@type' => 'Person', 'name' => $article->author?->name, ]), 'publisher' => [ '@type' => 'Organization', 'name' => config('seo.site_name', 'Skinbase'), ], 'mainEntityOfPage' => $articleUrl, ], fn (mixed $value): bool => $value !== null && $value !== '')) ->build(); @endphp @push('head') @if($articleCoverPreloadHref) cover_srcset) imagesrcset="{{ $article->cover_srcset }}" imagesizes="{{ $articleCoverSizes }}" @endif fetchpriority="high" > @endif @endpush @extends('news.layout', [ 'metaTitle' => $article->meta_title ?: $article->title, 'metaDescription' => $article->meta_description ?: Str::limit(strip_tags((string)$article->excerpt), 160), 'metaCanonical' => $isPreview ? $articleUrl : ($article->canonical_url ?: $articleUrl), 'metaRobots' => $isPreview ? 'noindex,nofollow' : 'index,follow', ]) @section('news_content') @php $headerBreadcrumbs = collect([ (object) ['name' => 'Home', 'url' => url('/')], (object) ['name' => 'News', 'url' => route('news.index')], $article->category ? (object) ['name' => $article->category->name, 'url' => route('news.category', $article->category->slug)] : null, ])->filter()->values(); @endphp
{{ $article->type_label }} @if($article->category) {{ $article->category->name }} @endif @if($article->is_pinned) Pinned @endif {{ $article->reading_time }} min read
@if($isPreview)
Preview mode
This article preview is visible only to newsroom staff and is excluded from indexing.
@if(!empty($previewBackUrl)) Back to editor @endif
@endif
@if($article->cover_url) @endif
@if($article->author?->username) {{ $article->author->name ?? $article->author->username }} @else {{ $article->author?->name ?? 'Skinbase' }} @endif {{ $article->published_at?->format('d M Y') }} {{ number_format((int) $article->views) }} views
@if($article->excerpt)

{{ $article->excerpt }}

@endif
{!! $article->rendered_content !!}
@php $renderedContent = (string) ($article->rendered_content ?? ''); $needsInstagramEmbeds = str_contains($renderedContent, 'instagram-media'); $needsFacebookEmbeds = str_contains($renderedContent, 'fb-post'); $needsTikTokEmbeds = str_contains($renderedContent, 'tiktok-embed'); $needsXEmbeds = str_contains($renderedContent, 'twitter-tweet'); @endphp @if($article->tags->isNotEmpty())
@foreach($article->tags as $tag) #{{ $tag->name }} @endforeach
@endif @if($article->forum_thread_id) @endif @if($article->commentsAreEnabled() && ! $isPreview)
@include('news._comments', [ 'article' => $article, 'comments' => $comments ?? collect(), 'commentsCount' => $commentsCount ?? 0, 'isPreview' => $isPreview, ])
@vite(['resources/js/Pages/News/NewsComments.jsx']) @else @include('news._comments', [ 'article' => $article, 'comments' => $comments ?? collect(), 'commentsCount' => $commentsCount ?? 0, 'isPreview' => $isPreview, ]) @endif
@include('news._related_entities', ['relatedEntities' => $relatedEntities ?? []]) @if($related->isNotEmpty())

Related Articles

@foreach($related as $rel) @include('news._article_card', ['article' => $rel]) @endforeach
@endif
@endsection @push('scripts') @if($needsFacebookEmbeds)
@endif @if($needsInstagramEmbeds) @endif @if($needsTikTokEmbeds) @endif @if($needsXEmbeds) @endif @endpush