commit
3728385ebc
@ -1,39 +1,45 @@
|
|||||||
import '../styles/Experiences.css';
|
import '../styles/Experiences.css';
|
||||||
import SingleExperience from './SingleExperience';
|
import SingleExperience from './SingleExperience';
|
||||||
|
import React, {useEffect, useState} from "react";
|
||||||
|
|
||||||
function Experiences() {
|
function Experiences() {
|
||||||
const experiencesData = [
|
const [experiences, setExperiences] = useState([]);
|
||||||
{
|
const [experienceTasks, setExperienceTasks] = useState([]);
|
||||||
role: "Web Development Intern",
|
const [error, setError] = useState(null);
|
||||||
company: "Pandora",
|
|
||||||
duration: "April 2024",
|
useEffect(() => {
|
||||||
location: "Rennes (Ille-et-Vilaine), France",
|
const fetchExperiencesAndTasks = async () => {
|
||||||
tasks: [
|
try {
|
||||||
"Development of a dynamic website with database integration (HTML, CSS, PHP, SQL)",
|
let response = await fetch('/api/experiences');
|
||||||
"Created a reusable interface used as an internal learning resource",
|
if (!response.ok) {
|
||||||
"Introduction to GitHub Actions"
|
throw new Error(`Erreur HTTP: ${response.status}`);
|
||||||
]
|
}
|
||||||
},
|
let data = await response.json();
|
||||||
{
|
setExperiences(data.data);
|
||||||
role: "IT Support Intern",
|
|
||||||
company: "INRAE",
|
response = await fetch('/api/experienceTasks');
|
||||||
duration: "April 2023",
|
if (!response.ok) {
|
||||||
location: "Rennes (Ille-et-Vilaine), France",
|
throw new Error(`Erreur HTTP: ${response.status}`);
|
||||||
tasks: [
|
}
|
||||||
"Introduction to ProxMox Backup and UpdateEngine tools",
|
data = await response.json();
|
||||||
"Preparation of two workstations",
|
setExperienceTasks(data.data);
|
||||||
"Setup of a Wi-Fi hotspot using a Raspberry Pi",
|
} catch (err) {
|
||||||
"Installation of a RAID 1 system"
|
setError(err.message);
|
||||||
]
|
}
|
||||||
|
};
|
||||||
|
fetchExperiencesAndTasks();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
return <div>Erreur lors de la récupération des données : {error}</div>;
|
||||||
}
|
}
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id="experiences-section">
|
<section id="experiences-section">
|
||||||
<h1 className="section-title">Experiences</h1>
|
<h1 className="section-title">Experiences</h1>
|
||||||
<div className="experiences-container">
|
<div className="experiences-container">
|
||||||
{experiencesData.map((exp) => (
|
{experiences.map((exp) => (
|
||||||
<SingleExperience experience={exp}/>
|
<SingleExperience experience={exp} tasks={experienceTasks.filter(task => task.experience_id === exp.id)}/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -1,29 +1,28 @@
|
|||||||
import SingleProject from "./SingleProject.jsx";
|
import SingleProject from "./SingleProject.jsx";
|
||||||
import "../styles/Projects.css"
|
import "../styles/Projects.css"
|
||||||
|
import React, {useEffect, useState} from "react";
|
||||||
function Projects() {
|
function Projects() {
|
||||||
const codevProject = {
|
const [projects, setProjects] = useState([]);
|
||||||
title: "Codev",
|
const [error, setError] = useState(null);
|
||||||
image: "codev",
|
|
||||||
color: "orange",
|
useEffect(() => {
|
||||||
nbImage: 5,
|
const fetchProjects = async () => {
|
||||||
skills: ['HTML', 'CSS', 'PHP', 'JavaScript', 'SQL'],
|
try {
|
||||||
description: "A collaborative platform where developers can create, share, and grow coding projects. Built for solo makers or teams, it features real-time messaging and a centralized workspace."
|
const response = await fetch('/api/projects');
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Erreur HTTP: ${response.status}`);
|
||||||
}
|
}
|
||||||
const SAECProject = {
|
const data = await response.json();
|
||||||
title: "SAE C++",
|
setProjects(data.data);
|
||||||
image: "SAE_C++",
|
} catch (err) {
|
||||||
color: "purple",
|
setError(err.message);
|
||||||
nbImage: 3,
|
|
||||||
skills: ['C++', 'Git'],
|
|
||||||
description: "A C++ program developed for creating and managing treasure hunt records, with a web interface that allows browsing and consulting the entries."
|
|
||||||
}
|
}
|
||||||
const proxmoxProject = {
|
};
|
||||||
title: "Proxmox",
|
fetchProjects();
|
||||||
image: "proxmox",
|
}, []);
|
||||||
color: "green",
|
|
||||||
nbImage: 5,
|
if (error) {
|
||||||
skills: [],
|
return <div>Erreur lors de la récupération des données : {error}</div>;
|
||||||
description: "A Proxmox-based infrastructure that consolidates my personal cloud, home automation, code hosting, media services and web hosting into a single, self-hosted environment."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -31,9 +30,9 @@ function Projects() {
|
|||||||
<section id="projects-section">
|
<section id="projects-section">
|
||||||
<h1 className="section-title">Projects</h1>
|
<h1 className="section-title">Projects</h1>
|
||||||
<div className="projects-section-list">
|
<div className="projects-section-list">
|
||||||
<SingleProject image={codevProject.image} title={codevProject.title} description={codevProject.description} skills={codevProject.skills} color={codevProject.color} nbImage={codevProject.nbImage}/>
|
{projects.map(project => (
|
||||||
<SingleProject image={SAECProject.image} title={SAECProject.title} description={SAECProject.description} skills={SAECProject.skills} color={SAECProject.color} nbImage={SAECProject.nbImage}/>
|
<SingleProject image={project.image_name} title={project.title} description={project.description} skills={project.skills} color={project.color} nbImage={project.nb_image}/>
|
||||||
<SingleProject image={proxmoxProject.image} title={proxmoxProject.title} description={proxmoxProject.description} skills={proxmoxProject.skills} color={proxmoxProject.color} nbImage={proxmoxProject.nbImage}/>
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="show-more-container">
|
<div className="show-more-container">
|
||||||
<p className="show-more-link">
|
<p className="show-more-link">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import '../styles/SingleExperience.css';
|
import '../styles/SingleExperience.css';
|
||||||
|
|
||||||
function SingleExperience({ experience }) {
|
function SingleExperience({ experience, tasks }) {
|
||||||
return (
|
return (
|
||||||
<div className="experience-card">
|
<div className="experience-card">
|
||||||
<div className="experience-card-left">
|
<div className="experience-card-left">
|
||||||
@ -11,8 +11,8 @@ function SingleExperience({ experience }) {
|
|||||||
<div className="experience-card-right">
|
<div className="experience-card-right">
|
||||||
<h3 className="experience-role">{experience.role}</h3>
|
<h3 className="experience-role">{experience.role}</h3>
|
||||||
<ul className="experience-tasks">
|
<ul className="experience-tasks">
|
||||||
{experience.tasks.map((task, index) => (
|
{tasks.map((task) => (
|
||||||
<li key={index}>{task}</li>
|
<li>{task.description}</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,35 +1,49 @@
|
|||||||
|
import React, { useState, useEffect } from 'react';
|
||||||
import SkillCard from "./SkillCard.jsx";
|
import SkillCard from "./SkillCard.jsx";
|
||||||
import "../styles/Skills.css";
|
import "../styles/Skills.css";
|
||||||
|
|
||||||
function Skills() {
|
function Skills() {
|
||||||
|
const [skills, setSkills] = useState([]);
|
||||||
|
const [error, setError] = useState(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const fetchSkills = async () => {
|
||||||
|
try {
|
||||||
|
const response = await fetch('/api/skills');
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Erreur HTTP: ${response.status}`);
|
||||||
|
}
|
||||||
|
const data = await response.json();
|
||||||
|
setSkills(data.data);
|
||||||
|
} catch (err) {
|
||||||
|
setError(err.message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
fetchSkills();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
return <div>Erreur lors de la récupération des données : {error}</div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uniqueSkillTypes = [...new Set(skills.map(skill => skill.type))];
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id="skills-section">
|
<section id="skills-section">
|
||||||
<h1 className="section-title">Skills</h1>
|
<h1 className="section-title">Skills</h1>
|
||||||
|
{uniqueSkillTypes.map(type => (
|
||||||
<div id="languages" className="skill-category">
|
<div id="languages" className="skill-category">
|
||||||
<h2>Languages</h2>
|
<h2>{type}</h2>
|
||||||
<div className="skills">
|
<div className="skills">
|
||||||
<SkillCard text="Python"/>
|
{skills
|
||||||
<SkillCard text="Java"/>
|
.filter(skill => skill.type === type)
|
||||||
<SkillCard text="C++"/>
|
.map(skill => (
|
||||||
<SkillCard text="HTML"/>
|
<SkillCard text={skill.name}/>
|
||||||
<SkillCard text="CSS"/>
|
))}
|
||||||
<SkillCard text="JavaScript"/>
|
|
||||||
<SkillCard text="PHP"/>
|
|
||||||
<SkillCard text="SQL"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="librairies" className="skill-category">
|
|
||||||
<h2>Librairies</h2>
|
|
||||||
<div className="skills">
|
|
||||||
<SkillCard text="React"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="tools" className="skill-category">
|
|
||||||
<h2>Tools</h2>
|
|
||||||
<div className="skills">
|
|
||||||
<SkillCard text="Git"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
))}
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,12 @@ import react from '@vitejs/plugin-react'
|
|||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
'/api': {
|
||||||
|
target: 'http://localhost:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user