Commit workspace changes

This commit is contained in:
2026-04-05 19:42:33 +02:00
parent 148a3bbe43
commit 08ad757bcb
312 changed files with 35149 additions and 399 deletions

View File

@@ -1,10 +1,12 @@
@php
$isPreview = (bool) ($previewMode ?? false);
$articleUrl = $isPreview ? ($previewCanonical ?? url()->current()) : route('news.show', $article->slug);
$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' => route('news.show', $article->slug),
'robots' => 'index,follow',
'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,
@@ -30,7 +32,7 @@
'@type' => 'Person',
'name' => $article->author?->name,
]),
'mainEntityOfPage' => route('news.show', $article->slug),
'mainEntityOfPage' => $articleUrl,
], fn (mixed $value): bool => $value !== null && $value !== ''))
->build();
@endphp
@@ -38,7 +40,8 @@
@extends('news.layout', [
'metaTitle' => $article->meta_title ?: $article->title,
'metaDescription' => $article->meta_description ?: Str::limit(strip_tags((string)$article->excerpt), 160),
'metaCanonical' => route('news.show', $article->slug),
'metaCanonical' => $isPreview ? $articleUrl : ($article->canonical_url ?: $articleUrl),
'metaRobots' => $isPreview ? 'noindex,nofollow' : 'index,follow',
])
@section('news_content')
@@ -50,7 +53,7 @@
$article->category
? (object) ['name' => $article->category->name, 'url' => route('news.category', $article->category->slug)]
: null,
(object) ['name' => $article->title, 'url' => route('news.show', $article->slug)],
(object) ['name' => $article->title, 'url' => $articleUrl],
])->filter()->values();
@endphp
@@ -64,9 +67,13 @@
>
<x-slot name="actions">
<div class="flex flex-wrap items-center gap-2 text-sm text-white/60">
<span class="inline-flex items-center rounded-full border border-white/[0.08] bg-white/[0.04] px-3 py-1.5 text-white/75">{{ $article->type_label }}</span>
@if($article->category)
<a href="{{ route('news.category', $article->category->slug) }}" class="inline-flex items-center rounded-full border border-sky-400/20 bg-sky-500/10 px-3 py-1.5 text-sky-200">{{ $article->category->name }}</a>
@endif
@if($article->is_pinned)
<span class="inline-flex items-center rounded-full border border-amber-300/20 bg-amber-400/10 px-3 py-1.5 text-amber-100">Pinned</span>
@endif
<span class="inline-flex items-center gap-1.5 rounded-full border border-white/[0.08] bg-white/[0.04] px-3 py-1.5">
<i class="fa-regular fa-clock text-xs"></i>
{{ $article->reading_time }} min read
@@ -76,6 +83,23 @@
</x-nova-page-header>
<div class="mx-auto max-w-7xl px-6 pt-8 pb-16 md:px-10">
@if($isPreview)
<div class="mb-6 rounded-[24px] border border-indigo-300/20 bg-indigo-400/10 px-5 py-4 text-sm text-indigo-100 shadow-[0_16px_40px_rgba(30,41,59,0.24)]">
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<div class="text-[11px] font-semibold uppercase tracking-[0.18em] text-indigo-100/70">Preview mode</div>
<div class="mt-1">This article preview is visible only to newsroom staff and is excluded from indexing.</div>
</div>
@if(!empty($previewBackUrl))
<a href="{{ $previewBackUrl }}" class="inline-flex items-center gap-2 rounded-full border border-indigo-200/20 bg-indigo-500/10 px-4 py-2 text-sm font-semibold text-indigo-50 transition hover:bg-indigo-500/15">
<i class="fa-solid fa-arrow-left text-xs"></i>
Back to editor
</a>
@endif
</div>
</div>
@endif
<div class="grid gap-8 xl:grid-cols-[minmax(0,1fr)_320px]">
<article class="min-w-0">
@if($article->cover_url)
@@ -86,7 +110,13 @@
<div class="mt-6 rounded-[32px] border border-white/[0.06] bg-[linear-gradient(180deg,rgba(11,16,26,0.94),rgba(7,11,19,0.92))] p-6 shadow-[0_18px_45px_rgba(0,0,0,0.2)] sm:p-8">
<div class="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-white/45">
<span>{{ $article->author?->name ?? 'Skinbase' }}</span>
<span>
@if($article->author?->username)
<a href="{{ route('news.author', $article->author->username) }}" class="transition hover:text-white">{{ $article->author->name ?? $article->author->username }}</a>
@else
{{ $article->author?->name ?? 'Skinbase' }}
@endif
</span>
<span>{{ $article->published_at?->format('d M Y') }}</span>
<span>{{ number_format((int) $article->views) }} views</span>
</div>
@@ -96,7 +126,7 @@
@endif
<div class="prose prose-invert prose-sky mt-8 max-w-none prose-p:text-white/72 prose-li:text-white/70 prose-strong:text-white prose-a:text-sky-300 hover:prose-a:text-sky-200 prose-headings:text-white">
{!! $article->content !!}
{!! $article->rendered_content !!}
</div>
@if($article->tags->isNotEmpty())
@@ -133,6 +163,8 @@
@endif
</div>
@include('news._related_entities', ['relatedEntities' => $relatedEntities ?? []])
@if($related->isNotEmpty())
<section class="mt-8">
<div class="mb-4 flex items-center justify-between gap-3">