diff --git a/src/components/landing/nav-content/my-work.tsx b/src/components/landing/nav-content/my-work.tsx index 9431b39..f12b9b5 100644 --- a/src/components/landing/nav-content/my-work.tsx +++ b/src/components/landing/nav-content/my-work.tsx @@ -1,20 +1,110 @@ +"use client"; + +import { MagicCard } from "@/components/ui/magic-card"; +import { cn } from "@/lib/utils"; +import moment, { Moment } from "moment"; +import { useTheme } from "next-themes"; +import { UseThemeProps } from "next-themes/dist/types"; +import Link from "next/link"; import { ReactElement } from "react"; type Project = { name: string; - git: string; - content: ReactElement; + link?: string | undefined; + previewContent: ReactElement; + startDate: Moment; + endDate?: Moment | undefined; }; const projects: Project[] = [ { name: "This Website!", - git: "https://github.com/Rainnny7/rainnny.club", - content:
This website
, + link: "https://github.com/Rainnny7/rainnny.club", + previewContent:
This website!
, + startDate: moment([2024, 7, 29]), + }, + { + name: "WildNetwork", + link: "https://discord.gg/WildPrison", + previewContent: ( +

+ WildNetwork is a Minecraft server that contains multiple gamemodes, one + of which is Prison, which is the most popular. I first joined the server + as a Developer where I would work behind the scenes to create new + features, now I'm currently working as a System Administrator. +

+ ), + startDate: moment([2020, 7, 1]), + }, + { + name: "Lucity", + link: "https://youtube.com/@iamLucid", + previewContent: ( +

+ Lucity was a minigame network for the game Minecraft, and was owned by + the YouTuber iamLucid. When I worked at Lucity, I was the development + lead, I focused mainly on infrastructure, databases, and monitoring + systems. A few things that I have made - a dynamically managed server + system, proxy rotation via the TCPShield API, and an API that can + interact with the entire network from a normal Java app. +

+ ), + startDate: moment([2020, 7, 1]), + endDate: moment([2022, 10, 30]), + }, + { + name: "Rainplex", + previewContent: ( +

+ Rainplex was a remake of the once popular Minecraft server, Mineplex. + Rainplex initially came to light using the plugin, Skript where it just + contained a Hub. After some time, the entirety of the network was + re-coded in the Java programming from the ground up. Rainplex went + through numerous re-codes over the time it was active, however I have + since abandoned development due to lack of free time. +

+ ), + startDate: moment([2018, 8, 1]), + endDate: moment([2021, 6, 11]), + }, + { + name: "Arcane Client", + link: "https://github.com/ArcaneClientNET", + previewContent: ( +

+ Arcane is the all-in-one Minecraft mod pack. This client was built to be + similar to LunarClient for portfolio and experience sake. I have since + abandoned development due to lack of free time. +

+ ), + startDate: moment([2021, 6, 1]), + endDate: moment([2021, 10, 1]), }, ]; -const MyWork = (): ReactElement => ( -
MY WORK HELLO
-); +const MyWork = (): ReactElement => { + const { theme }: UseThemeProps = useTheme(); + return ( +
+ {projects.map((project, index) => ( + + +

+ {project.name} +

+ + {/* Years Active */} +

+ {project.startDate.format("MMM YYYY")} + {project.endDate && ` - ${project.endDate.format("MMM YYYY")}`} +

+
+ + ))} +
+ ); +}; export default MyWork; diff --git a/src/components/ui/magic-card.tsx b/src/components/ui/magic-card.tsx new file mode 100644 index 0000000..4177af6 --- /dev/null +++ b/src/components/ui/magic-card.tsx @@ -0,0 +1,64 @@ +"use client"; + +import React, { useCallback, useEffect } from "react"; +import { motion, useMotionTemplate, useMotionValue } from "framer-motion"; + +import { cn } from "@/lib/utils"; + +export interface MagicCardProps extends React.HTMLAttributes { + gradientSize?: number; + gradientColor?: string; + gradientOpacity?: number; +} + +export function MagicCard({ + children, + className, + gradientSize = 200, + gradientColor = "#262626", + gradientOpacity = 0.8, +}: MagicCardProps) { + const mouseX = useMotionValue(-gradientSize); + const mouseY = useMotionValue(-gradientSize); + + const handleMouseMove = useCallback( + (e: React.MouseEvent) => { + const { left, top } = e.currentTarget.getBoundingClientRect(); + mouseX.set(e.clientX - left); + mouseY.set(e.clientY - top); + }, + [mouseX, mouseY], + ); + + const handleMouseLeave = useCallback(() => { + mouseX.set(-gradientSize); + mouseY.set(-gradientSize); + }, [mouseX, mouseY, gradientSize]); + + useEffect(() => { + mouseX.set(-gradientSize); + mouseY.set(-gradientSize); + }, [mouseX, mouseY, gradientSize]); + + return ( +
+
{children}
+ +
+ ); +}