feat(wip homepage with new design)

This commit is contained in:
2026-03-28 17:35:28 +01:00
parent 72721adaff
commit 8766552707
37 changed files with 684 additions and 204 deletions

View File

@@ -0,0 +1,33 @@
import { useEffect, useState } from 'react';
import { ChevronUp } from 'lucide-react';
export function ScrollToTop() {
const [isVisible, setIsVisible] = useState(false);
useEffect(() => {
const hero = document.getElementById('hero');
if (!hero) return;
const observer = new IntersectionObserver(
([entry]) => setIsVisible(!entry.isIntersecting),
{ threshold: 0 },
);
observer.observe(hero);
return () => observer.disconnect();
}, []);
const scrollToTop = () => window.scrollTo({ top: 0, behavior: 'smooth' });
if (!isVisible) return null;
return (
<button
onClick={scrollToTop}
aria-label="Retour en haut"
className="fixed bottom-6 right-6 z-50 p-3 rounded-full border-3 border-black bg-primary shadow-[4px_4px_0px_rgba(0,0,0,1)] hover:shadow-none hover:translate-x-1 hover:translate-y-1 transition duration-200"
>
<ChevronUp className="size-5" />
</button>
);
}