diff --git a/src/App.tsx b/src/App.tsx index 6e35607..18f25d1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,7 @@ import FeaturesLabeledList from '@/components/sections/features/FeaturesLabeledL import FooterSimpleCard from '@/components/sections/footer/FooterSimpleCard'; import HeroBrand from '@/components/sections/hero/HeroBrand'; import MetricsMinimalCards from '@/components/sections/metrics/MetricsMinimalCards'; -import NavbarCentered from '@/components/ui/NavbarCentered'; +import FloatingNav from '@/components/ui/FloatingNav'; import PricingLayeredCards from '@/components/sections/pricing/PricingLayeredCards'; import SocialProofMarquee from '@/components/sections/social-proof/SocialProofMarquee'; import TestimonialRatingCards from '@/components/sections/testimonial/TestimonialRatingCards'; @@ -14,33 +14,32 @@ import HeroTrustedBy from '@/components/ui/HeroTrustedBy'; export default function App() { return ( <> - + +
{ + const handleClick = useButtonClick(href); + return ( + + ); +}; + +export default function FloatingNav({ logo, navItems, ctaButton }: FloatingNavProps) { + const [visible, setVisible] = useState(true); + const [lastScrollY, setLastScrollY] = useState(0); + + const controlNavbar = () => { + if (typeof window !== 'undefined') { + if (window.scrollY > lastScrollY && window.scrollY > 100) { + setVisible(false); + } else { + setVisible(true); + } + setLastScrollY(window.scrollY); + } + }; + + useEffect(() => { + window.addEventListener('scroll', controlNavbar); + return () => { + window.removeEventListener('scroll', controlNavbar); + }; + }, [lastScrollY]); + + const CtaButtonHandler = useButtonClick(ctaButton.href); + + return ( + + {visible && ( + +
+ {logo} +
+ {navItems.map((item) => ( + + ))} +
+ +
+
+ )} +
+ ); +} \ No newline at end of file diff --git a/src/components/ui/HeroTrustedBy.tsx b/src/components/ui/HeroTrustedBy.tsx index e2e2e37..f50d991 100644 --- a/src/components/ui/HeroTrustedBy.tsx +++ b/src/components/ui/HeroTrustedBy.tsx @@ -1,23 +1,27 @@ -const avatars = [ +const avatarUrls = [ "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AM9hp4M6eDzEwMxDU5gYArbELf/professional-headshot-of-a-japanese-male-1776690846328-d57aee35.png", "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AM9hp4M6eDzEwMxDU5gYArbELf/professional-headshot-of-a-female-busine-1776690854791-b9f5ea1f.png", "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AM9hp4M6eDzEwMxDU5gYArbELf/professional-headshot-of-a-young-japanes-1776690864881-b5f3321c.png", + "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AM9hp4M6eDzEwMxDU5gYArbELf/professional-headshot-of-a-japanese-fema-1776690873867-edc6ebaa.png", + "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AM9hp4M6eDzEwMxDU5gYArbELf/professional-headshot-of-a-middle-aged-m-1776690883590-fe8d0a50.png", ]; const HeroTrustedBy = () => { return ( -
+
- {avatars.map((src, index) => ( + {avatarUrls.map((url, index) => ( {`Trusted ))}
- Trusted by over 2000 agencies + + Trusted by over 2000 agencies +
); }; diff --git a/src/index.css b/src/index.css index d658447..a828f7f 100644 --- a/src/index.css +++ b/src/index.css @@ -16,7 +16,7 @@ --background-accent: #222222; /* @layout/border-radius/rounded */ - --radius: 0.25rem; + --radius: 0.2rem; /* @layout/content-width/medium */ --width-content-width: clamp(40rem, 80vw, 100rem); @@ -141,15 +141,6 @@ body { min-height: 100vh; overscroll-behavior: none; overscroll-behavior-y: none; - padding-top: 5rem; -} - -#nav { - position: fixed; - top: 0; - width: 100%; - z-index: 1000; - background-color: var(--background); } h1, @@ -188,6 +179,8 @@ h6 { .primary-button, .secondary-button { + position: relative; + overflow: hidden; transition: transform 0.3s ease-out, box-shadow 0.3s ease-out; } @@ -208,6 +201,18 @@ h6 { 0 0 8px var(--secondary-cta-text); } +.hero-trusted-by { + display: inline-flex; + align-items: center; + gap: 0.75rem; + padding: 0.5rem 1rem 0.5rem 0.5rem; + background-color: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 9999px; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); +} + .glassmorphic-tag { display: inline-flex; align-items: center; diff --git a/src/styles/animations.css b/src/styles/animations.css index e700ade..d1eb014 100644 --- a/src/styles/animations.css +++ b/src/styles/animations.css @@ -200,3 +200,31 @@ transform: translateY(-2px) scale(1.02); } } + +@keyframes shimmer-effect { + from { + transform: translateX(-100%) skewX(-25deg); + } + to { + transform: translateX(200%) skewX(-25deg); + } +} + +.btn-hover-shimmer::after, +.primary-button::after, +.secondary-button::after { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 50%; + height: 100%; + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%); + transform: translateX(-100%); +} + +.btn-hover-shimmer:hover::after, +.primary-button:hover::after, +.secondary-button:hover::after { + animation: shimmer-effect 0.8s ease-in-out; +}