Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/src/components/HomeComponents/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CopyButton } from './CopyButton';
import { ToastNotification } from './ToastNotification';
import { useState } from 'react';
import { Eye, EyeOff } from 'lucide-react';
import { AnimatedHeroGlow } from '@/components/utils/AnimatedHeroGlow';

export const Hero = (props: Props) => {
const [showUuid, setShowUuid] = useState(true);
Expand Down Expand Up @@ -94,7 +95,7 @@ export const Hero = (props: Props) => {
</div>
</div>

<div className="shadow"></div>
<AnimatedHeroGlow />

<ToastNotification />
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ exports[`Hero component using snapshot renders correctly 1`] = `
</div>
</div>
<div
class="shadow"
aria-hidden="true"
class="pointer-events-none absolute rounded-[24px] rotate-[35deg]"
style="top: 200px; right: 460px; width: 260px; height: 400px; filter: blur(150px);"
/>
<div
data-testid="toast-notification"
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/LandingComponents/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button } from '../../ui/button';
import { buttonVariants } from '../../ui/button';
import { HeroCards } from './HeroCards';
import { GitHubLogoIcon } from '@radix-ui/react-icons';
import { AnimatedHeroGlow } from '@/components/utils/AnimatedHeroGlow';

export const Hero = () => {
return (
Expand Down Expand Up @@ -51,7 +52,7 @@ export const Hero = () => {
<HeroCards />
</div>

<div className="shadow"></div>
<AnimatedHeroGlow />
</section>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ exports[`Hero component using snapshot renders correctly 1`] = `
</div>
</div>
<div
class="shadow"
aria-hidden="true"
class="pointer-events-none absolute rounded-[24px] rotate-[35deg]"
style="top: 200px; right: 460px; width: 260px; height: 400px; filter: blur(150px);"
/>
</section>
</DocumentFragment>
Expand Down
30 changes: 30 additions & 0 deletions frontend/src/components/utils/AnimatedHeroGlow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { motion } from 'framer-motion';

export const AnimatedHeroGlow = () => {
return (
<motion.div
aria-hidden="true"
className="pointer-events-none absolute rounded-[24px] rotate-[35deg]"
style={{
top: 200,
right: 460,
width: 260,
height: 400,
filter: 'blur(150px)',
}}
animate={{
right: [460, 160],
backgroundColor: [
'hsla(330, 100%, 50%, 0.2)',
'hsla(240, 100%, 50%, 0.8)',
],
}}
transition={{
duration: 4,
repeat: Infinity,
repeatType: 'reverse',
ease: 'linear',
}}
/>
);
};
62 changes: 0 additions & 62 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
html {
scroll-behavior: smooth;
}

/* HeroCards background shadow */
.shadow {
position: absolute;
background: hsla(330, 100%, 50%, 0%);
border-radius: 24px;
rotate: 35deg;

width: 260px;
top: 200px;
height: 400px;
filter: blur(150px);
animation: shadow-slide infinite 4s linear alternate;
}

@keyframes shadow-slide {
from {
background: hsla(330, 100%, 50%, 20%); /* Pink shadow color */
right: 460px;
}
to {
background: hsla(240, 100%, 50%, 80%); /* Blue shadow color */
right: 160px;
}
}

@media (max-width: 1024px) {
.shadow {
top: 70px;
}

@keyframes shadow-slide {
from {
background: hsla(330, 100%, 50%, 20%); /* Pink shadow color */
right: 460px;
}
to {
background: hsla(240, 100%, 50%, 50%); /* Blue shadow color */
right: 160px;
}
}
}

@media (max-width: 768px) {
.shadow {
top: 70px;
width: 100px;
height: 350px;
filter: blur(60px);
}

@keyframes shadow-slide {
from {
background: hsla(330, 100%, 50%, 20%); /* Pink shadow color */
right: 280px;
}
to {
background: hsla(240, 100%, 50%, 30%); /* Blue shadow color */
right: 100px;
}
}
}
Loading