- {/* Annonce pour les lecteurs d'écran */} -
- {currentPhase === AnimationPhase.FADING_OUT && - "Transition en cours vers la page À propos"} -
- - - - - - {currentPhase === AnimationPhase.BACKGROUND_ANIMATING && ( -
- )} -
- ); -}; - -export default HomePage; \ No newline at end of file diff --git a/src/components/HomePage/HomePageBackground.tsx b/src/components/HomePage/HomePageBackground.tsx deleted file mode 100644 index 0f8ce8c..0000000 --- a/src/components/HomePage/HomePageBackground.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { motion } from 'framer-motion'; -import { useState, useEffect } from 'react'; - -import HomePageBackgroundImage from './homepageBackground.png'; -import { HomePageBackgroundProps } from '../../types'; - -import '../../styles/HomePage.css'; - -const useImagePreloader = (src: string): boolean => { - const [isLoaded, setIsLoaded] = useState(false); - - useEffect((): (() => void) => { - const img = new Image(); - img.src = src; - img.onload = (): void => { setIsLoaded(true); }; - img.onerror = (): void => { - console.error('Erreur lors du chargement de l\'image de fond'); - setIsLoaded(true); - }; - - return (): void => { - img.onload = null; - img.onerror = null; - }; - }, [src]); - - return isLoaded; -}; - -const HomePageBackground: React.FC = ({ - animateExit -}) => { - const isImageLoaded = useImagePreloader(HomePageBackgroundImage); - const imageVariants = { - initial: { - x: '0vw', - opacity: 0 - }, - loaded: { - x: '0vw', - opacity: 1, - transition: { - opacity: { duration: 0.5 } - } - }, - exit: { - x: '-25vw', - opacity: 0, - transition: { - duration: 3, - ease: [0.11, 0, 0.5, 0] - } - } - }; - - const getAnimationState = (): string => { - if (animateExit) return 'exit'; - if (isImageLoaded) return 'loaded'; - return 'initial'; - }; - - return ( - - ); -}; - -export default HomePageBackground; \ No newline at end of file diff --git a/src/components/HomePage/HomePageFooter.tsx b/src/components/HomePage/HomePageFooter.tsx deleted file mode 100644 index e2b8c8b..0000000 --- a/src/components/HomePage/HomePageFooter.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { motion } from 'framer-motion'; - -import { HomePageFooterProps } from '../../types'; - -import '../../styles/HomePage.css'; - -const HomePageFooter: React.FC = ({ animateExit }) => { - const currentYear = new Date().getFullYear(); - - return ( - - - Le Dev Novice © {currentYear} - - - ); -}; - -export default HomePageFooter; \ No newline at end of file diff --git a/src/components/HomePage/HomePageMenu.tsx b/src/components/HomePage/HomePageMenu.tsx deleted file mode 100644 index c4b1d51..0000000 --- a/src/components/HomePage/HomePageMenu.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { Link } from '@tanstack/react-router'; -import { motion } from 'framer-motion'; - -import { HomePageMenuProps } from '../../types'; - -import '../../styles/HomePage.css'; - -const HomePageMenu: React.FC = ({ - animateExit, - onAboutClick -}) => { - const handleAboutKeyDown = (event: React.KeyboardEvent): void => { - if (event.key === 'Enter' || event.key === ' ') { - event.preventDefault(); - onAboutClick(); - } - }; - - const menuVariants = { - visible: { opacity: 1 }, - hidden: { opacity: 0 } - } as const; - - return ( - - {/* A Propos */} -
- -
- - {/* Projets */} -
- - Projets - -
- - {/* Publications */} -
- - Publications - -
-
- ); -}; - -export default HomePageMenu; \ No newline at end of file diff --git a/src/components/HomePage/HomePageSocials.tsx b/src/components/HomePage/HomePageSocials.tsx deleted file mode 100644 index a90c39e..0000000 --- a/src/components/HomePage/HomePageSocials.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { motion } from 'framer-motion'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faGithub, - faLinkedin, - faTwitter, - IconDefinition, -} from '@fortawesome/free-brands-svg-icons'; - -import { HomePageSocialsProps } from '../../types'; - -import '../../styles/HomePage.css'; - -interface SocialLink { - name: string; - icon: IconDefinition; - url: string; - ariaLabel: string; -} - -const socialLinks: SocialLink[] = [ - { - name: 'GitHub', - icon: faGithub, - url: 'https://github.com/LeDevNovice', - ariaLabel: 'Visitez mon profil GitHub' - }, - { - name: 'LinkedIn', - icon: faLinkedin, - url: 'https://linkedin.com/in/gregory-saison', - ariaLabel: 'Visitez mon profil LinkedIn' - }, - { - name: 'Twitter', - icon: faTwitter, - url: 'https://x.com/ledevnovice', - ariaLabel: 'Visitez mon profil Twitter' - } -]; - -const HomePageSocials: React.FC = ({ animateExit }) => { - return ( - - {socialLinks.map((social) => ( - - - - ))} - - ); -}; - -export default HomePageSocials; \ No newline at end of file diff --git a/src/components/HomePage/HomePageTitle.tsx b/src/components/HomePage/HomePageTitle.tsx deleted file mode 100644 index d914c47..0000000 --- a/src/components/HomePage/HomePageTitle.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { motion } from 'framer-motion'; - -import { HomePageTitleProps } from '../../types'; - -import '../../styles/HomePage.css'; - -const HomePageTitle: React.FC = ({ animateExit }) => { - return ( - -
-

- GREG.GS -

-

- DEV BACK-END / DEVOPS.JS -

-
-
-
- ); -}; - -export default HomePageTitle; \ No newline at end of file diff --git a/src/components/HomePage/homepageBackground.png b/src/components/HomePage/homepageBackground.png deleted file mode 100644 index 344472f..0000000 Binary files a/src/components/HomePage/homepageBackground.png and /dev/null differ diff --git a/src/components/IntroOverlay/IntroDot.tsx b/src/components/IntroOverlay/IntroDot.tsx deleted file mode 100644 index 232eed1..0000000 --- a/src/components/IntroOverlay/IntroDot.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { motion } from "framer-motion"; -import { IntroDotProps } from '../../types'; -import '../../styles/Overlay.css'; - -const IntroDot: React.FC = ({ - variant, - animationState, - handleDotAnimationComplete -}) => { - const onAnimationComplete = (): void => { - handleDotAnimationComplete(animationState); - }; - - return ( -