diff --git a/src/components/Art.tsx b/src/components/Art.tsx deleted file mode 100644 index b429b2f..0000000 --- a/src/components/Art.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import {Component, createSignal, onMount} from "solid-js"; - -interface AsciiArtComponentProps { - imagePath: string; - maxWidth?: number; - maxHeight?: number; -} - -const AsciiArtComponent: Component = (props) => { - const [asciiArt, setAsciiArt] = createSignal(""); - - onMount(() => { - const img = new Image(); - img.src = props.imagePath; - img.onload = () => { - setAsciiArt(imageToAscii(img, props.maxWidth ?? 500, props.maxHeight ?? 1000)); - }; - }); - - const imageToAscii = (img: HTMLImageElement, maxWidth: number, maxHeight: number) => { - const chars = ["@", "#", "S", "%", "?", "*", "+", ";", ":", ",", "."]; - const canvas = document.createElement("canvas"); - const width = Math.min(img.width, maxWidth); - const height = Math.min(img.height, maxHeight); - canvas.width = width; - canvas.height = height; - const ctx = canvas.getContext("2d")!; - ctx.drawImage(img, 0, 0, width, height); - const data = ctx.getImageData(0, 0, width, height).data; - let art = ""; - const saturation = 1; - for (let y = 0; y < height; y++) { - for (let x = 0; x < width; x++) { - const i = (y * width + x) * 4; - const r = Math.min(255, data[i] * saturation); - const g = Math.min(255, data[i + 1] * saturation); - const b = Math.min(255, data[i + 2] * saturation); - const a = data[i + 3]; - if (a === 0) { - art += " "; - } else { - art += chars[Math.floor(((r + g + b) / 3 / 255) * (chars.length - 1))]; - } - } - art += "\n"; - } - return art; - }; - - return ( -
-
{asciiArt()}
-
- ); -}; - -export default AsciiArtComponent; diff --git a/src/components/Projects.tsx b/src/components/Projects.tsx index 41b7cc5..53ced6b 100644 --- a/src/components/Projects.tsx +++ b/src/components/Projects.tsx @@ -1,34 +1,57 @@ +interface Project { + title: string; + emoji: string; + description: string; + image: string; + link?: string; + linkText?: string; +} + +const projects: Project[] = [ + { + title: "aster", + emoji: "⭐", + description: "a much more easy to use and painless alternative to the default youtube studio.", + image: "/aster.png", + linkText: "wip", + }, + { + title: "orchid", + emoji: "🌺", + description: "a meme and pfp editor packed with features, built to run on low end devices.", + image: "/orchid.png", + link: "https://orchid.rex.wf", + linkText: "visit beta!", + }, +]; + export default function Projects() { return ( -
-
-
- Aster project preview -
-
-

⭐ aster

- - wip - +
+ {projects.map((project) => ( +
+
+
+ {`${project.title}
-

a much more easy to use and painless alternative to the default youtube studio.

-
-
-
-
-
- Orchid project preview -
-
-

🌺 orchid

- - visit beta! - +
+
+

+ {project.emoji} {project.title} +

+ {project.link ? ( + + {project.linkText} + + ) : ( + {project.linkText} + )} +
+

{project.description}

-

a meme and pfp editor packed with features, built to run on low end devices.

-
+ ))}
); } diff --git a/src/components/Team.tsx b/src/components/Team.tsx index a2f2726..7c35740 100644 --- a/src/components/Team.tsx +++ b/src/components/Team.tsx @@ -1,12 +1,30 @@ +interface TeamMember { + name: string; + url: string; + avatar: string; +} + +const team: TeamMember[] = [ + { + name: "namish", + url: "https://namishh.me", + avatar: "https://sakura.rex.wf/linear/namishh", + }, + { + name: "rex", + url: "https://rex.wf", + avatar: "https://sakura.rex.wf/linear/rexdotsh", + }, +]; + export default function Team() { return (
- - namish - - - rex - + {team.map((member) => ( + + {member.name.toLowerCase()} + + ))}
); }