Homepage
- Add HomepageService with hero, trending (award-weighted), fresh uploads,
popular tags, creator spotlight (weekly uploads ranking), and news sections
- Add React components: HomePage, HomeHero, HomeTrending, HomeFresh,
HomeTags, HomeCreators, HomeNews (lazy-loaded below the fold)
- Wire home.blade.php with JSON props, SEO meta, JSON-LD, and hero preload
- Add HomePage.jsx to vite.config.js inputs
Profile page
- Hero banner with random user artwork as background + dark gradient overlay
- Favourites section uses real Artwork models + <x-artwork-card> for CDN URLs
- Newest artworks grid: gallery-grid → grid grid-cols-2 gap-4
Edit Profile page (user.blade.php)
- Add hero banner (featured wallpaper/photography via artwork_features,
content_type_id IN [2,3]) sourced in UserController
- Remove bg-deep from outer wrapper; card backgrounds: bg-panel → bg-nova-800
- Remove stray AI-generated tag fragment from template
Author profile links
- Fix all /@username routes in: HomepageService, MonthlyCommentatorsController,
LatestCommentsController, MyBuddiesController and corresponding blade views
Legacy view namespace
- Register View::addNamespace('legacy', resource_path('views/_legacy'))
in AppServiceProvider::boot()
- Convert all view('legacy.x') and @include('legacy.x') calls to legacy::x
- Migrate legacy views to resources/views/_legacy/ with namespace support
78 lines
3.2 KiB
JavaScript
78 lines
3.2 KiB
JavaScript
import React from 'react'
|
|
|
|
const FALLBACK = 'https://files.skinbase.org/default/missing_lg.webp'
|
|
|
|
export default function HomeHero({ artwork }) {
|
|
if (!artwork) {
|
|
return (
|
|
<section className="relative flex min-h-[27vw] max-h-[300px] w-full items-end overflow-hidden bg-nova-900">
|
|
<div className="pointer-events-none absolute inset-0 bg-gradient-to-t from-nova-900 via-nova-900/60 to-transparent" />
|
|
<div className="relative z-10 w-full px-6 pb-7 sm:px-10 lg:px-16">
|
|
<h1 className="text-2xl font-bold tracking-tight text-white sm:text-4xl">
|
|
Discover Digital Art
|
|
</h1>
|
|
<p className="mt-2 max-w-xl text-sm text-soft">
|
|
Wallpapers, skins & digital creations from a global community.
|
|
</p>
|
|
<div className="mt-4 flex flex-wrap gap-3">
|
|
<a href="/browse" className="rounded-xl bg-accent px-5 py-2 text-sm font-semibold text-white shadow-lg transition hover:brightness-110">Explore</a>
|
|
<a href="/upload" className="rounded-xl bg-nova-700 px-5 py-2 text-sm font-semibold text-white shadow-lg transition hover:bg-nova-600">Upload</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
const src = artwork.thumb_lg || artwork.thumb || FALLBACK
|
|
|
|
return (
|
|
<section className="group relative flex min-h-[27vw] max-h-[300px] w-full items-end overflow-hidden bg-nova-900">
|
|
{/* Background image */}
|
|
<img
|
|
src={src}
|
|
alt={artwork.title}
|
|
className="absolute inset-0 h-full w-full object-cover transition-transform duration-700 group-hover:scale-[1.02]"
|
|
fetchpriority="high"
|
|
decoding="async"
|
|
onError={(e) => { e.currentTarget.src = FALLBACK }}
|
|
/>
|
|
|
|
{/* Gradient overlay */}
|
|
<div className="pointer-events-none absolute inset-0 bg-gradient-to-t from-nova-900 via-nova-900/55 to-transparent" />
|
|
|
|
{/* Content */}
|
|
<div className="relative z-10 w-full px-6 pb-7 sm:px-10 lg:px-16">
|
|
<p className="mb-1.5 text-xs font-semibold uppercase tracking-widest text-accent">
|
|
Featured Artwork
|
|
</p>
|
|
<h1 className="text-2xl font-bold tracking-tight text-white drop-shadow sm:text-4xl lg:text-5xl">
|
|
{artwork.title}
|
|
</h1>
|
|
<p className="mt-1.5 text-sm text-soft">
|
|
by <a href={artwork.url} className="text-nova-200 hover:text-white transition">{artwork.author}</a>
|
|
</p>
|
|
<div className="mt-4 flex flex-wrap gap-3">
|
|
<a
|
|
href="/browse"
|
|
className="rounded-xl bg-accent px-5 py-2 text-sm font-semibold text-white shadow-lg transition hover:brightness-110"
|
|
>
|
|
Explore
|
|
</a>
|
|
<a
|
|
href="/upload"
|
|
className="rounded-xl bg-nova-700 px-5 py-2 text-sm font-semibold text-white shadow-lg transition hover:bg-nova-600"
|
|
>
|
|
Upload
|
|
</a>
|
|
<a
|
|
href={artwork.url}
|
|
className="rounded-xl border border-nova-600 px-5 py-2 text-sm font-semibold text-nova-200 shadow transition hover:border-nova-400 hover:text-white"
|
|
>
|
|
View Artwork
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|