From b05174b0460e94f38cdb741349e53c6dc110ff52 Mon Sep 17 00:00:00 2001 From: jasperdemmers Date: Sun, 9 Jun 2024 20:49:24 +0200 Subject: [PATCH] Skills & Responsiveness --- src/components/LogoWithText.jsx | 8 ++--- src/components/ProgressBar.jsx | 24 +++++++++++++++ src/components/TitleWithIcon.jsx | 32 +++++++++++++++++--- src/data/skills.jsx | 47 +++++++++++++++++++++++++++++ src/pages/Profile.jsx | 4 +++ src/sections/profile/Experience.jsx | 4 +-- src/sections/profile/Hero.jsx | 10 +----- src/sections/profile/Quote.jsx | 15 +++++++++ src/sections/profile/Skills.jsx | 35 +++++++++++++++++++++ 9 files changed, 160 insertions(+), 19 deletions(-) create mode 100644 src/components/ProgressBar.jsx create mode 100644 src/data/skills.jsx create mode 100644 src/sections/profile/Quote.jsx create mode 100644 src/sections/profile/Skills.jsx diff --git a/src/components/LogoWithText.jsx b/src/components/LogoWithText.jsx index f219b77..d727f48 100644 --- a/src/components/LogoWithText.jsx +++ b/src/components/LogoWithText.jsx @@ -3,15 +3,15 @@ import PropTypes from 'prop-types'; const LogoWithText = ({ text, imageSrc }) => { return (
-
+
Logo
-
-

{text}

+
+

{text}

); diff --git a/src/components/ProgressBar.jsx b/src/components/ProgressBar.jsx new file mode 100644 index 0000000..c91579b --- /dev/null +++ b/src/components/ProgressBar.jsx @@ -0,0 +1,24 @@ +import PropTypes from 'prop-types'; + +const ProgressBar = ({ progress }) => { + const gradient = 'bg-gradient-to-r from-accent-light to-primary-light dark:from-accent-dark dark:to-primary-dark'; + + return ( +
+
+
+ ); +}; + +ProgressBar.propTypes = { + progress: PropTypes.number.isRequired, +}; + +export default ProgressBar; \ No newline at end of file diff --git a/src/components/TitleWithIcon.jsx b/src/components/TitleWithIcon.jsx index e1fee70..76e3c5b 100644 --- a/src/components/TitleWithIcon.jsx +++ b/src/components/TitleWithIcon.jsx @@ -1,13 +1,37 @@ import PropTypes from 'prop-types'; +import { useState, useEffect } from 'react'; const TitleWithIcon = ({ text1, text2, text3 }) => { + const [windowSize, setWindowSize] = useState({ + width: undefined, + height: undefined, + }); + + useEffect(() => { + const handleResize = () => { + setWindowSize({ + width: window.innerWidth, + height: window.innerHeight, + }); + }; + + window.addEventListener('resize', handleResize); + handleResize(); + return () => window.removeEventListener('resize', handleResize); + }, []); + + const isSmallScreen = windowSize.width <= 640; // sm breakpoint is 640px + const commonSpanClasses = "font-display"; return ( -
- {text1} - {text2} - {text3} +
+ + {isSmallScreen && text1.includes('Present') ? text1.replace('Present', 'Now') : text1} + + {text2} + {text3}
); }; diff --git a/src/data/skills.jsx b/src/data/skills.jsx new file mode 100644 index 0000000..acb6221 --- /dev/null +++ b/src/data/skills.jsx @@ -0,0 +1,47 @@ +// Define personal skills data +export const personalSkillsData = [ + { + skillName: "Resilience", + progress: 90, + }, + { + skillName: "Cultural Awareness", + progress: 75, + }, + { + skillName: "Curiosity", + progress: 80, + }, + { + skillName: "Time Management", + progress: 70, + }, + { + skillName: "Communication", + progress: 75, + } +]; + +// Define professional skills data +export const professionalSkillsData = [ + { + skillName: "Networking", + progress: 95, + }, + { + skillName: "Programming", + progress: 70, + }, + { + skillName: "Cybersecurity", + progress: 65, + }, + { + skillName: "Cloud Computing", + progress: 75, + }, + { + skillName: "Project Management", + progress: 85, + }, +]; \ No newline at end of file diff --git a/src/pages/Profile.jsx b/src/pages/Profile.jsx index 7ce40f2..f33628d 100644 --- a/src/pages/Profile.jsx +++ b/src/pages/Profile.jsx @@ -1,12 +1,16 @@ import Hero from "../sections/profile/Hero.jsx"; import Experience from "../sections/profile/Experience.jsx"; +import Skills from "../sections/profile/Skills.jsx"; +import Quote from "../sections/profile/Quote.jsx"; const Profile = () => { return (
+ +
) diff --git a/src/sections/profile/Experience.jsx b/src/sections/profile/Experience.jsx index 6ba92e6..6c20fa7 100644 --- a/src/sections/profile/Experience.jsx +++ b/src/sections/profile/Experience.jsx @@ -28,7 +28,7 @@ const Experience = () => { } ${index === experiences.length - 1 ? 'pb-1' : ''}`} onClick={() => toggleExpand(index)} > -
+
{experience.title}
{
- +
diff --git a/src/sections/profile/Hero.jsx b/src/sections/profile/Hero.jsx index 40a6bd3..9c335e8 100644 --- a/src/sections/profile/Hero.jsx +++ b/src/sections/profile/Hero.jsx @@ -1,12 +1,10 @@ -import Quote from "../../components/Quote.jsx"; - const Hero = () => { return (
-
+

Profile @@ -16,12 +14,6 @@ const Hero = () => { You’ve come far! Here you will find my professional experience, and technologies I have worked with.
-

diff --git a/src/sections/profile/Quote.jsx b/src/sections/profile/Quote.jsx new file mode 100644 index 0000000..70017c1 --- /dev/null +++ b/src/sections/profile/Quote.jsx @@ -0,0 +1,15 @@ +import QuoteComponent from "../../components/Quote.jsx"; + +const Quote = () => { + return ( +
+ +
+ ) +} +export default Quote; \ No newline at end of file diff --git a/src/sections/profile/Skills.jsx b/src/sections/profile/Skills.jsx new file mode 100644 index 0000000..ff9104a --- /dev/null +++ b/src/sections/profile/Skills.jsx @@ -0,0 +1,35 @@ +import SecHead from "../../components/SecHead.jsx"; +import ProgressBar from "../../components/ProgressBar.jsx"; +import { personalSkillsData, professionalSkillsData } from '../../data/skills.jsx'; // Adjust the import path as necessary + +const Skills = () => { + return ( +
+ + {personalSkillsData.map((skill, index) => ( +
+
+

{skill.skillName}

+
+
+ +
+
+ ))} + + + {professionalSkillsData.map((skill, index) => ( +
+
+

{skill.skillName}

+
+
+ +
+
+ ))} +
+ ); +}; + +export default Skills; \ No newline at end of file