From 3b5cbfe2a8c0e28228cbe3e8efc97a7a7a457a12 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 30 Oct 2026 13:35:36 +0200 Subject: [PATCH] After adding the public webwelcome page2 --- .../src/features/landing/LandingPage.tsx | 387 +++----- .../landing/components/LandingFeedStrip.tsx | 68 +- .../landing/components/LandingGamePeek.tsx | 144 +-- .../landing/components/LandingHeader.tsx | 4 +- .../landing/components/LandingHero.tsx | 212 ++--- prediqo_web/src/features/landing/landing.css | 872 +++++++++++++++++- prediqo_web/src/shared/i18n/locales/en.ts | 3 +- prediqo_web/src/shared/i18n/locales/fr.ts | 3 +- 8 files changed, 1099 insertions(+), 594 deletions(-) diff --git a/prediqo_web/src/features/landing/LandingPage.tsx b/prediqo_web/src/features/landing/LandingPage.tsx index ea962b81..4152fa29 100644 --- a/prediqo_web/src/features/landing/LandingPage.tsx +++ b/prediqo_web/src/features/landing/LandingPage.tsx @@ -1,7 +1,8 @@ /** - * Public Tloto web landing — cinematic composition, not a mobile dashboard clone. + * Public Tloto web landing — desktop-first "nocturnal prediction exchange". + * One composition per section, dense editorial rhythm, no empty voids. */ -import { useEffect, useMemo, type CSSProperties } from 'react'; +import { useEffect, useMemo } from 'react'; import { Link as RouterLink } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useGames, useHeroAdvertisements } from '../home/hooks/useCatalog'; @@ -17,6 +18,7 @@ function scrollToId(id: string) { document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' }); } +/** Loads the expressive display/body fonts once on mount. */ function ensureLandingFonts() { const id = 'tloto-landing-fonts'; if (document.getElementById(id)) return; @@ -35,6 +37,35 @@ function ensureLandingFonts() { document.head.append(preconnect1, preconnect2, stylesheet); } +/** + * Reveals elements tagged `.tl-reveal` as they enter the viewport. + * Soft-fails (reveals everything) when IntersectionObserver is unavailable or + * the user prefers reduced motion. + */ +function useScrollReveal() { + useEffect(() => { + const nodes = Array.from(document.querySelectorAll('.tl-reveal')); + const reduce = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches; + if (reduce || typeof IntersectionObserver === 'undefined') { + nodes.forEach((n) => n.classList.add('tl-in')); + return; + } + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + entry.target.classList.add('tl-in'); + observer.unobserve(entry.target); + } + }); + }, + { threshold: 0.14, rootMargin: '0px 0px -8% 0px' } + ); + nodes.forEach((n) => observer.observe(n)); + return () => observer.disconnect(); + }, []); +} + /** Guest marketing home for the Tloto web app. */ export function LandingPage() { const { t } = useTranslation(); @@ -47,6 +78,8 @@ export function LandingPage() { ensureLandingFonts(); }, []); + useScrollReveal(); + const navItems = useMemo( () => [ { id: 'offers', label: t('landing.nav.offers') }, @@ -78,112 +111,75 @@ export function LandingPage() { const activePlayers = activityQ.data?.activePlayersCount; const heroAd = (heroQ.data ?? [])[0] ?? null; + const offerMedia = heroAd?.imageUrl + ? `linear-gradient(100deg, rgba(5,8,14,0.72), rgba(5,8,14,0.28) 55%, rgba(5,8,14,0.62)), center/cover no-repeat url(${heroAd.imageUrl})` + : heroAd?.backgroundGradient || undefined; return (
+ - {/* Offers: one full-bleed promotional plane, not a carousel card stack */} -
-
-

{t('landing.offers.kicker')}

-

- {t('landing.offers.title')} -

-
-
-
- {heroQ.isLoading &&

{t('common.loading')}

} - {!heroQ.isLoading && !heroAd && ( -

{t('landing.offers.empty')}

- )} - {heroAd && ( - <> -

- {heroAd.title} -

- {heroAd.subtitle && ( -

- {heroAd.subtitle} -

- )} - - {heroAd.ctaLabel || t('landing.hero.ctaPrimary')} - - - )} -
+ {/* Offers — one full-bleed cinematic promotional band from the first hero ad */} +
+ {offerMedia &&
} +
+
+

{t('landing.offers.kicker')}

+ + {heroQ.isLoading &&

{t('common.loading')}

} + + {!heroQ.isLoading && !heroAd && ( + <> +

{t('landing.offers.title')}

+

{t('landing.offers.empty')}

+ + )} + + {heroAd && ( + <> +

{heroAd.title}

+ {heroAd.subtitle &&

{heroAd.subtitle}

} + + {heroAd.ctaLabel || t('landing.hero.ctaPrimary')} + + + )}
-
-
-

{t('landing.live.kicker')}

-

- {t('landing.live.title')} -

-

- {typeof activePlayers === 'number' && activePlayers > 0 - ? t('landing.live.subtitleWithCount', { count: activePlayers }) - : t('landing.live.subtitle')} -

-
+ {/* Live — dual ticker boards side by side */} +
+
+
+
+

{t('landing.live.kicker')}

+

{t('landing.live.title')}

+

+ {t('landing.live.subtitle')} +

+
+ {typeof activePlayers === 'number' && activePlayers > 0 && ( + + + {t('landing.live.subtitleWithCount', { count: activePlayers })} + + )} +
+ +
-
-
-
-

{t('landing.why.kicker')}

-

- {t('landing.why.title')} -

-

{t('landing.why.subtitle')}

+ {/* Why — three numbered columns with hairline separators */} +
+
+
+

{t('landing.why.kicker')}

+

{t('landing.why.title')}

+

+ {t('landing.why.subtitle')} +

-
+
{whyItems.map((item, i) => ( -
-

- {String(i + 1).padStart(2, '0')} -

-

- {item.title} -

-

{item.body}

+
+

{String(i + 1).padStart(2, '0')}

+

{item.title}

+

{item.body}

))}
-
-

{t('landing.faqCta.kicker')}

-

- {t('landing.faqCta.title')} -

-

{t('landing.faqCta.subtitle')}

-
- - {t('landing.faqCta.openFaq')} - - - {t('landing.faqCta.createAccount')} - + {/* Closing CTA band */} +
+
+

+ {t('landing.faqCta.kicker')} +

+

{t('landing.faqCta.title')}

+

{t('landing.faqCta.subtitle')}

+
+ + {t('landing.faqCta.openFaq')} + + + {t('landing.faqCta.createAccount')} + +
-