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

@@ -7,6 +7,11 @@
@php
$hasQuery = isset($q) && $q !== '';
$resultCount = method_exists($artworks, 'total') ? (int) $artworks->total() : 0;
$groupResults = collect($groups ?? []);
$groupResultCount = $groupResults->count();
$newsResults = collect($news ?? []);
$newsResultCount = $newsResults->count();
$hasAnyResults = $resultCount > 0 || $groupResultCount > 0 || $newsResultCount > 0;
$galleryArtworks = collect($artworks->items())->map(fn ($art) => [
'id' => $art->id ?? null,
'name' => $art->name ?? null,
@@ -36,7 +41,7 @@
Search
</h1>
<p class="mt-1 text-sm text-white/50">
{{ $hasQuery ? 'Results for "' . $q . '"' : 'Find artworks, creators, and styles across Skinbase.' }}
{{ $hasQuery ? 'Results for "' . $q . '"' : 'Find artworks, creators, groups, and styles across Skinbase.' }}
</p>
</div>
</div>
@@ -46,7 +51,7 @@
type="search"
name="q"
value="{{ $q ?? '' }}"
placeholder="Search artworks, artists, tags..."
placeholder="Search artworks, groups, artists, tags..."
autofocus
class="w-full rounded-xl border border-white/10 bg-white/[0.05] py-3 pl-4 pr-12 text-white outline-none transition-colors placeholder:text-neutral-500 focus:border-sky-500"
>
@@ -74,15 +79,99 @@
@endforeach
<span class="ml-auto text-sm text-neutral-500">
{{ number_format($resultCount) }} {{ $resultCount === 1 ? 'result' : 'results' }}
{{ number_format($resultCount + $groupResultCount + $newsResultCount) }} {{ ($resultCount + $groupResultCount + $newsResultCount) === 1 ? 'result' : 'results' }}
</span>
</div>
@endif
@if($hasQuery && $resultCount === 0)
@if($groupResultCount > 0)
<section class="mb-8 rounded-[28px] border border-white/10 bg-white/[0.03] p-5 shadow-[0_18px_50px_rgba(2,6,23,0.2)]">
<div class="mb-4 flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">
<div>
<p class="text-[11px] font-semibold uppercase tracking-[0.2em] text-sky-200/80">Groups</p>
<h2 class="mt-1 text-xl font-semibold text-white">Collaborative identities matching your search</h2>
<p class="mt-1 text-sm text-slate-400">Explore shared publishing brands, contributor teams, and recruiting collectives related to this query.</p>
</div>
<a href="/groups" class="text-sm font-semibold text-sky-300 transition hover:text-white">Browse all groups</a>
</div>
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
@foreach($groupResults as $group)
<a href="{{ $group['urls']['public'] ?? $group['profile_url'] ?? '/groups' }}" class="rounded-[24px] border border-white/10 bg-black/20 p-4 transition hover:-translate-y-0.5 hover:border-white/20">
<div class="flex items-start gap-4">
<div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-2xl border border-white/10 bg-white/[0.04] text-slate-300">
@if(!empty($group['avatar_url']))
<img src="{{ $group['avatar_url'] }}" alt="{{ $group['name'] ?? 'Group' }}" class="h-full w-full object-cover" loading="lazy">
@else
<i class="fa-solid fa-people-group"></i>
@endif
</div>
<div class="min-w-0 flex-1">
<div class="truncate text-lg font-semibold text-white">{{ $group['name'] ?? 'Group' }}</div>
@if(!empty($group['headline']))
<div class="mt-1 text-sm text-slate-400">{{ $group['headline'] }}</div>
@elseif(!empty($group['bio_excerpt']))
<div class="mt-1 text-sm text-slate-400">{{ $group['bio_excerpt'] }}</div>
@endif
</div>
</div>
<div class="mt-4 flex flex-wrap gap-2">
@foreach(collect($group['trust_signals'] ?? [])->take(2) as $signal)
<span class="rounded-full border border-white/10 bg-white/[0.04] px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-200">{{ $signal['label'] ?? 'Signal' }}</span>
@endforeach
@if(!empty($group['is_recruiting']))
<span class="rounded-full border border-emerald-300/20 bg-emerald-400/10 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.16em] text-emerald-100">Recruiting</span>
@endif
</div>
<div class="mt-4 flex flex-wrap gap-4 text-xs text-slate-400">
<span>{{ number_format((int) ($group['counts']['artworks'] ?? $group['artworks_count'] ?? 0)) }} artworks</span>
<span>{{ number_format((int) ($group['counts']['members'] ?? $group['members_count'] ?? 0)) }} members</span>
<span>{{ number_format((int) ($group['counts']['followers'] ?? $group['followers_count'] ?? 0)) }} followers</span>
</div>
</a>
@endforeach
</div>
</section>
@endif
@if($newsResultCount > 0)
<section class="mb-8 rounded-[28px] border border-white/10 bg-white/[0.03] p-5 shadow-[0_18px_50px_rgba(2,6,23,0.2)]">
<div class="mb-4 flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">
<div>
<p class="text-[11px] font-semibold uppercase tracking-[0.2em] text-sky-200/80">News</p>
<h2 class="mt-1 text-xl font-semibold text-white">Editorial stories and platform updates matching your search</h2>
<p class="mt-1 text-sm text-slate-400">Find tutorials, release notes, community spotlights, and announcements connected to this topic.</p>
</div>
<a href="/news" class="text-sm font-semibold text-sky-300 transition hover:text-white">Browse all News</a>
</div>
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
@foreach($newsResults as $item)
<a href="{{ route('news.show', $item->slug) }}" class="rounded-[24px] border border-white/10 bg-black/20 p-4 transition hover:-translate-y-0.5 hover:border-white/20">
<div class="flex flex-wrap items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.16em] text-white/35">
<span class="rounded-full border border-white/10 bg-white/[0.04] px-2 py-0.5 text-white/60">{{ $item->type_label }}</span>
@if($item->category)
<span class="rounded-full border border-sky-400/20 bg-sky-500/10 px-2 py-0.5 text-sky-200">{{ $item->category->name }}</span>
@endif
</div>
<h3 class="mt-3 text-lg font-semibold leading-7 text-white">{{ $item->title }}</h3>
<p class="mt-2 text-sm leading-6 text-slate-400">{{ Str::limit(strip_tags((string) ($item->excerpt ?: $item->rendered_content)), 120) }}</p>
<div class="mt-4 flex items-center justify-between gap-3 text-xs text-slate-500">
<span>{{ $item->author?->name ?? 'Skinbase' }}</span>
<span>{{ $item->published_at?->format('d M Y') }}</span>
</div>
</a>
@endforeach
</div>
</section>
@endif
@if($hasQuery && !$hasAnyResults)
<div class="rounded-xl border border-white/[0.06] bg-white/[0.03] p-14 text-center">
<p class="mb-2 text-lg text-neutral-400">No results for <span class="text-white">"{{ $q }}"</span></p>
<p class="text-sm text-neutral-500">Try a different keyword or browse <a href="/discover/trending" class="text-sky-400 hover:underline">trending artworks</a>.</p>
<p class="text-sm text-neutral-500">Try a different keyword or browse <a href="/groups" class="text-sky-400 hover:underline">public groups</a>, <a href="/news" class="text-sky-400 hover:underline">News</a>, and <a href="/discover/trending" class="text-sky-400 hover:underline">trending artworks</a>.</p>
</div>
@else
<div