import * as React from "react"; import Layout from "../layouts/default"; import PropTypes from "prop-types"; import * as styles from "./index.module.scss"; import { Trans, Link } from "gatsby-plugin-react-i18next"; import { graphql } from "gatsby"; import { StaticImage } from "gatsby-plugin-image"; import anime from "animejs"; import { ArrowRight, AtSign, Camera, Github, Mail, MapPin, Phone, } from "lucide-react"; import { useTranslation } from "react-i18next"; import { useMediaQuery } from "@react-hook/media-query"; //import * as particleConfig from "./index.particles.json"; export const query = graphql` query GetMetaAndProjects($language: String) { site { siteMetadata { contactEmail contactPhone mapsLink contactTwitter contactGitHub contactMastodon contactMastodonHref } } locales: allLocale(filter: { language: { eq: $language } }) { edges { node { ns data language } } } } `; /*const loadTsParticles = async () => { import("tsparticles").then(({ tsParticles }) => { tsParticles.load("particle-container", particleConfig).then(() => { anime({ targets: ["#particle-container > canvas"], opacity: [0, 1], duration: 10000, easing: "easeInOutCirc", }); }); }); };*/ const IndexPage = (props) => { const { t } = useTranslation(); const reduceMotion = useMediaQuery("(prefers-reduced-motion: reduce)"); React.useEffect(() => { if (typeof window === "undefined") return; if (reduceMotion) return; anime({ targets: [ "." + styles.profileCard + " > span", "." + styles.profileCard + " a", ], opacity: [0, 1], translateX: [100, 0], duration: 250, delay: anime.stagger(20), easing: "easeInOutCirc", }); anime({ targets: ["." + styles.profileImageDummy], translateX: [0, -3], translateY: [0, 3], duration: 250, easing: "easeInOutCirc", }); anime({ targets: ["." + styles.profileImage], translateX: [0, 4], translateY: [0, -4], duration: 250, easing: "easeInOutCirc", }); /*if (typeof window !== "undefined") // eslint-disable-next-line no-undef window.setTimeout(loadTsParticles, 1000);*/ }, [reduceMotion]); let meta = props.data.site.siteMetadata; return (
home.hello Kevin Kandlbinder home.me{" "} home.webDeveloper .
{meta.contactPhone} {meta.contactEmail} home.myLocation {meta.contactMastodon} {meta.contactGitHub}
{t("home.explore")} {" "} {t("home.myProjects")}
{t("home.discover")} {" "} {t("home.mySocials")}
{t("home.learn")} {" "} {t("home.moreAboutMe")}
home.imageCredit
); }; IndexPage.propTypes = { data: PropTypes.object.isRequired, }; export default IndexPage;