diff --git a/.prettierignore b/.prettierignore index bdde09d..11ab1cd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ -dist/* -node_modules/* \ No newline at end of file +dist/** +node_modules/** \ No newline at end of file diff --git a/astro.config.ts b/astro.config.ts index 2c5a452..640af33 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -17,6 +17,10 @@ import prefetch from "@astrojs/prefetch"; import robotsTxt from "astro-robots-txt"; import minify from "./astro-integrations/minify"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +const __dirname = dirname(fileURLToPath(import.meta.url)); + // https://astro.build/config export default defineConfig({ site: "https://xhyrom.dev/", @@ -40,4 +44,15 @@ export default defineConfig({ }), minify(), ], + vite: { + resolve: { + alias: { + "~": resolve(__dirname, "./src"), + "@pages": resolve(__dirname, "./src/pages"), + "@assets": resolve(__dirname, "./src/assets"), + "@layouts": resolve(__dirname, "./src/layouts"), + "@components": resolve(__dirname, "./src/components"), + }, + }, + }, }); diff --git a/src/components/widgets/Head.astro b/src/components/widgets/Head.astro deleted file mode 100644 index 9a6d69d..0000000 --- a/src/components/widgets/Head.astro +++ /dev/null @@ -1,39 +0,0 @@ ---- -const { schemaOrg } = Astro.props; ---- - - - - - -xHyroM - - - - - - - - - - - - - - - - - - - - - - -{ - schemaOrg && ( - diff --git a/src/components/widgets/Fireworks.astro b/src/components/widgets/decorations/Fireworks.astro similarity index 100% rename from src/components/widgets/Fireworks.astro rename to src/components/widgets/decorations/Fireworks.astro diff --git a/src/components/widgets/Snow.astro b/src/components/widgets/decorations/Snow.astro similarity index 100% rename from src/components/widgets/Snow.astro rename to src/components/widgets/decorations/Snow.astro diff --git a/src/components/widgets/docs/Sidebar.astro b/src/components/widgets/docs/Sidebar.astro index 6ed196e..787c9ed 100644 --- a/src/components/widgets/docs/Sidebar.astro +++ b/src/components/widgets/docs/Sidebar.astro @@ -3,58 +3,58 @@ import type { MarkdownInstance } from "astro"; import rightArrow from "../../../../public/icons/chevrons-right.svg"; -const files = await Astro.glob("../../../pages/docs/items/**/*.md"); +const files = await Astro.glob("@pages/docs/items/**/*.md"); const sections = files.reduce((acc, file) => { - const category: string = file.url!.split("/")[3]; + const category: string = file.url!.split("/")[3]; - if (!acc[category]) acc[category] = []; + if (!acc[category]) acc[category] = []; - acc[category].push(file); + acc[category].push(file); - return acc; + return acc; }, {} as Record>[]>); const categories = Object.keys(sections); --- diff --git a/src/components/widgets/index/Hero.astro b/src/components/widgets/index/Hero.astro deleted file mode 100644 index 4f40583..0000000 --- a/src/components/widgets/index/Hero.astro +++ /dev/null @@ -1,25 +0,0 @@ ---- -import Socials from "./Socials.astro"; -import { Picture } from "@astrojs/image/components"; -import logo from "../../../assets/logo.png"; -import Name from "./Name.astro"; ---- - -
-
- -
-
- - -
-
diff --git a/src/components/widgets/index/Name.astro b/src/components/widgets/index/Name.astro deleted file mode 100644 index 6bf8961..0000000 --- a/src/components/widgets/index/Name.astro +++ /dev/null @@ -1,3 +0,0 @@ -
-

xHyroM

