- HomeController: is_logged_in now lives inside props JSON (not separate view var) - HomepageService: allForUser() adds user_data, fresh, suggested_creators; auth payload includes is_logged_in:true; guest payload merged with is_logged_in:false - getTrending/getFreshUploads/getFollowingFeed: limit 12→10 (2 clean rows of 5) - New getUserData() — unread messages + notifications counts via DB - New getSuggestedCreators() — top followed-count creators not yet followed, cached 5 min React — new components: - HomeWelcomeRow: greeting bar with avatar, unread message/notification badges, upload CTA - HomeFromFollowing: art grid from followed creators with empty-state - HomeTrendingForYou: personalized grid adapts heading/link to user's top tag - HomeBecauseYouLike: secondary personalized section keyed on top tag - HomeSuggestedCreators: 4-col creator cards with avatar, stats, View Profile link - HomeCTA: gradient upload banner; guest sees Create Account second CTA - HomeCategories: 5-tile static category grid with mascot images React — updated: - HomePage: split into GuestHomePage + AuthHomePage; routes on is_logged_in prop - HomeHero: isLoggedIn prop; upload href gates on auth; CTA → /discover/trending - HomeTrending: see-all → /discover/trending; grid 4→5 cols; slice to multiple of 5 - HomeFresh: see-all → /discover/fresh; grid 4→5 cols; slice to multiple of 5 - HomeFromFollowing/TrendingForYou/BecauseYouLike: 5-col grid, slice to multiple of 5 - HomeCategories: mascots per category (wallpapers/photography/skins/other), smaller tiles
45 lines
2.0 KiB
JavaScript
45 lines
2.0 KiB
JavaScript
import React from 'react'
|
|
|
|
/**
|
|
* Upload CTA banner — shown at the bottom of both guest and logged-in homepages.
|
|
*/
|
|
export default function HomeCTA({ isLoggedIn }) {
|
|
const uploadHref = isLoggedIn ? '/upload' : '/login?redirect=/upload'
|
|
|
|
return (
|
|
<section className="mt-14 px-4 sm:px-6 lg:px-8">
|
|
<div className="relative overflow-hidden rounded-2xl bg-gradient-to-br from-accent/20 via-nova-800 to-nova-900 px-8 py-12 text-center ring-1 ring-white/5">
|
|
{/* Decorative blobs */}
|
|
<div className="pointer-events-none absolute -top-12 -right-12 h-40 w-40 rounded-full bg-accent/10 blur-3xl" />
|
|
<div className="pointer-events-none absolute -bottom-10 -left-10 h-32 w-32 rounded-full bg-sky-500/10 blur-2xl" />
|
|
|
|
<div className="relative z-10">
|
|
<p className="text-xs font-semibold uppercase tracking-widest text-accent">Join the community</p>
|
|
<h2 className="mt-2 text-2xl font-bold text-white sm:text-3xl">
|
|
Ready to share your creativity?
|
|
</h2>
|
|
<p className="mx-auto mt-3 max-w-md text-sm text-nova-300">
|
|
Upload your artworks, wallpapers, and skins to reach thousands of enthusiasts around the world.
|
|
</p>
|
|
<div className="mt-6 flex flex-wrap justify-center gap-3">
|
|
<a
|
|
href={uploadHref}
|
|
className="rounded-xl bg-accent px-6 py-2.5 text-sm font-semibold text-white shadow-lg shadow-accent/20 transition hover:brightness-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"
|
|
>
|
|
Upload your artwork
|
|
</a>
|
|
{!isLoggedIn && (
|
|
<a
|
|
href="/register"
|
|
className="rounded-xl border border-white/10 bg-nova-700 px-6 py-2.5 text-sm font-semibold text-white transition hover:bg-nova-600"
|
|
>
|
|
Create account
|
|
</a>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|