chore: commit remaining workspace changes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
@php
|
||||
$isPreview = (bool) ($previewMode ?? false);
|
||||
$articleUrl = $isPreview ? ($previewCanonical ?? url()->current()) : route('news.show', $article->slug);
|
||||
$articleImageLicenseUrl = route('terms-of-service');
|
||||
$articleImageCreditText = (string) config('seo.site_name', 'Skinbase');
|
||||
$articleSchemaImage = $article->effective_og_image
|
||||
? url($article->effective_og_image)
|
||||
: url((string) config('seo.fallback_image_path', '/gfx/skinbase_back_001.webp'));
|
||||
@@ -24,6 +26,30 @@
|
||||
: null,
|
||||
])->filter()->values(),
|
||||
])
|
||||
->addJsonLd($articleSchemaImage
|
||||
? array_filter([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'ImageObject',
|
||||
'url' => $articleSchemaImage,
|
||||
'contentUrl' => $articleSchemaImage,
|
||||
'thumbnailUrl' => $article->cover_mobile_url,
|
||||
'caption' => $article->title,
|
||||
'creditText' => $articleImageCreditText,
|
||||
'license' => $articleImageLicenseUrl,
|
||||
'acquireLicensePage' => $articleImageLicenseUrl,
|
||||
'creator' => [
|
||||
'@type' => 'Organization',
|
||||
'name' => $articleImageCreditText,
|
||||
'url' => url('/'),
|
||||
],
|
||||
'publisher' => [
|
||||
'@type' => 'Organization',
|
||||
'name' => $articleImageCreditText,
|
||||
'url' => url('/'),
|
||||
],
|
||||
'representativeOfPage' => true,
|
||||
], fn (mixed $value): bool => $value !== null && $value !== '')
|
||||
: null)
|
||||
->addJsonLd(array_filter([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'NewsArticle',
|
||||
@@ -36,6 +62,9 @@
|
||||
'contentUrl' => $articleSchemaImage,
|
||||
'thumbnailUrl' => $article->cover_mobile_url,
|
||||
'caption' => $article->title,
|
||||
'creditText' => $articleImageCreditText,
|
||||
'license' => $articleImageLicenseUrl,
|
||||
'acquireLicensePage' => $articleImageLicenseUrl,
|
||||
], fn (mixed $value): bool => $value !== null && $value !== '')
|
||||
: null,
|
||||
'datePublished' => $article->published_at?->toIso8601String(),
|
||||
@@ -133,7 +162,14 @@
|
||||
<article class="min-w-0">
|
||||
@if($article->cover_url)
|
||||
<div class="overflow-hidden rounded-[32px] border border-white/[0.06] bg-black/20 shadow-[0_24px_60px_rgba(0,0,0,0.24)]">
|
||||
<a href="{{ $articleCoverPreloadHref }}" class="group block focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/70 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950" aria-label="Open full cover image">
|
||||
<a
|
||||
href="{{ $articleCoverPreloadHref }}"
|
||||
class="group block focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/70 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950"
|
||||
aria-label="Open full cover image"
|
||||
data-news-image-preview
|
||||
data-news-image-src="{{ $articleCoverPreloadHref }}"
|
||||
data-news-image-alt="{{ $article->title }}"
|
||||
>
|
||||
<div class="relative">
|
||||
<img src="{{ $article->cover_url }}" @if($article->cover_srcset) srcset="{{ $article->cover_srcset }}" sizes="{{ $articleCoverSizes }}" @endif alt="{{ $article->title }}" fetchpriority="high" loading="eager" decoding="async" class="h-auto max-h-[520px] w-full object-cover transition duration-300 group-hover:scale-[1.01]">
|
||||
<div class="pointer-events-none absolute inset-x-4 bottom-4 flex items-center justify-between gap-3 rounded-full border border-white/10 bg-slate-950/72 px-4 py-2 text-xs font-semibold uppercase tracking-[0.18em] text-white/82 backdrop-blur-sm">
|
||||
@@ -263,6 +299,8 @@
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@vite(['resources/js/Pages/News/NewsImagePreview.jsx'])
|
||||
|
||||
@if($needsFacebookEmbeds)
|
||||
<div id="fb-root"></div>
|
||||
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v19.0"></script>
|
||||
|
||||
Reference in New Issue
Block a user