-
diff --git a/src/components/widgets/index/Socials.astro b/src/components/widgets/index/Socials.astro deleted file mode 100644 index 0a05686..0000000 --- a/src/components/widgets/index/Socials.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -const socials = [ - { - name: "GitHub", - link: "https://github.com/xHyroM/", - icon: "github.svg", - }, - { - name: "Discord.svg", - link: "https://s.xhyrom.dev/discord", - icon: "discord.svg", - }, - { - name: "Twitter", - link: "https://twitter.com/hyrousek/", - icon: "twitter.svg", - }, - { - name: "Instagram", - link: "https://www.instagram.com/hyro.dev/", - icon: "instagram.svg", - }, - { - name: "ko-fi", - link: "https://ko-fi.com/xhyrom", - icon: "ko-fi.png", - }, -]; ---- - - diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..b89c528 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,220 @@ +export const socials = [ + { + name: "GitHub", + link: "https://github.com/xHyroM/", + icon: "github.svg", + }, + { + name: "Discord.svg", + link: "https://s.xhyrom.dev/discord", + icon: "discord.svg", + }, + { + name: "Twitter", + link: "https://twitter.com/hyrousek/", + icon: "twitter.svg", + }, + { + name: "Instagram", + link: "https://www.instagram.com/hyro.dev/", + icon: "instagram.svg", + }, + { + name: "ko-fi", + link: "https://ko-fi.com/xhyrom", + icon: "ko-fi.png", + }, +] as { + name: string; + link: string; + icon: string; +}[]; + +export const skills = [ + { + name: "TypeScript", + icon: "logos:typescript-icon", + }, + { + name: "JavaScript", + icon: "logos:javascript", + }, + { + name: "Bun", + icon: "logos:bun", + }, + { + name: "NodeJS", + icon: "logos:nodejs-icon-alt", + }, + { + name: "Deno", + icon: "logos:deno", + }, + { + name: "React", + icon: "logos:react", + }, + { + name: "NextJS", + icon: "file-icons:nextjs", + }, + { + name: "Astro", + icon: "vscode-icons:file-type-astro", + }, + { + name: "TailwindCSS", + icon: "logos:tailwindcss-icon", + }, + { + name: "Java", + icon: "logos:java", + }, + { + name: "Kotlin", + icon: "logos:kotlin-icon", + }, + { + name: "Rust", + icon: "vscode-icons:file-type-rust", + }, + { + name: "Go", + icon: "vscode-icons:file-type-go-aqua", + }, + { + name: "MySQL", + icon: "logos:mysql-icon", + }, + { + name: "MongoDB", + icon: "devicon:mongodb", + }, + { + name: "Redis", + icon: "devicon:redis", + }, + { + name: "Git", + icon: "logos:git-icon", + }, + { + name: "GitHub", + icon: "mdi:github", + }, + { + name: "GitHub Actions", + icon: "devicon:githubactions", + }, + { + name: "Cloudflare", + icon: "logos:cloudflare", + }, + { + name: "Cloudflare Pages", + icon: "simple-icons:cloudflarepages", + color: "#f48120", + }, + { + name: "Cloudflare Workers", + icon: "logos:cloudflare-workers-icon", + }, + { + name: "Visual Studio Code", + icon: "logos:visual-studio-code", + }, + { + name: "IntelliJ IDEA", + icon: "logos:intellij-idea", + }, +] as { + name: string; + icon: string; +}[]; + +export const projects = [ + { + name: "HyLib", + link: "https://github.com/xHyroM/HyLib", + desc: "Source code for HyLib, a paper plugin and powerful library.", + }, + { + name: "HyChat", + link: "https://github.com/xHyroM/HyChat", + desc: "Source code for HyChat, a paper plugin.", + }, + { + name: "HyX", + link: "https://github.com/xHyroM/HyX", + desc: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque, quaerat.", + }, + { + name: "Mashe", + link: "https://github.com/xHyroM/mashe", + desc: "Simple, fast, and easy to use Event Handling for Java.", + }, + { + name: "Mumblum", + link: "https://github.com/xHyroM/mumblum", + desc: "Mumblum is a simple, modern discord bot in JDA.", + }, + { + name: "setup-bun", + link: "https://github.com/oven-sh/setup-bun", + desc: "Set up your GitHub Actions workflow with a specific version of Bun.", + }, + { + name: "Roles Bot", + link: "https://github.com/xHyroM/roles-bot", + desc: 'Discord bot for "button" roles, using Cloudflare Workers.', + }, + { + name: "Bun Discord Bot", + link: "https://github.com/xHyroM/bun-discord-bot", + desc: "Official serverless discord bot for bun discord server.", + }, + { + name: "hykord", + link: "https://github.com/xHyroM/hykord", + desc: "My @discord client modification.", + }, + { + name: "frog", + link: "https://github.com/xHyroM/frog", + desc: "Frog is an extremely simple language based on the monkey language.", + }, + { + name: "lsx", + link: "https://github.com/xHyroM/lsx", + desc: "Lsx is a simple, fast, and easy to use ls implementation in Rust.", + }, + { + name: "Slovensko v Grafoch", + link: "https://github.com/xHyroM/slovensko-v-grafoch", + desc: "Slovensko v Grafoch is a website that shows data about Slovakia in graphs.", + }, + { + name: "Peddler's Pocket", + link: "https://github.com/xHyroM/peddlerspocket", + desc: "/sell command that allows you to put things into GUI and then sell them by closing", + }, + { + name: "Peak Pursuit", + link: "https://github.com/xHyroM/peakpursuit", + desc: "PeakPursuit is a plugin for King of the Hill events that adds a competitive edge to your server gameplay. Conquer the hill and claim the crown!", + }, + { + name: "Spawner Genz", + link: "https://github.com/xHyroM/spawnergenz", + desc: "Spawner Genz is a plugin that modifies the functionality of spawners so that they don't spawn entities, but instead store drops in a virtual storag in which you can then sell or move everything to your inventory.", + }, +] as { + name: string; + link: string; + desc: string; + stats?: { + forks: number; + stars: number; + }; +}[]; diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 1750a1d..deb09ba 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,31 +1,49 @@ --- -import Snow from "../components/widgets/Snow.astro"; -import Fireworks from "../components/widgets/Fireworks.astro"; -import DefaultHead from "../components/widgets/Head.astro"; +import SEOEmbed from "@components/widgets/SEOEmbed.astro"; -const date = new Date(); - -const fireworks = - (date.getMonth() === 11 && date.getDate() === 31) || - (date.getMonth() === 0 && date.getDate() <= 3); -const snow = - (date.getMonth() === 11 && date.getDate() === 10) || - (date.getMonth() === 0 && date.getDate() <= 3); - -const { head } = Astro.props; -const Head = head || DefaultHead; +const { title, description, keywords, schemaOrg } = { + title: "xHyroM", + description: "I'm Hyro :) o/", + keywords: "xhyrom developer dev hyro hyrousek", + ...Astro.props, +}; --- - + + + + + {title} + + + + + + + + + + + { + schemaOrg && ( +