Enhance SEO and loading experience across the application

- Updated meta tags and descriptions for improved SEO in multiple pages.
- Added a LoadingScreen component with progress indication.
- Implemented lazy loading for components to optimize performance.
- Introduced SEO component for consistent meta management.
- Added sitemap and robots.txt for better search engine indexing.
This commit is contained in:
2026-03-25 23:21:01 +01:00
parent acf53601ef
commit fabdeed07f
21 changed files with 563 additions and 151 deletions
+56 -36
View File
@@ -1,54 +1,74 @@
import React, { Suspense, lazy } from "react";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { Suspense, lazy, useState, useEffect } from "react";
import {
BrowserRouter as Router,
Routes,
Route,
useLocation,
} from "react-router-dom";
import BackgroundWrapper from "./components/backgrounds/BackgroundWrapper";
import CardNav from "./components/CardNav";
import Home from "./pages/Home";
import Contact from "./pages/Contact";
import Projects from "./pages/Projects";
const Home = lazy(() => import("./pages/Home"));
const Contact = lazy(() => import("./pages/Contact"));
const Projects = lazy(() => import("./pages/Projects"));
import LoadingScreen from "./components/LoadingScreen";
const Cohaise = lazy(() => import("./pages/Cohaise"));
import Zatyshok from "./pages/projects/Zatyshok";
import NeoTokyoRush from "./pages/projects/NeoTokyoRush";
import EchoesOfTheLastStop from "./pages/projects/EchoesOfTheLastStop";
import ShadowPurgeRiteOfTheDemon from "./pages/projects/ShadowPurgeRiteOfTheDemon";
const Zatyshok = lazy(() => import("./pages/projects/Zatyshok"));
const NeoTokyoRush = lazy(() => import("./pages/projects/NeoTokyoRush"));
const EchoesOfTheLastStop = lazy(
() => import("./pages/projects/EchoesOfTheLastStop"),
);
const ShadowPurgeRiteOfTheDemon = lazy(
() => import("./pages/projects/ShadowPurgeRiteOfTheDemon"),
);
import ScrollToTop from "./components/ScrollToTop";
import WYGTIWIF from "./pages/projects/WYG-TIWIF";
const WYGTIWIF = lazy(() => import("./pages/projects/WYG-TIWIF"));
function AppContent() {
const location = useLocation();
const [isPageLoading, setIsPageLoading] = useState(false);
useEffect(() => {
// Déclenche l'écran de chargement au changement de route
setIsPageLoading(true);
// On laisse l'écran au moins 600ms pour que l'animation warp soit visible
const timer = setTimeout(() => {
setIsPageLoading(false);
}, 600);
return () => clearTimeout(timer);
}, [location.pathname]);
return (
<>
{isPageLoading && <LoadingScreen />}
<ScrollToTop />
<BackgroundWrapper />
<CardNav />
<main>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/contact" element={<Contact />} />
<Route
path="/cohaise"
element={
<Suspense
fallback={<div className="loading">Loading Universe...</div>}
>
<Cohaise />
</Suspense>
}
/>
<Route path="/projects" element={<Projects />} />
<Route path="/projects/neo-tokyo-rush" element={<NeoTokyoRush />} />
<Route
path="/projects/echoes-of-the-last-stop"
element={<EchoesOfTheLastStop />}
/>
<Route
path="/projects/shadow-purge-rite-of-the-demon"
element={<ShadowPurgeRiteOfTheDemon />}
/>
<Route path="/projects/zatyshok" element={<Zatyshok />} />
<Route path="/projects/wyg-tiwif" element={<WYGTIWIF />} />
</Routes>
<Suspense fallback={<LoadingScreen />}>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/contact" element={<Contact />} />
<Route path="/cohaise" element={<Cohaise />} />
<Route path="/projects" element={<Projects />} />
<Route path="/projects/neo-tokyo-rush" element={<NeoTokyoRush />} />
<Route
path="/projects/echoes-of-the-last-stop"
element={<EchoesOfTheLastStop />}
/>
<Route
path="/projects/shadow-purge-rite-of-the-demon"
element={<ShadowPurgeRiteOfTheDemon />}
/>
<Route path="/projects/zatyshok" element={<Zatyshok />} />
<Route path="/projects/wyg-tiwif" element={<WYGTIWIF />} />
</Routes>
</Suspense>
</main>
<footer>