diff --git a/src/components/Skills.jsx b/src/components/Skills.jsx
index 249a737..eac0508 100644
--- a/src/components/Skills.jsx
+++ b/src/components/Skills.jsx
@@ -23,7 +23,7 @@ function Skills() {
}, []);
if (error) {
- return
Erreur lors de la récupération des données : {error}
;
+ return
Error retrieving data: {error}
;
}
const uniqueSkillTypes = [...new Set(skills.map(skill => skill.type))];
diff --git a/src/pages/HomePage.jsx b/src/pages/HomePage.jsx
index 297d006..8495889 100644
--- a/src/pages/HomePage.jsx
+++ b/src/pages/HomePage.jsx
@@ -1,9 +1,26 @@
-import Home from '../components/Home.jsx'
-import Experiences from '../components/Experiences.jsx'
-import Projects from '../components/Projects.jsx'
-import Skills from '../components/Skills.jsx'
-import Footer from '../components/Footer.jsx'
+import {useEffect, useState} from 'react'; // 1. Import useEffect
+import { useLocation } from 'react-router-dom'; // 2. Import useLocation
+import Home from '../components/Home.jsx';
+import Experiences from '../components/Experiences.jsx';
+import Projects from '../components/Projects.jsx';
+import Skills from '../components/Skills.jsx';
+import Footer from '../components/Footer.jsx';
+
function HomePage() {
+ const location = useLocation();
+
+ useEffect(() => {
+ if (location.hash) {
+ const id = location.hash.replace('#', '');
+ const element = document.getElementById(id);
+ if (element) {
+ setTimeout(() => {
+ element.scrollIntoView({ behavior: 'smooth' });
+ }, 100);
+ }
+ }
+ }, [location]);
+
return (
diff --git a/src/pages/ProjectsPage.jsx b/src/pages/ProjectsPage.jsx
index 81bd214..9a35e3c 100644
--- a/src/pages/ProjectsPage.jsx
+++ b/src/pages/ProjectsPage.jsx
@@ -1,38 +1,8 @@
-import React, {useEffect, useState} from "react";
-import SingleProject from "../components/SingleProject.jsx";
+import Projects from "../components/Projects.jsx";
+
function ProjectsPage() {
- const [projects, setProjects] = useState([]);
- const [error, setError] = useState(null);
-
- useEffect(() => {
- const fetchProjects = async () => {
- try {
- const response = await fetch('/api/projects/');
- if (!response.ok) {
- throw new Error(`Erreur HTTP: ${response.status}`);
- }
- const data = await response.json();
- setProjects(data.data);
- } catch (err) {
- setError(err.message);
- }
- };
- fetchProjects();
- }, []);
-
- if (error) {
- return
Erreur lors de la récupération des données : {error}
;
- }
-
-
-
return (
-
-
Voici mes projets
;
- {projects.map(project => (
-
- ))}
-
- )
+
+ );
}
export default ProjectsPage;
\ No newline at end of file
diff --git a/src/styles/Projects.css b/src/styles/Projects.css
index 43bb802..14c3872 100644
--- a/src/styles/Projects.css
+++ b/src/styles/Projects.css
@@ -10,7 +10,7 @@
}
-.show-more-link {
+.projects-link {
display: inline-block;
color: #B0B0B0;
border: 1px solid #B0B0B0;
@@ -22,7 +22,7 @@
transition: all 0.3s ease;
}
-.show-more-link:hover {
+.projects-link:hover {
background-color: #B0B0B0;
color: #1E1E1E;
transform: translateY(-3px);
@@ -31,4 +31,29 @@
.projects-section-list {
display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+}
+
+
+
+
+
+.projects-section-header {
+ text-align: center;
+ margin-bottom: 2rem;
+ position: relative;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+}
+
+.projects-section-subtitle {
+ font-size: 1.2rem;
+ color: #B0B0B0;
+}
+
+.projects-back-link {
+ text-align: center;
+ margin-bottom: 3rem;
}
\ No newline at end of file
diff --git a/src/styles/SingleProject.css b/src/styles/SingleProject.css
index 583a373..77367a8 100644
--- a/src/styles/SingleProject.css
+++ b/src/styles/SingleProject.css
@@ -69,18 +69,27 @@
margin-right: 1rem;
}
-.color-orange {
- background-color: #D95F46;
+.color-blue {
+ background-color: #2556ff;
+}
+
+.color-green {
+ background-color: #36a837;
}
.color-purple {
background-color: #a646d9;
}
-.color-green {
- background-color: #36a837;
+.color-red {
+ background-color: #ff0000;
}
+.color-yellow {
+ background-color: #ffd427;
+}
+
+
.single-project-title {
font-size: 2rem;
color: #EAEAEA;