import type { NextPage } from "next"; import { useEffect } from "react"; import Color from "color"; import Layout from "../components/Blog/Layout"; import styles from "../styles/Blog/AboutMe.module.scss"; import skills, { AdditionalSkill, Skill, SkillCard } from "../data/skills"; import achievements from "../data/achievements"; const Badge: NextPage<{ additional: AdditionalSkill }> = ({ additional }) => { return
{additional.icon || null}{additional.name}
; }; const SkillBar: NextPage<{ skill: Skill }> = ({ skill }) => { return
{skill.icon || null}
{skill.name}
; }; const SkillCard: NextPage<{ card: SkillCard }> = ({ card }) => { const cardStyle = { background: card.colors?.background, "--ch-color": card.colors?.heading, "--bar-color": card.colors?.bars, color: undefined, } as React.CSSProperties; try { cardStyle.color = Color(cardStyle.background).isDark() ? "#ddd" : "#222"; } catch {} return

{card.title}

{card.skillBars.sort((bar1, bar2) => bar2.pct - bar1.pct).map((skill, i) => )}
{card.additional && card.additional.length > 0 ?
{card.additional?.map((skill, i) => )}
: null}
; }; const Me: NextPage = () => { useEffect(() => { const handleScrollAnimation = () => { document.querySelectorAll(".vpAnimated").forEach((element) => { const rect = element.getBoundingClientRect(); const inVp = ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth) ); if (inVp) (element as HTMLElement).style.animationPlayState = "running"; else (element as HTMLElement).style.animationPlayState = "paused"; }); }; handleScrollAnimation(); // First time so we don't _need_ scrolling window.addEventListener("scroll", handleScrollAnimation); }, []); const age = new Date().getFullYear() - 1998 - (new Date().getMonth() < 10 ? 1 : 0); return

This is me.

Hi! My name is Daniel and I'm an automation engineer from Germany.

I'm currently {age} years old and studying Information Systems Engineering at the TU Dresden.

Achievements

{achievements().map((achievement, i) =>
{achievement.icon}{achievement.description}
)}

Skills

{skills().cards.map((card, i) => )}
; }; export default Me;