From ba1be9573ef20d6424ae987257a1c727c47d4b53 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 6 Oct 2026 20:46:31 +0300 Subject: Initial setup for website rewrite --- src/components/BlogItem.astro | 40 ----------- src/components/Head.astro | 29 -------- src/components/Link.astro | 12 ---- src/components/Markdown.astro | 12 ---- src/components/Nav.astro | 47 ------------- src/components/Project.astro | 27 -------- src/components/RadarChart.astro | 132 ------------------------------------ src/components/TerminalBorder.astro | 43 ------------ 8 files changed, 342 deletions(-) delete mode 100644 src/components/BlogItem.astro delete mode 100644 src/components/Head.astro delete mode 100644 src/components/Link.astro delete mode 100644 src/components/Markdown.astro delete mode 100644 src/components/Nav.astro delete mode 100644 src/components/Project.astro delete mode 100644 src/components/RadarChart.astro delete mode 100644 src/components/TerminalBorder.astro (limited to 'src/components') diff --git a/src/components/BlogItem.astro b/src/components/BlogItem.astro deleted file mode 100644 index 8440d85..0000000 --- a/src/components/BlogItem.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import TerminalBorder from "@components/TerminalBorder.astro"; - -function formatDate(date: Date) { - const day = date.getDate(); - const month = date.toLocaleString("default", { month: "long" }); - const year = date.getFullYear(); - return `${month} ${day}, ${year}`; -} - -interface Props { - title: string; - description: string; - date: Date; - href?: string; - header?: string; -} - -const { title, description, date, href, header } = Astro.props; ---- - - - - { - href ? ( - -

- {title} -

-

{description}

-
- ) : ( - <> -

{title}

-

{description}

- - ) - } -
-
diff --git a/src/components/Head.astro b/src/components/Head.astro deleted file mode 100644 index a1a6e35..0000000 --- a/src/components/Head.astro +++ /dev/null @@ -1,29 +0,0 @@ ---- -interface Props { - title: string; - description: string; -} - -const { title, description } = Astro.props; ---- - - - - - - - - - - - - {title} - - - - - - - - - diff --git a/src/components/Link.astro b/src/components/Link.astro deleted file mode 100644 index e8396ec..0000000 --- a/src/components/Link.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -interface Props { - href: string; - newTab?: boolean; -} - -const { href, newTab = true } = Astro.props; ---- - - - - diff --git a/src/components/Markdown.astro b/src/components/Markdown.astro deleted file mode 100644 index 104b57e..0000000 --- a/src/components/Markdown.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -import "@styles/markdown/asides.css"; -import "@styles/markdown/markdown.css"; -import "@styles/markdown/props.css"; -import "@styles/markdown/reset.css"; -import "@styles/markdown/shiki.css"; -import "@styles/markdown/util.css"; ---- - -
- -
diff --git a/src/components/Nav.astro b/src/components/Nav.astro deleted file mode 100644 index da08b32..0000000 --- a/src/components/Nav.astro +++ /dev/null @@ -1,47 +0,0 @@ ---- -interface Props { - path: string; -} - -const { path } = Astro.props; - -const directories = ["skills", "projects", "blogs"]; ---- - - - - diff --git a/src/components/Project.astro b/src/components/Project.astro deleted file mode 100644 index 0b15a68..0000000 --- a/src/components/Project.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -import TerminalBorder from "@components/TerminalBorder.astro"; -import Link from "@components/Link.astro"; - -interface Props { - title: string; - description: string; - href: string; - cd?: string; - dir?: string; -} - -const { title, description, href, cd = title, dir = "cd ~/projects/" } = Astro.props; ---- - -
- - -

{title}

-

{description}

- -
-
- - {dir}{cd} - -
diff --git a/src/components/RadarChart.astro b/src/components/RadarChart.astro deleted file mode 100644 index 0a3d434..0000000 --- a/src/components/RadarChart.astro +++ /dev/null @@ -1,132 +0,0 @@ ---- -import "@styles/terminal.css" - -interface Entry { - name: string; - weight: number; -} - -interface Props { - max: number - data: Entry[]; -} - -const { max, data } = Astro.props - -const chartPadding = 100; -const chartSize = 400; -const chartCenter = chartSize / 2; - -const chartData = data ;// .sort((a, b) => b.weight - a.weight).slice(0, data.length); -const pointPadding = 0; -const rings = [...Array(6).keys()]; - -const getX = (angle: number, value: number) => - Math.cos(angle - Math.PI / 2) * value; -const getY = (angle: number, value: number) => - Math.sin(angle - Math.PI / 2) * value; - -const axes = chartData.map((_, index) => { - const angle = (Math.PI * 2 * index) / chartData.length; - const x = getX(angle, chartSize / 2); - const y = getY(angle, chartSize / 2); - const points = [ - [0, 0], - [x, y], - ] - .map((point) => point[0] + "," + point[1]) - .join(" "); - return { - points: points, - }; -}); - -const properties = chartData.map((item, index) => { - const { name, weight: total } = item; - const clamp = Number(total / (max + pointPadding)); - const angle = (Math.PI * 2 * index) / chartData.length; - const x = getX(angle, (clamp * chartSize) / 2); - const y = getY(angle, (clamp * chartSize) / 2); - return { name: name, total: total, x: x, y: y }; -}); - -const shape = - properties.reduce((items, item, index) => { - const { x, y } = item; - const string = `${index === 0 ? "M" : "L"}${x},${y}`; - return items + string; - }, "") + "z"; - -const strokeColor = "stroke-[var(--alt)]"; -const shapeClass = "stroke-[var(--primary)] fill-[#7ed4fb]/50"; - ---- -
- - - { - rings.map((_, index) => { - return ( - - ); - }) - } - { - axes.map((axis) => { - const { points } = axis; - return ( - - ); - }) - } - - { - properties.map((property, index) => { - const length = 1.1; - const angle = (Math.PI * 2) * index / chartData.length; - const maxX = getX(angle, (length * chartSize) / 2); - const maxY = getY(angle, (length * chartSize) / 2); - let textAngle = (angle * (180 / Math.PI)) - if (90 < textAngle && textAngle < 270) { - textAngle += 180 - } - return ( - - - {property.name} - - - ); - }) - } - - -
diff --git a/src/components/TerminalBorder.astro b/src/components/TerminalBorder.astro deleted file mode 100644 index 4e8bfb3..0000000 --- a/src/components/TerminalBorder.astro +++ /dev/null @@ -1,43 +0,0 @@ ---- -interface Props { - header?: string; - footer?: string; - extra?: string; -} - -const { header = "", footer = "", extra = "m-[-0.1vw]" } = Astro.props; ---- - -
- {header} - {footer} - -
- - -- cgit v1.3.1