Skip to content

Commit

Permalink
refactor: Update lamp component styles and responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
captain-n3m0 committed Aug 24, 2024
1 parent e624e28 commit 6ea201f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 26 deletions.
44 changes: 22 additions & 22 deletions src/components/ui/lamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const LampContainer = ({
className
)}
>
<div className="relative flex w-full flex-1 sm:scale-y-100 scale-y-125 items-center justify-center isolate z-0 ">
<div className="relative flex w-full flex-1 items-center justify-center isolate z-0 ">
<motion.div
initial={{ opacity: 0.5, width: "15rem" }}
whileInView={{ opacity: 1, width: "30rem" }}
initial={{ opacity: 0.5, width: "8rem" }}
whileInView={{ opacity: 1, width: "18rem" }}
transition={{
delay: 0.3,
duration: 0.8,
Expand All @@ -29,14 +29,14 @@ export const LampContainer = ({
style={{
backgroundImage: `conic-gradient(var(--conic-position), var(--tw-gradient-stops))`,
}}
className="absolute inset-auto right-1/2 h-56 overflow-visible w-[80vw] max-w-[30rem] bg-gradient-conic from-[#B49955] via-transparent to-transparent text-white [--conic-position:from_70deg_at_center_top]"
className="absolute inset-auto right-1/2 h-36 w-[50vw] max-w-[18rem] bg-gradient-conic from-[#B49955] via-transparent to-transparent text-white [--conic-position:from_70deg_at_center_top]"
>
<div className="absolute w-full left-0 bg-black h-40 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]" />
<div className="absolute w-40 h-full left-0 bg-black bottom-0 z-20 [mask-image:linear-gradient(to_right,white,transparent)]" />
<div className="absolute w-full left-0 bg-black h-16 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]" />
<div className="absolute w-16 h-full left-0 bg-black bottom-0 z-20 [mask-image:linear-gradient(to_right,white,transparent)]" />
</motion.div>
<motion.div
initial={{ opacity: 0.5, width: "15rem" }}
whileInView={{ opacity: 1, width: "30rem" }}
initial={{ opacity: 0.5, width: "8rem" }}
whileInView={{ opacity: 1, width: "18rem" }}
transition={{
delay: 0.3,
duration: 0.8,
Expand All @@ -45,39 +45,39 @@ export const LampContainer = ({
style={{
backgroundImage: `conic-gradient(var(--conic-position), var(--tw-gradient-stops))`,
}}
className="absolute inset-auto left-1/2 h-56 w-[80vw] max-w-[30rem] bg-gradient-conic from-transparent via-transparent to-[#B49955] text-white [--conic-position:from_290deg_at_center_top]"
className="absolute inset-auto left-1/2 h-36 w-[50vw] max-w-[18rem] bg-gradient-conic from-transparent via-transparent to-[#B49955] text-white [--conic-position:from_290deg_at_center_top]"
>
<div className="absolute w-40 h-full right-0 bg-black bottom-0 z-20 [mask-image:linear-gradient(to_left,white,transparent)]" />
<div className="absolute w-full right-0 bg-black h-40 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]" />
<div className="absolute w-16 h-full right-0 bg-black bottom-0 z-20 [mask-image:linear-gradient(to_left,white,transparent)]" />
<div className="absolute w-full right-0 bg-black h-16 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]" />
</motion.div>
<div className="absolute top-1/2 h-48 w-full translate-y-12 scale-x-150 bg-black blur-2xl"></div>
<div className="absolute top-1/2 z-50 h-48 w-full bg-transparent opacity-10 backdrop-blur-md"></div>
<div className="absolute inset-auto z-50 h-36 w-[70vw] max-w-[28rem] -translate-y-1/2 rounded-full bg-[#987D39] opacity-50 blur-3xl"></div>
<div className="absolute top-1/2 h-24 w-full translate-y-[6rem] scale-x-125 bg-black blur-2xl"></div>
<div className="absolute top-1/2 z-50 h-24 w-full bg-transparent opacity-10 backdrop-blur-md"></div>
<div className="absolute inset-auto z-50 h-20 w-[50vw] max-w-[16rem] translate-y-1/2 rounded-full bg-[#987D39] opacity-50 blur-3xl"></div>
<motion.div
initial={{ width: "8rem" }}
whileInView={{ width: "16rem" }}
initial={{ width: "6rem" }}
whileInView={{ width: "25rem" }}
transition={{
delay: 0.3,
duration: 0.8,
ease: "easeInOut",
}}
className="absolute inset-auto z-30 h-36 w-[40vw] max-w-64 -translate-y-[6rem] rounded-full bg-[#FFC020] blur-2xl"
className="absolute inset-auto z-30 h-20 w-[30vw] max-w-48 -translate-y-[4rem] rounded-full bg-[#FFC020] blur-2xl"
></motion.div>
<motion.div
initial={{ width: "15rem" }}
whileInView={{ width: "30rem" }}
initial={{ width: "10rem" }}
whileInView={{ width: "20rem" }}
transition={{
delay: 0.3,
duration: 0.8,
ease: "easeInOut",
}}
className="absolute inset-auto z-50 h-0.5 w-[80vw] max-w-[30rem] -translate-y-[7rem] bg-[#FFC020] "
className="absolute inset-auto z-50 h-0.5 w-[60vw] max-w-[18rem] -translate-y-[4.4rem] bg-[#FFC020] "
></motion.div>

<div className="absolute inset-auto z-40 h-44 w-full -translate-y-[12.5rem] bg-black "></div>

</div>

<div className="relative z-50 flex -translate-y-80 flex-col items-center px-5">
<div className="relative z-50 flex -translate-y-40 flex-col items-center px-5">
{children}
</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ const Home = () => {
ease: "easeInOut",
}}
className="text-center text-white font-semibold font-manrope leading-tight
sm:text-3xl sm:leading-[40px]
md:text-4xl md:leading-[50px]
lg:text-5xl lg:leading-[60px]
xl:text-6xl xl:leading-[70px]"
text-3xl sm:text-4xl md:text-5xl lg:text-6xl xl:text-7xl"
>
We appreciate your patience but
<br />
Expand Down

0 comments on commit 6ea201f

Please sign in to comment.