From dd5e066efd919471ec9a9e8b459d2b6eb3e17b9a Mon Sep 17 00:00:00 2001 From: Nicholas Krebs Date: Sun, 18 Feb 2024 13:54:51 +0100 Subject: [PATCH 1/6] remove percentage in skills --- src/components/skills/Progress.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/skills/Progress.tsx b/src/components/skills/Progress.tsx index 41e41f4..295a4fa 100644 --- a/src/components/skills/Progress.tsx +++ b/src/components/skills/Progress.tsx @@ -14,9 +14,6 @@ export default function Progress({text, icon, progress}: Props) { - - {progress}% - ); From 4ea3f2458f59a64172d298970b286a0a9bdf7810 Mon Sep 17 00:00:00 2001 From: Nicholas Krebs Date: Sun, 18 Feb 2024 14:24:50 +0100 Subject: [PATCH 2/6] fix: header color bug --- src/components/common/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index 26fb825..dd0c4f1 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -22,7 +22,7 @@ type Props = { export default function Header({toggleTheme, checked}: Props) { const {t} = useTranslation("components"); return ( - + From 760148a7843aef9a6ea74da8e7dfdb34a31eff7e Mon Sep 17 00:00:00 2001 From: Nicholas Krebs Date: Sun, 18 Feb 2024 15:07:17 +0100 Subject: [PATCH 3/6] add nav scrolling --- package-lock.json | 19 +++++++++++ package.json | 1 + src/components/common/Header.tsx | 54 ++++++++++++++++++++++++-------- 3 files changed, 61 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a15972..2d4263c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "react-icons": "^4.4.0", "react-router-dom": "^6.12.0", "react-scripts": "^5.0.1", + "react-scroll": "^1.9.0", "sass": "^1.54.9", "typescript": "^4.8.3" }, @@ -11014,6 +11015,11 @@ "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" + }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -13740,6 +13746,19 @@ } } }, + "node_modules/react-scroll": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/react-scroll/-/react-scroll-1.9.0.tgz", + "integrity": "sha512-mamNcaX9Ng+JeSbBu97nWwRhYvL2oba+xR2GxvyXsbDeGP+gkYIKZ+aDMMj/n20TbV9SCWm/H7nyuNTSiXA6yA==", + "dependencies": { + "lodash.throttle": "^4.1.1", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-side-effect": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", diff --git a/package.json b/package.json index 36e458c..cda51f0 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "react-icons": "^4.4.0", "react-router-dom": "^6.12.0", "react-scripts": "^5.0.1", + "react-scroll": "^1.9.0", "sass": "^1.54.9", "typescript": "^4.8.3" }, diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index dd0c4f1..65f831a 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -5,14 +5,16 @@ import { LanguageSwitcher } from "./LanguageSwitcher"; import { useTranslation } from "react-i18next"; import { Image } from "./Text"; import { Sections } from "../../type/page"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import { Link } from "react-scroll"; const sections = [ - {key: "welcome", href: `#${Sections.Welcome}`}, - {key: "about", href: `#${Sections.About}`}, - {key: "experience", href: `#${Sections.Experience}`}, - {key: "skills", href: `#${Sections.Skills}`}, - {key: "stats", href: `#${Sections.Stats}`}, - {key: "social", href: `#${Sections.Social}`}, + {key: Sections.About}, + {key: Sections.Experience}, + {key: Sections.Skills}, + {key: Sections.Stats}, + {key: Sections.Social}, ]; type Props = { @@ -25,11 +27,13 @@ export default function Header({toggleTheme, checked}: Props) { - - logo - - {t("header.title")} - + + + logo + + {t("header.title")} + + @@ -38,9 +42,9 @@ export default function Header({toggleTheme, checked}: Props) {