diff --git a/.gitignore b/.gitignore index d53b555..3c8c1cd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,9 +27,3 @@ storybook-static # local state .env - -# landing assets (keep large videos out of git history) -public/landing/*.mp4 -public/landing/*.webm -public/landing/*.mov -public/landing/config.local.json diff --git a/public/landing/README.md b/public/landing/README.md index 71af708..1cf8b6a 100644 --- a/public/landing/README.md +++ b/public/landing/README.md @@ -2,21 +2,8 @@ Drop your landing assets here: - `loop.mp4`: the hi-res looping background video (recommended: H.264, muted) - `poster.png` (or `poster.jpg`/`poster.gif`): lightweight preview image shown before video loads (and when video is blocked) -- `config.json`: optional overrides for `videoSrc`/`posterSrc` (useful for pointing `videoSrc` to an external URL in production) -- `config.local.json`: optional local-only overrides (checked first, ignored by git) The landing page references these paths directly: -- `/landing/loop.mp4` (fallback) -- `/landing/Loop.mp4` (fallback) +- `/landing/loop.mp4` - `/landing/poster.png` -- `/landing/config.json` - -Recommended setup to avoid large git history: - -1. Host the video externally (example: GitHub Release asset). -2. Set `videoSrc` in `config.json` to the hosted URL. -3. Keep a `config.local.json` for local testing if needed. - -GitHub Release URL format (works well for large files): -`https://github.com///releases/download//Loop.mp4` diff --git a/public/landing/config.json b/public/landing/config.json index 8e24766..be7f457 100644 --- a/public/landing/config.json +++ b/public/landing/config.json @@ -1,4 +1,4 @@ { "posterSrc": "/landing/poster.png", - "videoSrc": "https://github.com/humanode-network/vortex-experimental-mockups/releases/download/landing-v1/Loop.mp4" + "videoSrc": "/landing/loop.mp4" } diff --git a/public/landing/loop.mp4 b/public/landing/loop.mp4 new file mode 100644 index 0000000..bba6844 --- /dev/null +++ b/public/landing/loop.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a4f9866e16f0c5cb164fdc7504d8622776594caf539425d53e648d707d8ebe9 +size 21700718 diff --git a/src/pages/Landing.tsx b/src/pages/Landing.tsx index c7dfbde..5892766 100644 --- a/src/pages/Landing.tsx +++ b/src/pages/Landing.tsx @@ -6,39 +6,15 @@ import { MarketingFooter } from "@/components/marketing/MarketingFooter"; import { MarketingPage } from "@/components/marketing/MarketingPage"; import { usePrefersReducedMotion } from "@/lib/usePrefersReducedMotion"; +const posterSrc = "/landing/poster.png"; +const videoSrc = "/landing/loop.mp4"; + const Landing: React.FC = () => { const prefersReducedMotion = usePrefersReducedMotion(); const [videoFailed, setVideoFailed] = React.useState(false); const [videoReady, setVideoReady] = React.useState(false); - const [posterSrc, setPosterSrc] = React.useState("/landing/poster.png"); - const [videoSrc, setVideoSrc] = React.useState("/landing/Loop.mp4"); const videoRef = React.useRef(null); - React.useEffect(() => { - const loadConfig = async () => { - try { - const endpoints = [ - "/landing/config.local.json", - "/landing/config.json", - ]; - for (const endpoint of endpoints) { - const res = await fetch(endpoint, { cache: "no-store" }); - if (!res.ok) continue; - const json = (await res.json()) as Partial<{ - posterSrc: string; - videoSrc: string; - }>; - if (json.posterSrc) setPosterSrc(json.posterSrc); - if (json.videoSrc) setVideoSrc(json.videoSrc); - break; - } - } catch { - // Optional config; ignore failures. - } - }; - void loadConfig(); - }, []); - React.useEffect(() => { if (prefersReducedMotion) return; if (videoFailed) return; @@ -85,7 +61,6 @@ const Landing: React.FC = () => { > - )}