From 06f5c2d11942f53f75d7a74902746be5ee0caf37 Mon Sep 17 00:00:00 2001 From: me Date: Thu, 7 May 2026 05:52:52 +0530 Subject: [PATCH] refactor: add image logo variant and subtle texts on home --- frontend/src/components/Logo.tsx | 85 ++-- frontend/src/pages/Home.tsx | 755 ++++++++++++++++--------------- 2 files changed, 425 insertions(+), 415 deletions(-) diff --git a/frontend/src/components/Logo.tsx b/frontend/src/components/Logo.tsx index 27151c5..80a16f9 100644 --- a/frontend/src/components/Logo.tsx +++ b/frontend/src/components/Logo.tsx @@ -2,47 +2,54 @@ import { DotIcon } from "@phosphor-icons/react"; import "@fontsource/knewave/400.css"; interface LogoProps { - scale?: number; - type?: "inline" | "mono" | "logo"; + scale?: number; + type?: "inline" | "mono" | "logo" | null; + ul?: boolean; } -export default function Logo({ scale = 1, type = "logo" }: LogoProps) { - if (type === "inline") { - return ( - - pi. ku - .  - - ); - } +export default function Logo({ scale = 1, type = null, ul = false }: LogoProps) { + if (type === "inline") { + return ( + + pi. ku + .  + + ); + } - if (type === "mono") { - return ( - - pi. ku. - - ); - } + if (type === "mono") { + return ( + + pi. ku. + + ); + } - return ( -
- Pi - -  Ku - -
- ); + if (type === "logo") { + return ( + Pi. Ku. logo + ); + } + + return ( +
+ Pi + +  Ku + +
+ ); } diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 697f8d7..0382c07 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -1,10 +1,10 @@ import { InfoIcon } from "@phosphor-icons/react"; import { ReactLenis } from "lenis/react"; import { - motion, - useMotionValueEvent, - useScroll, - useTransform, + motion, + useMotionValueEvent, + useScroll, + useTransform, } from "motion/react"; import { useRef, useState } from "react"; import { useNavigate } from "react-router-dom"; @@ -14,384 +14,387 @@ import Saajan from "../components/ui/Saajan.tsx"; import { ROUTES } from "../config/routes.ts"; import { formatDate } from "../utils/dateFormat.ts"; +import "@fontsource/space-mono/index.css"; +import "@fontsource/architects-daughter/index.css"; + export default function Home() { - const sectionContainer1 = useRef(null); - const { scrollYProgress } = useScroll({ - target: sectionContainer1, - }); - const [isEnvelopeFlipped, setIsEnvelopeFlipped] = useState(true); - const [flapOpen, setFlapOpen] = useState(false); - const [recipient, setRecipient] = useState("someone dear"); - const [ignite, setIgnite] = useState(false); + const sectionContainer1 = useRef(null); + const { scrollYProgress } = useScroll({ + target: sectionContainer1, + }); + const [isEnvelopeFlipped, setIsEnvelopeFlipped] = useState(true); + const [flapOpen, setFlapOpen] = useState(false); + const [recipient, setRecipient] = useState("someone dear"); + const [ignite, setIgnite] = useState(false); - const navigate = useNavigate(); + const navigate = useNavigate(); - useMotionValueEvent(scrollYProgress, "change", (latestScrollValue) => { - if (latestScrollValue > 0.54) { - setFlapOpen(false); - } else { - setFlapOpen(true); - } - if (latestScrollValue <= 0.6) { - setIsEnvelopeFlipped(true); - } else { - setIsEnvelopeFlipped(false); - } - if (latestScrollValue > 0.68) { - setRecipient("future me"); - } else { - setRecipient("someone dear"); - } - if (latestScrollValue > 0.77) { - setIgnite(true); - } else { - setIgnite(false); - } - }); + useMotionValueEvent(scrollYProgress, "change", (latestScrollValue) => { + if (latestScrollValue > 0.54) { + setFlapOpen(false); + } else { + setFlapOpen(true); + } + if (latestScrollValue <= 0.6) { + setIsEnvelopeFlipped(true); + } else { + setIsEnvelopeFlipped(false); + } + if (latestScrollValue > 0.68) { + setRecipient("future me"); + } else { + setRecipient("someone dear"); + } + if (latestScrollValue > 0.77) { + setIgnite(true); + } else { + setIgnite(false); + } + }); - return ( - -
-
- {/* Intro */} - -

- You've been carrying something -

-

- unsaid -

-
+ return ( + +
+
+ {/* Intro */} + +

+ You've been carrying something +

+ + unsaid + +
- -
- and that's okay... -
-
- {/* pi. ku. */} - - - - is a{" "} - - safe space - - ,
- - where you can - -
-
+ +
+ and that's okay... +
+
+ {/* pi. ku. */} + + + + is a{" "} + + safe space + + ,
+ + where you can + +
+
-
- - pen down your unsaid words into{" "} - - letters - - . - - {/* Seal */} - - seal it{" "} - - secure - {" "} - and{" "} - - private - - . - - {/* Send / vault */} - - send it to{" "} - - someone dear - - - - {" "} - or{" "} - - - yourself in the future - - . - - - {/* Burn */} - - and even burn it{" "} - to release the burden. - - {/* Outro */} - - You've been carrying it long enough. - - {/* CTA */} - - - - -
+
+ + pen down your unsaid words into{" "} + + letters + + . + + {/* Seal */} + + seal it{" "} + + secure + {" "} + and{" "} + + private + + . + + {/* Send / vault */} + + send it to{" "} + + someone dear + + + + {" "} + or{" "} + + + yourself in the future + + . + + + {/* Burn */} + + and even burn it{" "} + to release the burden. + + {/* Outro */} + + You've been carrying it long enough. + + {/* CTA */} + + + + +
-
- -
-
-
- letter +
+ +
+
+
+ letter +
+
+
+ {/* Envelope */} + + { }} + isFlip={isEnvelopeFlipped} + openFlap={flapOpen} + /> + + {/* Saajan */} + + + + {/* Orb */} + +
+
-
- - {/* Envelope */} - - {}} - isFlip={isEnvelopeFlipped} - openFlap={flapOpen} - /> - - {/* Saajan */} - - - - {/* Orb */} - -
-
-
-
-
- ); +
+
+ ); }