feat: increase gallery grid from 4 to 5 columns per row on desktopfeat: increase gallery grid from 4 to 5 columns per row on desktop
This commit is contained in:
@@ -89,7 +89,9 @@
|
||||
data-present-xl='@json($presentXl)'
|
||||
data-present-sq='@json($presentSq)'
|
||||
data-cdn='@json(rtrim((string) config("cdn.files_url", "https://files.skinbase.org"), "/"))'
|
||||
data-canonical='@json($meta["canonical"])'>
|
||||
data-canonical='@json($meta["canonical"])'
|
||||
data-comments='@json($comments)'
|
||||
data-is-authenticated='@json(auth()->check())'>
|
||||
</div>
|
||||
|
||||
@vite(['resources/js/Pages/ArtworkPage.jsx'])
|
||||
|
||||
@@ -118,7 +118,11 @@
|
||||
}
|
||||
@endphp
|
||||
|
||||
<article class="nova-card gallery-item artwork" itemscope itemtype="https://schema.org/ImageObject">
|
||||
<article class="nova-card gallery-item artwork" itemscope itemtype="https://schema.org/ImageObject"
|
||||
data-art-id="{{ $art->id ?? '' }}"
|
||||
data-art-url="{{ $cardUrl }}"
|
||||
data-art-title="{{ e($title) }}"
|
||||
data-art-img="{{ $imgSrc }}">
|
||||
<meta itemprop="name" content="{{ $title }}">
|
||||
<meta itemprop="contentUrl" content="{{ $contentUrl }}">
|
||||
<meta itemprop="creator" content="{{ $author }}">
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
</div>
|
||||
|
||||
<section class="px-6 pb-10 pt-8 md:px-10" data-nova-gallery data-gallery-type="{{ $gallery_type ?? 'browse' }}">
|
||||
<div class="{{ $gridV2 ? 'gallery' : 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 force-5' }}" data-gallery-grid>
|
||||
<div class="{{ $gridV2 ? 'gallery' : 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6 force-5' }}" data-gallery-grid>
|
||||
@forelse ($artworks as $art)
|
||||
<x-artwork-card
|
||||
:art="$art"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
|
||||
@vite(['resources/css/app.css','resources/css/nova-grid.css','resources/scss/nova.scss','resources/js/nova.js'])
|
||||
@vite(['resources/css/app.css','resources/css/nova-grid.css','resources/scss/nova.scss','resources/js/nova.js','resources/js/entry-search.jsx'])
|
||||
<style>
|
||||
/* Card enter animation */
|
||||
.nova-card-enter { opacity: 0; transform: translateY(10px) scale(0.995); }
|
||||
|
||||
@@ -70,18 +70,8 @@
|
||||
|
||||
<!-- Search -->
|
||||
<div class="flex-1 flex items-center justify-center">
|
||||
<div class="w-full max-w-lg relative">
|
||||
<input
|
||||
class="w-full h-10 rounded-lg bg-black/20 border border-sb-line pl-4 pr-12 text-sm text-white placeholder:text-sb-muted/80 outline-none focus:border-sb-blue/60"
|
||||
placeholder="Search tags, artworks, artists..." />
|
||||
<button
|
||||
class="absolute right-2 top-1/2 -translate-y-1/2 w-9 h-9 rounded-md hover:bg-white/5 text-sb-muted hover:text-white">
|
||||
<svg class="w-5 h-5 mx-auto" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2">
|
||||
<circle cx="11" cy="11" r="7" />
|
||||
<path d="M20 20l-3.5-3.5" />
|
||||
</svg>
|
||||
</button>
|
||||
<div class="w-full max-w-lg">
|
||||
<div id="topbar-search-root"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,8 +1,50 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@php($gridV2 = request()->query('grid') === 'v2')
|
||||
|
||||
@php
|
||||
$uname = $user->username ?? $user->name ?? 'Unknown';
|
||||
$displayName = $user->name ?? $uname;
|
||||
$avatarUrl = \App\Support\AvatarUrl::forUser((int) $user->id, $user->profile?->avatar_hash, 128);
|
||||
|
||||
$genderMap = [
|
||||
'M' => ['label' => 'Male', 'icon' => 'fa-mars', 'color' => 'text-blue-400'],
|
||||
'F' => ['label' => 'Female', 'icon' => 'fa-venus', 'color' => 'text-pink-400'],
|
||||
'X' => ['label' => 'N/A', 'icon' => 'fa-question', 'color' => 'text-gray-400'],
|
||||
];
|
||||
$genderCode = strtoupper((string) ($profile?->gender ?? 'X'));
|
||||
$gender = $genderMap[$genderCode] ?? $genderMap['X'];
|
||||
|
||||
$birthdate = null;
|
||||
if ($profile?->birthdate) {
|
||||
try {
|
||||
$bd = \Carbon\Carbon::parse($profile->birthdate);
|
||||
if ($bd->year > 1900) {
|
||||
$birthdate = $bd->format('F d, Y');
|
||||
}
|
||||
} catch (\Throwable) {}
|
||||
}
|
||||
|
||||
$website = $profile?->website ?? null;
|
||||
if ($website && !preg_match('#^https?://#i', $website)) {
|
||||
$website = 'https://' . $website;
|
||||
}
|
||||
|
||||
$about = $profile?->about ?? null;
|
||||
|
||||
$lastVisit = null;
|
||||
if ($user->last_visit_at) {
|
||||
try { $lastVisit = \Carbon\Carbon::parse($user->last_visit_at); } catch (\Throwable) {}
|
||||
}
|
||||
|
||||
$socialIcons = [
|
||||
'twitter' => ['icon' => 'fa-brands fa-x-twitter', 'label' => 'X / Twitter'],
|
||||
'deviantart' => ['icon' => 'fa-brands fa-deviantart', 'label' => 'DeviantArt'],
|
||||
'instagram' => ['icon' => 'fa-brands fa-instagram', 'label' => 'Instagram'],
|
||||
'behance' => ['icon' => 'fa-brands fa-behance', 'label' => 'Behance'],
|
||||
'artstation' => ['icon' => 'fa-solid fa-palette', 'label' => 'ArtStation'],
|
||||
'youtube' => ['icon' => 'fa-brands fa-youtube', 'label' => 'YouTube'],
|
||||
'website' => ['icon' => 'fa-solid fa-link', 'label' => 'Website'],
|
||||
];
|
||||
|
||||
$seoPage = max(1, (int) request()->query('page', 1));
|
||||
$seoBase = url()->current();
|
||||
$seoQ = request()->query(); unset($seoQ['page']);
|
||||
@@ -10,8 +52,7 @@
|
||||
? '?' . http_build_query(array_merge($seoQ, ['page' => $p]))
|
||||
: (count($seoQ) ? '?' . http_build_query($seoQ) : ''));
|
||||
$seoPrev = $seoPage > 1 ? $seoUrl($seoPage - 1) : null;
|
||||
$seoNext = (isset($artworks) && method_exists($artworks, 'nextPageUrl'))
|
||||
? $artworks->nextPageUrl() : null;
|
||||
$seoNext = (isset($artworks) && method_exists($artworks, 'nextPageUrl')) ? $artworks->nextPageUrl() : null;
|
||||
@endphp
|
||||
|
||||
@push('head')
|
||||
@@ -19,47 +60,626 @@
|
||||
@if($seoPrev)<link rel="prev" href="{{ $seoPrev }}">@endif
|
||||
@if($seoNext)<link rel="next" href="{{ $seoNext }}">@endif
|
||||
<meta name="robots" content="index,follow">
|
||||
<meta property="og:title" content="Profile: {{ e($uname) }} – Skinbase.org">
|
||||
<meta property="og:image" content="{{ $avatarUrl }}">
|
||||
<meta property="og:url" content="{{ $page_canonical ?? url()->current() }}">
|
||||
<style>
|
||||
.profile-hero-bg {
|
||||
background: linear-gradient(135deg,
|
||||
rgba(15,23,36,0.98) 0%,
|
||||
rgba(21,30,46,0.95) 50%,
|
||||
rgba(9,16,26,0.98) 100%);
|
||||
position: relative;
|
||||
}
|
||||
.profile-hero-bg::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background:
|
||||
radial-gradient(ellipse at 20% 50%, rgba(77,163,255,.12), transparent 60%),
|
||||
radial-gradient(ellipse at 80% 20%, rgba(224,122,33,.08), transparent 50%);
|
||||
pointer-events: none;
|
||||
}
|
||||
.nova-panel {
|
||||
background: var(--panel-dark);
|
||||
border: 1px solid var(--sb-line);
|
||||
border-radius: 0.75rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nova-panel-header {
|
||||
padding: 0.65rem 1rem;
|
||||
border-bottom: 1px solid var(--sb-line);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-weight: 600;
|
||||
font-size: 0.82rem;
|
||||
color: var(--sb-text);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.nova-panel-body { padding: 1rem; }
|
||||
.stat-item { text-align: center; padding: 0.5rem 0.75rem; }
|
||||
.stat-item .stat-value {
|
||||
font-size: 1.15rem;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.stat-item .stat-label {
|
||||
font-size: 0.65rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--sb-muted);
|
||||
margin-top: 1px;
|
||||
}
|
||||
.profile-table td:first-child {
|
||||
color: var(--sb-muted);
|
||||
font-size: 0.75rem;
|
||||
white-space: nowrap;
|
||||
padding-right: 0.75rem;
|
||||
padding-top: 0.45rem;
|
||||
padding-bottom: 0.45rem;
|
||||
}
|
||||
.profile-table td:last-child {
|
||||
color: var(--sb-text);
|
||||
font-size: 0.82rem;
|
||||
text-align: right;
|
||||
}
|
||||
.profile-table tr {
|
||||
border-bottom: 1px solid rgba(42,42,51,0.5);
|
||||
}
|
||||
.profile-table tr:last-child { border-bottom: none; }
|
||||
.profile-table td { vertical-align: middle; }
|
||||
.comment-avatar {
|
||||
width: 38px; height: 38px;
|
||||
border-radius: 50%; object-fit: cover; flex-shrink: 0;
|
||||
}
|
||||
.follower-avatar {
|
||||
width: 34px; height: 34px;
|
||||
border-radius: 50%; object-fit: cover;
|
||||
border: 1px solid var(--sb-line);
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
.follower-avatar:hover { opacity: 0.85; }
|
||||
.fav-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
|
||||
gap: 4px;
|
||||
}
|
||||
.fav-grid a img {
|
||||
width: 100%; aspect-ratio: 1; object-fit: cover;
|
||||
border-radius: 4px; transition: opacity 0.2s;
|
||||
display: block;
|
||||
}
|
||||
.fav-grid a:hover img { opacity: 0.82; }
|
||||
.follow-btn { transition: all 0.2s ease; }
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">Profile: {{ $user->uname }}</h1>
|
||||
<p>{{ $user->name ?? '' }}</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>Newest Artworks</strong></div>
|
||||
<div class="panel-body">
|
||||
<div class="{{ $gridV2 ? 'gallery' : 'gallery-grid' }}" data-nova-gallery data-gallery-type="profile" data-gallery-grid>
|
||||
@foreach($artworks as $art)
|
||||
<x-artwork-card :art="$art" />
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="hidden" data-gallery-skeleton-template aria-hidden="true">
|
||||
<x-skeleton.artwork-card />
|
||||
</div>
|
||||
<div class="hidden mt-8" data-gallery-skeleton></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ═══════════════════════════════════════════════════════════
|
||||
PROFILE HERO
|
||||
═══════════════════════════════════════════════════════════ --}}
|
||||
<div class="profile-hero-bg border-b border-[--sb-line]">
|
||||
<div class="relative z-10 max-w-screen-xl mx-auto px-4 py-8">
|
||||
<div class="flex flex-col sm:flex-row items-center sm:items-end gap-5">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>User</strong></div>
|
||||
<div class="panel-body">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $user->user_id, null, 128) }}" class="img-responsive" style="max-width:120px;" alt="{{ $user->uname }}">
|
||||
<h3>{{ $user->uname }}</h3>
|
||||
<p>{{ $user->about_me ?? '' }}</p>
|
||||
</div>
|
||||
{{-- Avatar --}}
|
||||
<div class="shrink-0">
|
||||
<img src="{{ $avatarUrl }}"
|
||||
alt="{{ e($uname) }}"
|
||||
class="w-24 h-24 sm:w-32 sm:h-32 rounded-full object-cover border-4 border-[--sb-line] shadow-lg">
|
||||
</div>
|
||||
|
||||
{{-- Name + meta --}}
|
||||
<div class="flex-1 text-center sm:text-left min-w-0">
|
||||
<h1 class="text-2xl sm:text-3xl font-bold text-white leading-tight truncate">
|
||||
{{ e($uname) }}
|
||||
</h1>
|
||||
@if($displayName && $displayName !== $uname)
|
||||
<p class="text-[--sb-muted] text-sm mt-0.5">{{ e($displayName) }}</p>
|
||||
@endif
|
||||
@if($countryName)
|
||||
<p class="text-[--sb-muted] text-sm mt-1 flex items-center justify-center sm:justify-start gap-1.5">
|
||||
@if($profile?->country_code)
|
||||
<img src="/gfx/flags/shiny/24/{{ rawurlencode($profile->country_code) }}.png"
|
||||
alt="{{ e($countryName) }}"
|
||||
class="w-5 h-auto rounded-sm inline-block"
|
||||
onerror="this.style.display='none'">
|
||||
@endif
|
||||
{{ e($countryName) }}
|
||||
</p>
|
||||
@endif
|
||||
@if($lastVisit)
|
||||
<p class="text-[--sb-muted] text-xs mt-1">
|
||||
<i class="fa-solid fa-clock fa-fw mr-1"></i>
|
||||
Last seen {{ $lastVisit->diffForHumans() }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Action buttons --}}
|
||||
<div class="shrink-0 flex flex-col gap-2 items-center sm:items-end">
|
||||
@if(!$isOwner)
|
||||
@auth
|
||||
<div x-data="{
|
||||
following: {{ $viewerIsFollowing ? 'true' : 'false' }},
|
||||
count: {{ (int) $followerCount }},
|
||||
loading: false,
|
||||
async toggle() {
|
||||
this.loading = true;
|
||||
try {
|
||||
const r = await fetch('{{ route('profile.follow', ['username' => strtolower((string)$uname)]) }}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': document.querySelector('meta[name=csrf-token]').content,
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
});
|
||||
const d = await r.json();
|
||||
if (r.ok) { this.following = d.following; this.count = d.follower_count; }
|
||||
} catch(e) {}
|
||||
this.loading = false;
|
||||
}
|
||||
}">
|
||||
<button @click="toggle" :disabled="loading" class="follow-btn inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-all"
|
||||
:class="following
|
||||
? 'bg-green-500/10 border-green-500/40 text-green-400 hover:bg-red-500/10 hover:border-red-500/40 hover:text-red-400'
|
||||
: 'bg-[--sb-blue]/10 border-[--sb-blue]/40 text-[--sb-blue] hover:bg-[--sb-blue]/20'">
|
||||
<i class="fa-solid fa-fw"
|
||||
:class="loading ? 'fa-circle-notch fa-spin' : (following ? 'fa-user-check' : 'fa-user-plus')"></i>
|
||||
<span x-text="following ? 'Following' : 'Follow'"></span>
|
||||
<span class="text-xs opacity-60" x-text="'(' + count + ')'"></span>
|
||||
</button>
|
||||
</div>
|
||||
@else
|
||||
<a href="{{ route('login') }}"
|
||||
class="inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border border-[--sb-blue]/40 text-[--sb-blue] hover:bg-[--sb-blue]/10 transition-all">
|
||||
<i class="fa-solid fa-user-plus fa-fw"></i> Follow
|
||||
<span class="text-xs opacity-60">({{ $followerCount }})</span>
|
||||
</a>
|
||||
@endauth
|
||||
@else
|
||||
<a href="{{ route('dashboard.profile') }}"
|
||||
class="inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border border-[--sb-line] text-[--sb-text] hover:bg-white/5 transition-all">
|
||||
<i class="fa-solid fa-pen fa-fw"></i> Edit Profile
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ═══════════════════════════════════════════════════════════
|
||||
STATS STRIP
|
||||
═══════════════════════════════════════════════════════════ --}}
|
||||
<div class="bg-[--sb-panel2] border-b border-[--sb-line]">
|
||||
<div class="max-w-screen-xl mx-auto px-4">
|
||||
<div class="flex divide-x divide-[--sb-line] overflow-x-auto">
|
||||
@foreach([
|
||||
['value' => number_format($stats->uploads ?? 0), 'label' => 'Uploads', 'icon' => 'fa-cloud-arrow-up'],
|
||||
['value' => number_format($stats->downloads ?? 0), 'label' => 'Downloads', 'icon' => 'fa-download'],
|
||||
['value' => number_format($stats->profile_views ?? 0), 'label' => 'Profile Views', 'icon' => 'fa-eye'],
|
||||
['value' => number_format($followerCount), 'label' => 'Followers', 'icon' => 'fa-users'],
|
||||
['value' => number_format($stats->awards ?? 0), 'label' => 'Awards', 'icon' => 'fa-trophy'],
|
||||
] as $si)
|
||||
<div class="stat-item flex-1 py-3">
|
||||
<div class="stat-value">{{ $si['value'] }}</div>
|
||||
<div class="stat-label">
|
||||
<i class="fa-solid {{ $si['icon'] }} fa-fw mr-0.5"></i>{{ $si['label'] }}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ═══════════════════════════════════════════════════════════
|
||||
MAIN CONTENT
|
||||
═══════════════════════════════════════════════════════════ --}}
|
||||
<div class="max-w-screen-xl mx-auto px-4 py-6">
|
||||
<div class="flex flex-col lg:flex-row gap-5">
|
||||
|
||||
{{-- ─── LEFT COLUMN (artworks) ─── --}}
|
||||
<div class="flex-1 min-w-0 space-y-5">
|
||||
|
||||
{{-- Featured Artworks --}}
|
||||
@if(isset($featuredArtworks) && $featuredArtworks->isNotEmpty())
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-star text-yellow-400 fa-fw"></i>
|
||||
Featured Artworks
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
<div class="flex flex-col md:flex-row gap-4">
|
||||
@php $feat = $featuredArtworks->first() @endphp
|
||||
{{-- Main featured --}}
|
||||
<a href="/art/{{ $feat->id }}/{{ \Illuminate\Support\Str::slug($feat->name) }}"
|
||||
class="flex-1 group block min-w-0">
|
||||
<div class="overflow-hidden rounded-lg bg-black">
|
||||
<img src="{{ $feat->thumb }}"
|
||||
alt="{{ e($feat->name) }}"
|
||||
class="w-full object-cover transition-transform duration-300 group-hover:scale-105"
|
||||
style="aspect-ratio:4/3;">
|
||||
</div>
|
||||
<h4 class="mt-2 text-sm font-medium text-white truncate">{{ e($feat->name) }}</h4>
|
||||
@if($feat->label)
|
||||
<p class="text-xs text-[--sb-muted]">{{ e($feat->label) }}</p>
|
||||
@endif
|
||||
@if($feat->featured_at)
|
||||
<p class="text-xs text-[--sb-muted] mt-0.5">
|
||||
<i class="fa-solid fa-calendar fa-fw"></i>
|
||||
Featured {{ \Carbon\Carbon::parse($feat->featured_at)->format('d M, Y') }}
|
||||
</p>
|
||||
@endif
|
||||
</a>
|
||||
{{-- Side featured (2nd & 3rd) --}}
|
||||
@if($featuredArtworks->count() > 1)
|
||||
<div class="md:w-44 space-y-2">
|
||||
@foreach($featuredArtworks->slice(1) as $sideArt)
|
||||
<a href="/art/{{ $sideArt->id }}/{{ \Illuminate\Support\Str::slug($sideArt->name) }}"
|
||||
class="block group">
|
||||
<div class="overflow-hidden rounded-md bg-black">
|
||||
<img src="{{ $sideArt->thumb }}"
|
||||
alt="{{ e($sideArt->name) }}"
|
||||
class="w-full object-cover transition-transform duration-300 group-hover:scale-105"
|
||||
style="aspect-ratio:16/9;">
|
||||
</div>
|
||||
<p class="text-xs text-[--sb-muted] mt-1 truncate">{{ e($sideArt->name) }}</p>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Newest Artworks --}}
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-images fa-fw text-[--sb-blue]"></i>
|
||||
Newest Artworks
|
||||
<a href="/gallery/{{ $user->id }}/{{ \Illuminate\Support\Str::slug($uname) }}"
|
||||
class="ml-auto text-xs text-[--sb-blue] hover:underline normal-case tracking-normal font-normal">
|
||||
View Gallery <i class="fa-solid fa-arrow-right fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
@if(isset($artworks) && !$artworks->isEmpty())
|
||||
<div class="gallery-grid"
|
||||
data-nova-gallery
|
||||
data-gallery-type="profile"
|
||||
data-gallery-grid
|
||||
data-profile-id="{{ $user->id }}">
|
||||
@foreach($artworks as $art)
|
||||
<x-artwork-card :art="$art" />
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="hidden" data-gallery-skeleton-template aria-hidden="true">
|
||||
<x-skeleton.artwork-card />
|
||||
</div>
|
||||
<div class="hidden mt-6" data-gallery-skeleton></div>
|
||||
@else
|
||||
<p class="text-[--sb-muted] text-sm text-center py-8">
|
||||
<i class="fa-solid fa-image fa-2x mb-3 block opacity-20"></i>
|
||||
No artworks yet.
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Favourites --}}
|
||||
@if(isset($favourites) && $favourites->isNotEmpty())
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-heart fa-fw text-pink-400"></i>
|
||||
Favourites
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
<div class="fav-grid">
|
||||
@foreach($favourites as $fav)
|
||||
<a href="/art/{{ $fav->id }}/{{ \Illuminate\Support\Str::slug($fav->name) }}"
|
||||
title="{{ e($fav->name) }}">
|
||||
<img src="{{ $fav->thumb }}" alt="{{ e($fav->name) }}" loading="lazy">
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>{{-- end left --}}
|
||||
|
||||
{{-- ─── RIGHT SIDEBAR ─── --}}
|
||||
<div class="lg:w-80 xl:w-96 shrink-0 space-y-4">
|
||||
|
||||
{{-- Profile Info --}}
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-id-card fa-fw text-[--sb-blue]"></i>
|
||||
Profile
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
<table class="profile-table w-full">
|
||||
<tr>
|
||||
<td>Username</td>
|
||||
<td>{{ e($uname) }}</td>
|
||||
</tr>
|
||||
@if($displayName && $displayName !== $uname)
|
||||
<tr><td>Real Name</td><td>{{ e($displayName) }}</td></tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>Gender</td>
|
||||
<td>
|
||||
<i class="fa-solid {{ $gender['icon'] }} fa-fw {{ $gender['color'] }}"></i>
|
||||
{{ $gender['label'] }}
|
||||
</td>
|
||||
</tr>
|
||||
@if($birthdate)
|
||||
<tr><td>Birthday</td><td>{{ $birthdate }}</td></tr>
|
||||
@endif
|
||||
@if($countryName)
|
||||
<tr>
|
||||
<td>Country</td>
|
||||
<td class="flex items-center justify-end gap-1.5">
|
||||
@if($profile?->country_code)
|
||||
<img src="/gfx/flags/shiny/24/{{ rawurlencode($profile->country_code) }}.png"
|
||||
alt="{{ e($countryName) }}"
|
||||
class="w-4 h-auto rounded-sm"
|
||||
onerror="this.style.display='none'">
|
||||
@endif
|
||||
{{ e($countryName) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($website)
|
||||
<tr>
|
||||
<td>Website</td>
|
||||
<td>
|
||||
<a href="{{ e($website) }}" rel="nofollow noopener" target="_blank"
|
||||
class="text-[--sb-blue] hover:underline text-xs inline-flex items-center gap-1">
|
||||
<i class="fa-solid fa-link fa-fw"></i>
|
||||
{{ e(parse_url($website, PHP_URL_HOST) ?? $website) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($lastVisit)
|
||||
<tr>
|
||||
<td>Last Activity</td>
|
||||
<td class="text-[11px]">
|
||||
{{ $lastVisit->format('d.M.Y') }}
|
||||
<i class="fa-solid fa-clock fa-fw ml-1 opacity-60"></i>
|
||||
{{ $lastVisit->format('H:i') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>Member since</td>
|
||||
<td>{{ $user->created_at ? $user->created_at->format('M Y') : 'N/A' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- About Me --}}
|
||||
@if($about)
|
||||
<div class="nova-panel" x-data="{ expanded: false }">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-quote-left fa-fw text-purple-400"></i>
|
||||
About Me
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
<div class="text-sm text-[--sb-text] leading-relaxed"
|
||||
:class="expanded ? '' : 'line-clamp-6'">
|
||||
{!! nl2br(e($about)) !!}
|
||||
</div>
|
||||
@if(strlen($about) > 300)
|
||||
<button @click="expanded = !expanded"
|
||||
class="mt-2 text-xs text-[--sb-blue] hover:underline">
|
||||
<span x-text="expanded ? '↑ Show less' : '↓ Read more'"></span>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Statistics --}}
|
||||
@if($stats)
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-chart-bar fa-fw text-green-400"></i>
|
||||
Statistics
|
||||
</div>
|
||||
<div class="nova-panel-body p-0">
|
||||
<table class="profile-table w-full">
|
||||
@foreach([
|
||||
['Profile Views', number_format($stats->profile_views ?? 0), null],
|
||||
['Uploads', number_format($stats->uploads ?? 0), null],
|
||||
['Downloads', number_format($stats->downloads ?? 0), null],
|
||||
['Page Views', number_format($stats->pageviews ?? 0), null],
|
||||
['Featured Works',number_format($stats->awards ?? 0), 'fa-star text-yellow-400'],
|
||||
] as [$label, $value, $iconClass])
|
||||
<tr>
|
||||
<td class="pl-4">{{ $label }}</td>
|
||||
<td class="pr-4">
|
||||
{{ $value }}
|
||||
@if($iconClass)<i class="fa-solid {{ $iconClass }} text-xs ml-1"></i>@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Social Links --}}
|
||||
@if(isset($socialLinks) && $socialLinks->isNotEmpty())
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-share-nodes fa-fw text-[--sb-blue]"></i>
|
||||
Social Links
|
||||
</div>
|
||||
<div class="nova-panel-body flex flex-wrap gap-2">
|
||||
@foreach($socialLinks as $platform => $link)
|
||||
@php
|
||||
$si = $socialIcons[$platform] ?? ['icon' => 'fa-solid fa-link', 'label' => ucfirst($platform)];
|
||||
$href = str_starts_with($link->url, 'http') ? $link->url : ('https://' . $link->url);
|
||||
@endphp
|
||||
<a href="{{ e($href) }}" rel="nofollow noopener" target="_blank"
|
||||
class="inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs border border-[--sb-line] text-[--sb-text] hover:bg-white/5 hover:border-[--sb-blue]/40 transition-all">
|
||||
<i class="{{ $si['icon'] }} fa-fw"></i>
|
||||
{{ $si['label'] }}
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Recent Followers --}}
|
||||
@if(isset($recentFollowers) && $recentFollowers->isNotEmpty())
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-users fa-fw text-[--sb-blue]"></i>
|
||||
Followers
|
||||
<span class="ml-1 px-1.5 py-0.5 rounded text-xs bg-white/5 text-[--sb-muted]">
|
||||
{{ number_format($followerCount) }}
|
||||
</span>
|
||||
<a href="/following/{{ $user->id }}/{{ \Illuminate\Support\Str::slug($uname) }}"
|
||||
class="ml-auto text-xs text-[--sb-blue] hover:underline normal-case tracking-normal font-normal">
|
||||
All
|
||||
</a>
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
@foreach($recentFollowers as $follower)
|
||||
<a href="{{ $follower->profile_url }}" title="{{ e($follower->uname) }}">
|
||||
<img src="{{ $follower->avatar_url }}"
|
||||
alt="{{ e($follower->uname) }}"
|
||||
class="follower-avatar"
|
||||
onerror="this.src='{{ \App\Support\AvatarUrl::default() }}'">
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($followerCount > 0)
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-users fa-fw text-[--sb-blue]"></i>
|
||||
Followers
|
||||
<span class="ml-1 px-1.5 py-0.5 rounded text-xs bg-white/5 text-[--sb-muted]">
|
||||
{{ number_format($followerCount) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Profile Comments --}}
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-comments fa-fw text-orange-400"></i>
|
||||
Comments
|
||||
@if(isset($profileComments) && $profileComments->isNotEmpty())
|
||||
<span class="ml-1 px-1.5 py-0.5 rounded text-xs bg-white/5 text-[--sb-muted]">
|
||||
{{ $profileComments->count() }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
@if(!isset($profileComments) || $profileComments->isEmpty())
|
||||
<p class="text-[--sb-muted] text-xs text-center py-3">No comments yet.</p>
|
||||
@else
|
||||
<div class="space-y-4">
|
||||
@foreach($profileComments as $comment)
|
||||
<div class="flex gap-3">
|
||||
<a href="{{ $comment->author_profile_url }}" class="shrink-0">
|
||||
<img src="{{ $comment->author_avatar }}"
|
||||
alt="{{ e($comment->author_name) }}"
|
||||
class="comment-avatar"
|
||||
onerror="this.src='{{ \App\Support\AvatarUrl::default() }}'">
|
||||
</a>
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<a href="{{ $comment->author_profile_url }}"
|
||||
class="text-xs font-semibold text-[--sb-text] hover:text-[--sb-blue] transition-colors">
|
||||
{{ e($comment->author_name) }}
|
||||
</a>
|
||||
<span class="text-[--sb-muted] text-[10px] ml-auto whitespace-nowrap">
|
||||
{{ \Carbon\Carbon::parse($comment->created_at)->diffForHumans() }}
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-xs text-[--sb-text] leading-relaxed break-words">
|
||||
{!! nl2br(e($comment->body)) !!}
|
||||
</p>
|
||||
@if(!empty($comment->author_signature))
|
||||
<p class="text-[--sb-muted] text-[10px] mt-1 italic border-t border-[--sb-line] pt-1 opacity-70">
|
||||
{!! nl2br(e($comment->author_signature)) !!}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Write Comment --}}
|
||||
@auth
|
||||
@if(auth()->id() !== $user->id)
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-header">
|
||||
<i class="fa-solid fa-pen fa-fw text-[--sb-blue]"></i>
|
||||
Write a Comment
|
||||
</div>
|
||||
<div class="nova-panel-body">
|
||||
@if(session('status') === 'Comment posted!')
|
||||
<div class="mb-3 px-3 py-2 rounded-lg bg-green-500/10 border border-green-500/30 text-green-400 text-xs">
|
||||
<i class="fa-solid fa-check fa-fw"></i> Comment posted!
|
||||
</div>
|
||||
@endif
|
||||
<form method="POST"
|
||||
action="{{ route('profile.comment', ['username' => strtolower((string)$uname)]) }}">
|
||||
@csrf
|
||||
<textarea name="body" rows="4" required minlength="2" maxlength="2000"
|
||||
placeholder="Write a comment for {{ e($uname) }}..."
|
||||
class="w-full bg-[--sb-bg] border border-[--sb-line] rounded-lg px-3 py-2 text-sm text-[--sb-text] placeholder:text-[--sb-muted]/60 resize-none focus:outline-none focus:border-[--sb-blue]/50 transition-colors"
|
||||
>{{ old('body') }}</textarea>
|
||||
@error('body')
|
||||
<p class="mt-1 text-xs text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
<div class="mt-2 text-right">
|
||||
<button type="submit"
|
||||
class="inline-flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-medium bg-[--sb-blue]/90 hover:bg-[--sb-blue] text-white transition-colors">
|
||||
<i class="fa-solid fa-paper-plane fa-fw"></i>
|
||||
Post Comment
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="nova-panel">
|
||||
<div class="nova-panel-body text-center py-4">
|
||||
<p class="text-[--sb-muted] text-sm">
|
||||
<a href="{{ route('login') }}" class="text-[--sb-blue] hover:underline">Log in</a>
|
||||
to leave a comment.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endauth
|
||||
|
||||
</div>{{-- end right sidebar --}}
|
||||
|
||||
</div>{{-- end flex --}}
|
||||
</div>{{-- end container --}}
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
78
resources/views/search/index.blade.php
Normal file
78
resources/views/search/index.blade.php
Normal file
@@ -0,0 +1,78 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@push('head')
|
||||
<meta name="robots" content="noindex,follow">
|
||||
<meta name="description" content="Search Skinbase artworks, photography, wallpapers and skins.">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="px-6 py-8 md:px-10" id="search-page" data-q="{{ $q ?? '' }}">
|
||||
|
||||
{{-- Search header --}}
|
||||
<div class="mb-8 max-w-2xl">
|
||||
<h1 class="text-2xl font-bold text-white mb-2">Search</h1>
|
||||
<form action="/search" method="GET" class="relative" role="search">
|
||||
<input
|
||||
type="search"
|
||||
name="q"
|
||||
value="{{ $q ?? '' }}"
|
||||
placeholder="Search artworks, artists, tags…"
|
||||
autofocus
|
||||
class="w-full bg-white/[0.05] border border-white/10 rounded-xl py-3 pl-4 pr-12 text-white placeholder-neutral-500 outline-none focus:border-sky-500 transition-colors"
|
||||
>
|
||||
<button type="submit" class="absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-sky-400 transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z"/></svg>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@if(isset($q) && $q !== '')
|
||||
{{-- Sort + filter bar --}}
|
||||
<div class="flex flex-wrap items-center gap-3 mb-6">
|
||||
<span class="text-sm text-neutral-400">Sort by:</span>
|
||||
@foreach(['latest' => 'Newest', 'popular' => 'Most viewed', 'likes' => 'Most liked', 'downloads' => 'Most downloaded'] as $key => $label)
|
||||
<a href="{{ request()->fullUrlWithQuery(['sort' => $key]) }}"
|
||||
class="px-3 py-1.5 rounded-lg text-xs font-medium transition-colors
|
||||
{{ ($sort ?? 'latest') === $key ? 'bg-sky-500 text-white' : 'bg-white/5 text-neutral-400 hover:bg-white/10 hover:text-white' }}">
|
||||
{{ $label }}
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
@if($artworks->total() > 0)
|
||||
<span class="ml-auto text-sm text-neutral-500">
|
||||
{{ number_format($artworks->total()) }} {{ Str::plural('result', $artworks->total()) }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Results grid --}}
|
||||
@if($artworks->isEmpty())
|
||||
<div class="rounded-xl bg-white/[0.03] border border-white/[0.06] p-14 text-center">
|
||||
<p class="text-neutral-400 text-lg mb-2">No results for <span class="text-white">"{{ $q }}"</span></p>
|
||||
<p class="text-sm text-neutral-500">Try a different keyword or browse by <a href="/browse" class="text-sky-400 hover:underline">category</a>.</p>
|
||||
</div>
|
||||
@else
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5">
|
||||
@foreach($artworks as $artwork)
|
||||
<x-artwork-card :art="$artwork" />
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mt-10">
|
||||
{{ $artworks->appends(request()->query())->links('pagination::tailwind') }}
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
{{-- No query: show popular --}}
|
||||
<div class="mb-4 flex items-center gap-2">
|
||||
<span class="text-sm font-semibold text-white/70 uppercase tracking-wide">Popular right now</span>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5">
|
||||
@foreach($popular as $artwork)
|
||||
<x-artwork-card :art="$artwork" />
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,37 +1,83 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@push('head')
|
||||
<link rel="canonical" href="{{ $page_canonical }}">
|
||||
<meta name="robots" content="{{ $page_robots ?? 'index,follow' }}">
|
||||
@if(!empty($ogImage))
|
||||
<meta property="og:image" content="{{ $ogImage }}">
|
||||
<meta property="og:image:alt" content="{{ $tag->name }} artworks on Skinbase">
|
||||
@endif
|
||||
<meta property="og:title" content="{{ $page_title }}">
|
||||
<meta property="og:description" content="{{ $page_meta_description }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="{{ $page_canonical }}">
|
||||
<script type="application/ld+json">{!! json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'CollectionPage',
|
||||
'name' => 'Artworks tagged "' . $tag->name . '"',
|
||||
'description' => $page_meta_description,
|
||||
'url' => $page_canonical,
|
||||
'image' => $ogImage,
|
||||
'hasPart' => $artworks->getCollection()->take(6)->map(fn($a) => [
|
||||
'@type' => 'ImageObject',
|
||||
'name' => $a->title,
|
||||
'url' => url('/' . ($a->slug ?? $a->id)),
|
||||
'thumbnail' => $a->thumbUrl('sm'),
|
||||
])->values()->all(),
|
||||
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) !!}</script>
|
||||
@if($artworks->previousPageUrl())
|
||||
<link rel="prev" href="{{ $artworks->previousPageUrl() }}">
|
||||
@endif
|
||||
@if($artworks->nextPageUrl())
|
||||
<link rel="next" href="{{ $artworks->nextPageUrl() }}">
|
||||
@endif
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="container legacy-page">
|
||||
<div class="effect2">
|
||||
<div class="page-heading">
|
||||
<h1 class="page-header">Tag: {{ $tag->name }}</h1>
|
||||
<p class="text-muted">Browse artworks tagged with “{{ $tag->name }}”.</p>
|
||||
<div class="px-6 py-8 md:px-10">
|
||||
|
||||
{{-- Header --}}
|
||||
<div class="mb-6 flex flex-wrap items-start justify-between gap-4">
|
||||
<div>
|
||||
<div class="flex items-center gap-3 mb-1">
|
||||
<span class="inline-flex items-center justify-center w-8 h-8 rounded-lg bg-sky-500/15 text-sky-400">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"/></svg>
|
||||
</span>
|
||||
<h1 class="text-2xl font-bold text-white">{{ $tag->name }}</h1>
|
||||
</div>
|
||||
<p class="text-sm text-neutral-400">
|
||||
{{ number_format($artworks->total()) }} {{ Str::plural('artwork', $artworks->total()) }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-skinbase effect2">
|
||||
<div class="panel-body">
|
||||
@if($artworks->isEmpty())
|
||||
<div class="alert alert-info">No artworks found for this tag.</div>
|
||||
@else
|
||||
<div class="row">
|
||||
@foreach($artworks as $artwork)
|
||||
<div class="col-xs-6 col-sm-4 col-md-3" style="margin-bottom:16px">
|
||||
<a href="/{{ $artwork->slug }}" title="{{ $artwork->title }}" style="display:block">
|
||||
<img src="{{ $artwork->thumb_url ?? $artwork->thumb }}" class="img-responsive img-thumbnail" alt="{{ $artwork->title }}" style="width:100%;height:160px;object-fit:cover">
|
||||
</a>
|
||||
<div style="margin-top:6px;font-weight:700;line-height:1.2">
|
||||
<a href="/{{ $artwork->slug }}">{{ str($artwork->title)->limit(60) }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="paginationMenu text-center">
|
||||
{{ $artworks->links('pagination::bootstrap-3') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
{{-- Sort controls --}}
|
||||
<div class="flex items-center gap-2 flex-wrap">
|
||||
@foreach(['popular' => 'Most viewed', 'latest' => 'Newest', 'likes' => 'Most liked', 'downloads' => 'Most downloaded'] as $key => $label)
|
||||
<a href="{{ route('tags.show', [$tag->slug, 'sort' => $key]) }}"
|
||||
class="px-3 py-1.5 rounded-lg text-xs font-medium transition-colors
|
||||
{{ $sort === $key ? 'bg-sky-500 text-white' : 'bg-white/5 text-neutral-400 hover:bg-white/10 hover:text-white' }}">
|
||||
{{ $label }}
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Grid --}}
|
||||
@if($artworks->isEmpty())
|
||||
<div class="rounded-xl bg-white/[0.03] border border-white/[0.06] p-10 text-center text-neutral-400">
|
||||
No artworks found for this tag yet.
|
||||
</div>
|
||||
@else
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-5">
|
||||
@foreach($artworks as $artwork)
|
||||
<x-artwork-card :art="$artwork" />
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mt-10">
|
||||
{{ $artworks->appends(['sort' => $sort])->links('pagination::tailwind') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
112
resources/views/web/authors/top.blade.php
Normal file
112
resources/views/web/authors/top.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Community</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Top Authors</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Most popular members ranked by artwork {{ $metric === 'downloads' ? 'downloads' : 'views' }}.</p>
|
||||
</div>
|
||||
|
||||
{{-- Metric switcher --}}
|
||||
<nav class="flex items-center gap-2" aria-label="Ranking metric">
|
||||
<a href="{{ request()->fullUrlWithQuery(['metric' => 'views']) }}"
|
||||
class="inline-flex items-center gap-1.5 rounded-full px-4 py-1.5 text-xs font-medium border transition-colors
|
||||
{{ $metric === 'views' ? 'bg-sky-500/15 text-sky-300 border-sky-500/30' : 'border-white/[0.08] bg-white/[0.04] text-white/55 hover:text-white hover:bg-white/[0.08]' }}">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
|
||||
</svg>
|
||||
Views
|
||||
</a>
|
||||
<a href="{{ request()->fullUrlWithQuery(['metric' => 'downloads']) }}"
|
||||
class="inline-flex items-center gap-1.5 rounded-full px-4 py-1.5 text-xs font-medium border transition-colors
|
||||
{{ $metric === 'downloads' ? 'bg-emerald-500/15 text-emerald-300 border-emerald-500/30' : 'border-white/[0.08] bg-white/[0.04] text-white/55 hover:text-white hover:bg-white/[0.08]' }}">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
|
||||
</svg>
|
||||
Downloads
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Leaderboard ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
@php $offset = ($authors->currentPage() - 1) * $authors->perPage(); @endphp
|
||||
|
||||
@if ($authors->isNotEmpty())
|
||||
<div class="rounded-xl border border-white/[0.06] overflow-hidden">
|
||||
|
||||
{{-- Table header --}}
|
||||
<div class="grid grid-cols-[3rem_1fr_auto] items-center gap-4 px-5 py-3 bg-white/[0.03] border-b border-white/[0.06]">
|
||||
<span class="text-xs font-semibold uppercase tracking-widest text-white/30 text-center">#</span>
|
||||
<span class="text-xs font-semibold uppercase tracking-widest text-white/30">Author</span>
|
||||
<span class="text-xs font-semibold uppercase tracking-widest text-white/30 text-right">
|
||||
{{ $metric === 'downloads' ? 'Downloads' : 'Views' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- Rows --}}
|
||||
<div class="divide-y divide-white/[0.04]">
|
||||
@foreach ($authors as $i => $author)
|
||||
@php
|
||||
$rank = $offset + $i + 1;
|
||||
$profileUrl = ($author->username ?? null)
|
||||
? '/@' . $author->username
|
||||
: '/profile/' . (int) $author->user_id;
|
||||
$avatarUrl = \App\Support\AvatarUrl::forUser((int) $author->user_id, null, 40);
|
||||
@endphp
|
||||
<div class="grid grid-cols-[3rem_1fr_auto] items-center gap-4 px-5 py-4
|
||||
{{ $rank <= 3 ? 'bg-white/[0.015]' : '' }} hover:bg-white/[0.03] transition-colors">
|
||||
|
||||
{{-- Rank badge --}}
|
||||
<div class="text-center">
|
||||
@if ($rank === 1)
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-amber-400/15 text-amber-300 text-xs font-bold ring-1 ring-amber-400/30">1</span>
|
||||
@elseif ($rank === 2)
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-slate-400/15 text-slate-300 text-xs font-bold ring-1 ring-slate-400/30">2</span>
|
||||
@elseif ($rank === 3)
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-orange-700/20 text-orange-400 text-xs font-bold ring-1 ring-orange-600/30">3</span>
|
||||
@else
|
||||
<span class="text-sm text-white/30 font-medium">{{ $rank }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Author info --}}
|
||||
<a href="{{ $profileUrl }}" class="flex items-center gap-3 min-w-0 hover:opacity-90 transition-opacity">
|
||||
<img src="{{ $avatarUrl }}" alt="{{ $author->uname }}"
|
||||
class="w-9 h-9 rounded-full object-cover flex-shrink-0 ring-1 ring-white/[0.08]">
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-sm font-semibold text-white/90">{{ $author->uname ?? 'Unknown' }}</div>
|
||||
@if (!empty($author->username))
|
||||
<div class="truncate text-xs text-white/35">{{ '@' . $author->username }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{-- Metric count --}}
|
||||
<div class="text-right flex-shrink-0">
|
||||
<span class="text-sm font-semibold {{ $metric === 'downloads' ? 'text-emerald-400' : 'text-sky-400' }}">
|
||||
{{ number_format($author->total ?? 0) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 flex justify-center">
|
||||
{{ $authors->withQueryString()->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No authors found.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
82
resources/views/web/comments/latest.blade.php
Normal file
82
resources/views/web/comments/latest.blade.php
Normal file
@@ -0,0 +1,82 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Community</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Latest Comments</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Most recent artwork comments from the community.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Comment cards grid ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
@if ($comments->isNotEmpty())
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5">
|
||||
@foreach ($comments as $comment)
|
||||
@php
|
||||
$artUrl = '/art/' . (int)($comment->id ?? 0) . '/' . ($comment->artwork_slug ?? 'artwork');
|
||||
$userUrl = '/profile/' . (int)($comment->commenter_id ?? 0) . '/' . rawurlencode($comment->uname ?? 'user');
|
||||
$avatarUrl = \App\Support\AvatarUrl::forUser((int)($comment->commenter_id ?? 0), $comment->icon ?? null, 40);
|
||||
$ago = \Carbon\Carbon::parse($comment->datetime ?? now())->diffForHumans();
|
||||
$snippet = \Illuminate\Support\Str::limit(strip_tags($comment->comment_description ?? ''), 160);
|
||||
@endphp
|
||||
|
||||
<article class="flex flex-col rounded-xl border border-white/[0.06] bg-white/[0.03] hover:border-white/[0.1] hover:bg-white/[0.05] transition-all duration-200 overflow-hidden">
|
||||
|
||||
{{-- Artwork thumbnail --}}
|
||||
@if (!empty($comment->thumb))
|
||||
<a href="{{ $artUrl }}" class="block overflow-hidden bg-neutral-900 flex-shrink-0">
|
||||
<img src="{{ $comment->thumb }}" alt="{{ $comment->name ?? 'Artwork' }}"
|
||||
class="w-full h-36 object-cover transition-transform duration-300 hover:scale-[1.03]"
|
||||
loading="lazy">
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-col flex-1 p-4 gap-3">
|
||||
|
||||
{{-- Commenter row --}}
|
||||
<div class="flex items-center gap-2.5">
|
||||
<a href="{{ $userUrl }}" class="flex-shrink-0">
|
||||
<img src="{{ $avatarUrl }}" alt="{{ $comment->uname ?? 'User' }}"
|
||||
class="w-8 h-8 rounded-full object-cover ring-1 ring-white/[0.08]">
|
||||
</a>
|
||||
<div class="min-w-0 flex-1">
|
||||
<a href="{{ $userUrl }}" class="block truncate text-xs font-semibold text-white/85 hover:text-white transition-colors">
|
||||
{{ $comment->uname ?? 'Unknown' }}
|
||||
</a>
|
||||
<span class="text-[10px] text-white/35">{{ $ago }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Comment text --}}
|
||||
<p class="flex-1 text-sm text-white/60 leading-relaxed line-clamp-4">{{ $snippet }}</p>
|
||||
|
||||
{{-- Artwork link footer --}}
|
||||
@if (!empty($comment->name))
|
||||
<a href="{{ $artUrl }}"
|
||||
class="mt-auto inline-flex items-center gap-1.5 text-xs text-sky-400/70 hover:text-sky-300 transition-colors truncate">
|
||||
<svg class="w-3.5 h-3.5 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
<span class="truncate">{{ $comment->name }}</span>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mt-10 flex justify-center">
|
||||
{{ $comments->withQueryString()->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No comments found.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
90
resources/views/web/comments/monthly.blade.php
Normal file
90
resources/views/web/comments/monthly.blade.php
Normal file
@@ -0,0 +1,90 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Community</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Monthly Top Commentators</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Members who posted the most comments in the last 30 days.</p>
|
||||
</div>
|
||||
<span class="flex-shrink-0 inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium bg-violet-500/10 text-violet-300 ring-1 ring-violet-500/25">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/>
|
||||
</svg>
|
||||
Last 30 days
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Leaderboard ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
@php $offset = ($rows->currentPage() - 1) * $rows->perPage(); @endphp
|
||||
|
||||
@if ($rows->isNotEmpty())
|
||||
<div class="rounded-xl border border-white/[0.06] overflow-hidden">
|
||||
|
||||
{{-- Table header --}}
|
||||
<div class="grid grid-cols-[3rem_1fr_auto] items-center gap-4 px-5 py-3 bg-white/[0.03] border-b border-white/[0.06]">
|
||||
<span class="text-xs font-semibold uppercase tracking-widest text-white/30 text-center">#</span>
|
||||
<span class="text-xs font-semibold uppercase tracking-widest text-white/30">Member</span>
|
||||
<span class="text-xs font-semibold uppercase tracking-widest text-white/30 text-right">Comments</span>
|
||||
</div>
|
||||
|
||||
{{-- Rows --}}
|
||||
<div class="divide-y divide-white/[0.04]">
|
||||
@foreach ($rows as $i => $row)
|
||||
@php
|
||||
$rank = $offset + $i + 1;
|
||||
$profileUrl = '/profile/' . (int)($row->user_id ?? 0) . '/' . rawurlencode($row->uname ?? 'user');
|
||||
$avatarUrl = \App\Support\AvatarUrl::forUser((int)($row->user_id ?? 0), null, 40);
|
||||
@endphp
|
||||
<div class="grid grid-cols-[3rem_1fr_auto] items-center gap-4 px-5 py-4
|
||||
{{ $rank <= 3 ? 'bg-white/[0.015]' : '' }} hover:bg-white/[0.03] transition-colors">
|
||||
|
||||
{{-- Rank badge --}}
|
||||
<div class="text-center">
|
||||
@if ($rank === 1)
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-amber-400/15 text-amber-300 text-xs font-bold ring-1 ring-amber-400/30">1</span>
|
||||
@elseif ($rank === 2)
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-slate-400/15 text-slate-300 text-xs font-bold ring-1 ring-slate-400/30">2</span>
|
||||
@elseif ($rank === 3)
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-orange-700/20 text-orange-400 text-xs font-bold ring-1 ring-orange-600/30">3</span>
|
||||
@else
|
||||
<span class="text-sm text-white/30 font-medium">{{ $rank }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Member info --}}
|
||||
<a href="{{ $profileUrl }}" class="flex items-center gap-3 min-w-0 hover:opacity-90 transition-opacity">
|
||||
<img src="{{ $avatarUrl }}" alt="{{ $row->uname ?? 'User' }}"
|
||||
class="w-9 h-9 rounded-full object-cover flex-shrink-0 ring-1 ring-white/[0.08]">
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-sm font-semibold text-white/90">{{ $row->uname ?? 'Unknown' }}</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{{-- Comment count --}}
|
||||
<div class="text-right flex-shrink-0">
|
||||
<span class="text-sm font-semibold text-violet-400">
|
||||
{{ number_format((int)($row->num_comments ?? 0)) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 flex justify-center">
|
||||
{{ $rows->withQueryString()->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No comment activity in the last 30 days.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -1,47 +1,111 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">Daily Uploads</h1>
|
||||
<p>List of all latest uploaded Artworks - <strong>Skins</strong>, <strong>Photography</strong> and <strong>Wallpapers</strong> to Skinbase ordered by upload date.</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default uploads-panel effect2">
|
||||
<div class="panel-body">
|
||||
<b>Choose date:</b>
|
||||
<ul id="recentTab">
|
||||
@foreach($dates as $i => $d)
|
||||
<li id="tab-{{ $i+1 }}" data-iso="{{ $d['iso'] }}">{{ $d['label'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div id="myContent">
|
||||
@include('web.partials.daily-uploads-grid', ['arts' => $recent])
|
||||
</div>
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Skinbase</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Daily Uploads</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Browse all artworks uploaded on a specific date.</p>
|
||||
</div>
|
||||
<a href="{{ route('uploads.latest') }}"
|
||||
class="inline-flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium border border-white/[0.08] bg-white/[0.04] text-white/70 hover:bg-white/[0.08] hover:text-white transition-colors">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.75">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
Latest Uploads
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Date strip ── --}}
|
||||
<div class="px-6 md:px-10 pb-5">
|
||||
<div class="flex items-center gap-1.5 overflow-x-auto pb-1 scrollbar-none" id="dateStrip">
|
||||
@foreach($dates as $i => $d)
|
||||
<button type="button"
|
||||
data-iso="{{ $d['iso'] }}"
|
||||
id="tab-{{ $i+1 }}"
|
||||
class="flex-shrink-0 rounded-lg px-3.5 py-1.5 text-xs font-medium border transition-colors
|
||||
{{ $i === 0
|
||||
? 'bg-sky-500/15 text-sky-300 border-sky-500/30 active-date-tab'
|
||||
: 'border-white/[0.08] bg-white/[0.03] text-white/50 hover:text-white hover:bg-white/[0.07]' }}">
|
||||
@if ($i === 0)
|
||||
Today
|
||||
@elseif ($i === 1)
|
||||
Yesterday
|
||||
@else
|
||||
{{ \Carbon\Carbon::parse($d['iso'])->format('M j') }}
|
||||
@endif
|
||||
</button>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Active date label ── --}}
|
||||
<div class="px-6 md:px-10 mb-4">
|
||||
<p id="activeDateLabel" class="text-sm text-white/40">
|
||||
Showing uploads from <strong class="text-white/70">{{ $dates[0]['label'] ?? 'today' }}</strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{-- ── Grid container ── --}}
|
||||
<div id="myContent" class="px-6 pb-16 md:px-10 min-h-48">
|
||||
@include('web.partials.daily-uploads-grid', ['arts' => $recent])
|
||||
</div>
|
||||
|
||||
{{-- ── Loading overlay (hidden) ── --}}
|
||||
<template id="loadingTpl">
|
||||
<div class="flex items-center justify-center py-20 text-white/30 text-sm gap-2">
|
||||
<svg class="w-5 h-5 animate-spin" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/>
|
||||
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"/>
|
||||
</svg>
|
||||
Loading artworks…
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
(function(){
|
||||
function loadDate(iso, tabId){
|
||||
var el = document.getElementById('myContent');
|
||||
fetch('/daily-uploads?ajax=1&datum=' + encodeURIComponent(iso))
|
||||
.then(function(r){ return r.text(); })
|
||||
.then(function(html){ el.innerHTML = html; });
|
||||
}
|
||||
(function () {
|
||||
var endpoint = '/uploads/daily';
|
||||
var strip = document.getElementById('dateStrip');
|
||||
var content = document.getElementById('myContent');
|
||||
var dateLabel = document.getElementById('activeDateLabel');
|
||||
var loadingTpl = document.getElementById('loadingTpl');
|
||||
|
||||
document.getElementById('recentTab').addEventListener('click', function(e){
|
||||
var li = e.target.closest('li');
|
||||
if (!li) return;
|
||||
var iso = li.getAttribute('data-iso');
|
||||
loadDate(iso, li.id);
|
||||
function setActive(btn) {
|
||||
strip.querySelectorAll('button').forEach(function (b) {
|
||||
b.classList.remove('bg-sky-500/15', 'text-sky-300', 'border-sky-500/30', 'active-date-tab');
|
||||
b.classList.add('border-white/[0.08]', 'bg-white/[0.03]', 'text-white/50');
|
||||
});
|
||||
})();
|
||||
btn.classList.add('bg-sky-500/15', 'text-sky-300', 'border-sky-500/30', 'active-date-tab');
|
||||
btn.classList.remove('border-white/[0.08]', 'bg-white/[0.03]', 'text-white/50');
|
||||
}
|
||||
|
||||
function loadDate(iso, label) {
|
||||
content.innerHTML = loadingTpl.innerHTML;
|
||||
dateLabel.innerHTML = 'Showing uploads from <strong class="text-white/70">' + label + '</strong>';
|
||||
|
||||
fetch(endpoint + '?ajax=1&datum=' + encodeURIComponent(iso), {
|
||||
headers: { 'X-Requested-With': 'XMLHttpRequest' }
|
||||
})
|
||||
.then(function (r) { return r.text(); })
|
||||
.then(function (html) { content.innerHTML = html; })
|
||||
.catch(function () {
|
||||
content.innerHTML = '<p class="text-center text-white/30 py-16 text-sm">Failed to load artworks.</p>';
|
||||
});
|
||||
}
|
||||
|
||||
strip.addEventListener('click', function (e) {
|
||||
var btn = e.target.closest('button[data-iso]');
|
||||
if (!btn || btn.classList.contains('active-date-tab')) return;
|
||||
setActive(btn);
|
||||
var label = btn.textContent.trim();
|
||||
loadDate(btn.getAttribute('data-iso'), label);
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
73
resources/views/web/downloads/today.blade.php
Normal file
73
resources/views/web/downloads/today.blade.php
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Downloads</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Most Downloaded Today</h1>
|
||||
<p class="mt-1 text-sm text-white/50">
|
||||
Artworks downloaded the most on <time datetime="{{ now()->toDateString() }}">{{ now()->format('d F Y') }}</time>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex-shrink-0 flex items-center gap-2">
|
||||
<span class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium bg-emerald-500/10 text-emerald-300 ring-1 ring-emerald-500/25">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
|
||||
Live today
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Artwork grid ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
@if ($artworks && $artworks->isNotEmpty())
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5">
|
||||
@foreach ($artworks as $art)
|
||||
@php
|
||||
$card = (object)[
|
||||
'id' => $art->id ?? null,
|
||||
'name' => $art->name ?? 'Artwork',
|
||||
'thumb' => $art->thumb ?? null,
|
||||
'thumb_srcset' => $art->thumb_srcset ?? null,
|
||||
'uname' => $art->uname ?? '',
|
||||
'category_name' => $art->category_name ?? '',
|
||||
'slug' => $art->slug ?? \Illuminate\Support\Str::slug($art->name ?? 'artwork'),
|
||||
];
|
||||
$downloads = (int) ($art->num_downloads ?? 0);
|
||||
@endphp
|
||||
|
||||
{{-- Wrap card to overlay download badge --}}
|
||||
<div class="relative">
|
||||
<x-artwork-card :art="$card" />
|
||||
@if ($downloads > 0)
|
||||
<div class="absolute top-2 left-2 z-40 pointer-events-none">
|
||||
<span class="inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px] font-semibold bg-black/60 text-emerald-300 backdrop-blur-sm ring-1 ring-emerald-500/30">
|
||||
<svg class="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
|
||||
</svg>
|
||||
{{ number_format($downloads) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mt-10 flex justify-center">
|
||||
{{ $artworks->withQueryString()->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<svg class="mx-auto mb-3 w-10 h-10 text-white/20" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
|
||||
</svg>
|
||||
<p class="text-white/40 text-sm">No downloads recorded today yet.</p>
|
||||
<p class="text-white/25 text-xs mt-1">Check back later as the day progresses.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -7,7 +7,7 @@
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="min-h-screen">
|
||||
@include('web.home.featured')
|
||||
|
||||
@include('web.home.uploads')
|
||||
|
||||
@@ -1,37 +1,46 @@
|
||||
|
||||
{{-- Featured row — use Nova cards for consistent layout with browse/gallery --}}
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
@if(!empty($featured))
|
||||
<div>
|
||||
@include('web.partials._artwork_card', ['art' => $featured])
|
||||
</div>
|
||||
@else
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>Featured Artwork</strong></div>
|
||||
<div class="panel-body text-neutral-400">No featured artwork set.</div>
|
||||
</div>
|
||||
@endif
|
||||
<section class="px-6 pt-8 pb-6 md:px-10">
|
||||
<div class="flex items-center gap-2 mb-6">
|
||||
<span class="inline-flex items-center justify-center w-7 h-7 rounded-md bg-amber-500/15 text-amber-400">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"/></svg>
|
||||
</span>
|
||||
<h2 class="text-base font-semibold text-white/90 tracking-wide uppercase">Featured</h2>
|
||||
</div>
|
||||
|
||||
@if(!empty($memberFeatured))
|
||||
<div>
|
||||
@include('web.partials._artwork_card', ['art' => $memberFeatured])
|
||||
</div>
|
||||
@else
|
||||
<div class="panel panel-default effect2">
|
||||
<div class="panel-heading"><strong>Member Featured</strong></div>
|
||||
<div class="panel-body text-neutral-400">No member featured artwork.</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
@if(!empty($featured))
|
||||
<div>
|
||||
@include('web.partials._artwork_card', ['art' => $featured])
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-2xl ring-1 ring-white/5 bg-white/[0.03] p-4">
|
||||
<p class="text-sm text-neutral-400">No featured artwork set.</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<div class="group relative block overflow-hidden rounded-2xl ring-1 ring-white/5 bg-black/20 shadow-lg p-4 text-center">
|
||||
<a href="{{ route('register') }}" title="Join Skinbase" class="inline-block mb-3">
|
||||
<img src="/gfx/sb_join.jpg" alt="Join SkinBase Community" class="w-full h-40 object-cover rounded-lg">
|
||||
</a>
|
||||
<div class="text-lg font-semibold text-white/90">Join Skinbase World</div>
|
||||
<p class="mt-2 text-sm text-neutral-400">Join Skinbase and be part of our community. Upload, share and explore curated photography and skins.</p>
|
||||
<a href="{{ route('register') }}" class="mt-3 inline-block px-4 py-2 rounded-md bg-sky-500 text-white">Create an account</a>
|
||||
@if(!empty($memberFeatured))
|
||||
<div>
|
||||
@include('web.partials._artwork_card', ['art' => $memberFeatured])
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-2xl ring-1 ring-white/5 bg-white/[0.03] p-4">
|
||||
<p class="text-sm text-neutral-400">No member featured artwork.</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<div class="group relative flex flex-col overflow-hidden rounded-2xl ring-1 ring-white/5 bg-white/[0.03] shadow-lg h-full">
|
||||
<a href="{{ route('register') }}" title="Join Skinbase" class="block shrink-0">
|
||||
<img src="/gfx/sb_join.jpg" alt="Join SkinBase Community" class="w-full h-48 object-cover">
|
||||
</a>
|
||||
<div class="flex flex-col flex-1 p-5 text-center">
|
||||
<div class="text-lg font-semibold text-white/90">Join Skinbase World</div>
|
||||
<p class="mt-2 text-sm text-neutral-400 flex-1">Join our community — upload, share and explore curated photography and skins.</p>
|
||||
<a href="{{ route('register') }}" class="mt-4 inline-block px-4 py-2 rounded-lg bg-sky-500 hover:bg-sky-400 transition-colors text-white text-sm font-medium">Create an account</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
48
resources/views/web/members/photos.blade.php
Normal file
48
resources/views/web/members/photos.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Members</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">{{ $page_title ?? 'Member Photos' }}</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Artwork submitted by the Skinbase community.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Artwork grid ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
@php $items = is_object($artworks) && method_exists($artworks, 'toArray') ? $artworks : collect($artworks ?? []); @endphp
|
||||
|
||||
@if (!empty($artworks) && (is_countable($artworks) ? count($artworks) > 0 : true))
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5">
|
||||
@foreach ($artworks as $art)
|
||||
@php
|
||||
$card = (object)[
|
||||
'id' => $art->id ?? null,
|
||||
'name' => $art->name ?? $art->title ?? 'Artwork',
|
||||
'thumb' => $art->thumb ?? $art->thumb_url ?? null,
|
||||
'thumb_srcset' => $art->thumb_srcset ?? null,
|
||||
'uname' => $art->uname ?? $art->author ?? '',
|
||||
'category_name' => $art->category_name ?? '',
|
||||
'slug' => $art->slug ?? \Illuminate\Support\Str::slug($art->name ?? 'artwork'),
|
||||
];
|
||||
@endphp
|
||||
<x-artwork-card :art="$card" />
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if (is_object($artworks) && method_exists($artworks, 'links'))
|
||||
<div class="mt-10 flex justify-center">
|
||||
{{ $artworks->withQueryString()->links() }}
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No artworks found.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -1,14 +1,11 @@
|
||||
@if($arts && count($arts))
|
||||
<div class="container_photo gallery_box">
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5">
|
||||
@foreach($arts as $art)
|
||||
<div class="photo_frame">
|
||||
<a href="/art/{{ $art->id }}/{{ \Illuminate\Support\Str::slug($art->name ?? '') }}">
|
||||
<img src="{{ $art->thumb }}" srcset="{{ $art->thumb_srcset }}" loading="lazy" decoding="async" alt="{{ $art->name }}" class="img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
<x-artwork-card :art="$art" />
|
||||
@endforeach
|
||||
</div>
|
||||
<br style="clear:both"><br>
|
||||
@else
|
||||
<p class="text-muted">No uploads for this date.</p>
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No uploads for this date.</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
174
resources/views/web/sections.blade.php
Normal file
174
resources/views/web/sections.blade.php
Normal file
@@ -0,0 +1,174 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@php
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
// One accent colour set per content-type (cycles if more than 4)
|
||||
$accents = [
|
||||
['ring' => 'ring-sky-500/30', 'bg' => 'bg-sky-500/10', 'text' => 'text-sky-400', 'badge' => 'bg-sky-500/15 text-sky-300', 'pill' => 'hover:bg-sky-500/15 hover:text-sky-300', 'dot' => 'bg-sky-400', 'border' => 'border-sky-500/25'],
|
||||
['ring' => 'ring-violet-500/30', 'bg' => 'bg-violet-500/10', 'text' => 'text-violet-400', 'badge' => 'bg-violet-500/15 text-violet-300', 'pill' => 'hover:bg-violet-500/15 hover:text-violet-300', 'dot' => 'bg-violet-400', 'border' => 'border-violet-500/25'],
|
||||
['ring' => 'ring-amber-500/30', 'bg' => 'bg-amber-500/10', 'text' => 'text-amber-400', 'badge' => 'bg-amber-500/15 text-amber-300', 'pill' => 'hover:bg-amber-500/15 hover:text-amber-300', 'dot' => 'bg-amber-400', 'border' => 'border-amber-500/25'],
|
||||
['ring' => 'ring-emerald-500/30', 'bg' => 'bg-emerald-500/10','text' => 'text-emerald-400','badge' => 'bg-emerald-500/15 text-emerald-300','pill' => 'hover:bg-emerald-500/15 hover:text-emerald-300','dot' => 'bg-emerald-400','border' => 'border-emerald-500/25'],
|
||||
];
|
||||
|
||||
// Map content-type slug → icon SVG paths
|
||||
$typeIcons = [
|
||||
'photography' => '<path stroke-linecap="round" stroke-linejoin="round" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>',
|
||||
'wallpapers' => '<path stroke-linecap="round" stroke-linejoin="round" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>',
|
||||
'skins' => '<path stroke-linecap="round" stroke-linejoin="round" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>',
|
||||
'other' => '<path stroke-linecap="round" stroke-linejoin="round" d="M5 3a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V7.414A2 2 0 0020.414 6L15 .586A2 2 0 0013.586 0H5z"/>',
|
||||
];
|
||||
$defaultIcon = '<path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/>';
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Skinbase</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Browse Sections</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Explore all artwork categories — photography, wallpapers, skins and more.</p>
|
||||
</div>
|
||||
|
||||
{{-- Quick-jump anchor links --}}
|
||||
<nav class="flex flex-wrap gap-2" aria-label="Section jump links">
|
||||
@foreach ($contentTypes as $i => $ct)
|
||||
@php $a = $accents[$i % count($accents)]; @endphp
|
||||
<a href="#section-{{ $ct->slug }}"
|
||||
class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium border border-white/[0.08] bg-white/[0.04] {{ $a['text'] }} hover:{{ $a['bg'] }} transition-colors">
|
||||
<span class="w-1.5 h-1.5 rounded-full {{ $a['dot'] }}"></span>
|
||||
{{ $ct->name }}
|
||||
</a>
|
||||
@endforeach
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Content type sections ── --}}
|
||||
<div class="px-6 pb-16 md:px-10 space-y-14">
|
||||
|
||||
@forelse ($contentTypes as $i => $ct)
|
||||
@php
|
||||
$a = $accents[$i % count($accents)];
|
||||
$icon = $typeIcons[strtolower($ct->slug)] ?? $defaultIcon;
|
||||
$totalCount = $artworkCountsByType[$ct->id] ?? 0;
|
||||
$roots = $ct->rootCategories;
|
||||
@endphp
|
||||
|
||||
<section id="section-{{ $ct->slug }}" class="scroll-mt-20">
|
||||
|
||||
{{-- Section heading ── --}}
|
||||
<div class="flex items-center gap-3 mb-6">
|
||||
<div class="flex-shrink-0 w-10 h-10 rounded-xl {{ $a['bg'] }} {{ $a['text'] }} flex items-center justify-center ring-1 {{ $a['ring'] }}">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.75">
|
||||
{!! $icon !!}
|
||||
</svg>
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="flex items-center gap-3 flex-wrap">
|
||||
<h2 class="text-xl font-bold text-white">{{ $ct->name }}</h2>
|
||||
@if ($totalCount > 0)
|
||||
<span class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium {{ $a['badge'] }}">
|
||||
{{ number_format($totalCount) }} artworks
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@if (!empty($ct->description))
|
||||
<p class="mt-0.5 text-sm text-white/45 leading-snug">{{ $ct->description }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<a href="/{{ strtolower($ct->slug) }}"
|
||||
class="hidden sm:inline-flex flex-shrink-0 items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium border {{ $a['border'] }} {{ $a['text'] }} {{ $a['bg'] }} hover:brightness-110 transition-all">
|
||||
Browse all
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- Separator line --}}
|
||||
<div class="h-px bg-white/[0.06] mb-6"></div>
|
||||
|
||||
@if ($roots->isEmpty())
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-6 py-8 text-center text-sm text-white/35">
|
||||
No categories available yet.
|
||||
</div>
|
||||
@else
|
||||
{{-- Root category cards grid --}}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
||||
@foreach ($roots as $root)
|
||||
@php $subCats = $root->children; @endphp
|
||||
<div class="group flex flex-col rounded-xl border border-white/[0.06] bg-white/[0.03] hover:border-white/[0.12] hover:bg-white/[0.05] transition-all duration-200 overflow-hidden">
|
||||
|
||||
{{-- Card header --}}
|
||||
<div class="px-4 pt-4 pb-3 border-b border-white/[0.05]">
|
||||
<div class="flex items-start justify-between gap-2">
|
||||
<div class="min-w-0">
|
||||
<a href="{{ $root->url }}"
|
||||
class="block text-sm font-semibold text-white/90 group-hover:{{ $a['text'] }} transition-colors leading-snug truncate">
|
||||
{{ $root->name }}
|
||||
</a>
|
||||
@if (!empty($root->description))
|
||||
<p class="mt-1 text-xs text-white/40 leading-relaxed line-clamp-2">{{ $root->description }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@if (($root->artwork_count ?? 0) > 0)
|
||||
<span class="flex-shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium {{ $a['badge'] }} whitespace-nowrap">
|
||||
{{ number_format($root->artwork_count) }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Sub-category pills --}}
|
||||
<div class="px-4 py-3 flex-1">
|
||||
@if ($subCats->isEmpty())
|
||||
<span class="text-xs text-white/25 italic">No subcategories</span>
|
||||
@else
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
@foreach ($subCats as $sub)
|
||||
<a href="{{ $sub->url }}"
|
||||
title="{{ $sub->name }}{{ ($sub->artwork_count ?? 0) > 0 ? ' · ' . number_format($sub->artwork_count) . ' artworks' : '' }}"
|
||||
class="inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs text-white/55 bg-white/[0.04] border border-white/[0.06] transition-colors {{ $a['pill'] }}">
|
||||
{{ $sub->name }}
|
||||
@if (($sub->artwork_count ?? 0) > 0)
|
||||
<span class="text-white/30 text-[10px]">{{ number_format($sub->artwork_count) }}</span>
|
||||
@endif
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Card footer link --}}
|
||||
<div class="px-4 pb-3 pt-1">
|
||||
<a href="{{ $root->url }}"
|
||||
class="text-xs {{ $a['text'] }} opacity-60 hover:opacity-100 transition-opacity inline-flex items-center gap-1">
|
||||
View all
|
||||
<svg class="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
{{-- Mobile browse-all link --}}
|
||||
<div class="mt-4 sm:hidden text-center">
|
||||
<a href="/{{ strtolower($ct->slug) }}"
|
||||
class="inline-flex items-center gap-1.5 rounded-lg px-4 py-2 text-sm font-medium border {{ $a['border'] }} {{ $a['text'] }} {{ $a['bg'] }}">
|
||||
Browse all {{ $ct->name }}
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</section>
|
||||
@empty
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No sections available.</p>
|
||||
</div>
|
||||
@endforelse
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
55
resources/views/web/uploads/latest.blade.php
Normal file
55
resources/views/web/uploads/latest.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Skinbase</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Latest Artworks</h1>
|
||||
<p class="mt-1 text-sm text-white/50">Recently uploaded Skins, Photography and Wallpapers.</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<a href="{{ route('uploads.daily') }}"
|
||||
class="inline-flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium border border-white/[0.08] bg-white/[0.04] text-white/70 hover:bg-white/[0.08] hover:text-white transition-colors">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.75">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
Daily Uploads
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── Artwork grid ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
@if ($artworks && $artworks->isNotEmpty())
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5">
|
||||
@foreach ($artworks as $art)
|
||||
@php
|
||||
$card = (object)[
|
||||
'id' => $art->id,
|
||||
'name' => $art->name,
|
||||
'thumb' => $art->thumb_url ?? $art->thumb ?? null,
|
||||
'thumb_srcset' => $art->thumb_srcset ?? null,
|
||||
'uname' => $art->uname ?? '',
|
||||
'category_name' => $art->category_name ?? '',
|
||||
];
|
||||
@endphp
|
||||
<x-artwork-card :art="$card" />
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
{{-- Pagination --}}
|
||||
<div class="mt-10 flex justify-center">
|
||||
{{ $artworks->withQueryString()->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
||||
<p class="text-white/40 text-sm">No artworks found.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user