import {type NextPage} from "next"; import Head from "next/head"; import React, {useEffect} from "react"; import ItemCard from "../components/ItemCard"; import {getPlaiceholder} from "plaiceholder"; import {useBreakpointValue} from "../utils/helpers"; import type {Project} from "../utils/types"; import Link from "next/link"; type ProjectWithBlur = Project & { bannerBlur: string }; type HomeStaticProps = { projects: ProjectWithBlur[]; } export async function getStaticProps() { const projects: Project[] = [ { title: "Portal", banner: "/portal/banner.jpeg", location: "/portal", longDescription: "An advanced membership & event management system for my university's premier computer science organization.", shortDescription: "Advanced membership & event management system for students", links: [ { icon: "github", location: "https://github.com/UTSA-ACM/Portal" }, { icon: "external", location: "https://portal.acmutsa.org/" } ] }, { title: "Phototag", banner: "/phototag.png", location: "/phototag", longDescription: `Using Google's Vision API and supporting metadata formats on Windows, Phototag makes it easy to quickly add rich, descriptive tags to your photos, saving you time and effort.`, shortDescription: "Effortlessly add rich & descriptive tags to your photos with Phototag.", links: [ { icon: "github", location: "https://github.com/Xevion/phototag" }, { icon: "external", location: "https://phototag.xevion.dev" } ] }, { title: "Paths", banner: "/paths.png", location: "/paths", shortDescription: "Discover the power of graph traversal algorithms with my interactive application.", longDescription: `Discover the power of graph traversal algorithms with my interactive Unity application! Easily generate and edit graphs, create mazes, and experiment with different algorithm configurations to find the most efficient path.`, links: [ { icon: "github", location: "https://github.com/Xevion/Paths", } ] } ]; return { props: { projects: await Promise.all(projects.map(async project => { const {base64} = await getPlaiceholder(project.banner, {size: 16}); return { ...project, bannerBlur: base64 }; })) } } } const buttons = [ {text: "GitHub", href: "https://github.com/Xevion"}, {text: "Contact", href: "/contact"} ] const Home: NextPage = ({projects}: HomeStaticProps) => { const useLong = useBreakpointValue("sm", true, false); // use-tailwind-breakpoint useEffect(() => { typeof window !== "undefined" ? window.dispatchEvent(new Event("resize")) : null; }, []); return ( <> Xevion.dev
WIP
Hi. I'm Ryan Walters.
Full Stack Software Developer
{buttons.map(({text, href}) =>
{text}
)}
{ projects.map((project, index) => ) }
); }; export default Home;