From e8b4c315295a0828e11342f4af018ad4978a1081 Mon Sep 17 00:00:00 2001 From: mudkipdev Date: Sun, 1 Dec 2024 18:16:03 -0700 Subject: [PATCH] paths --- src/components/Profile.astro | 22 +++++++++++++++++++++- src/content/blog/welcome.md | 2 +- src/layouts/Page.astro | 14 +++++++------- src/pages/about.astro | 2 +- src/pages/blog/[...slug].astro | 6 ++---- src/pages/index.astro | 2 +- 6 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/components/Profile.astro b/src/components/Profile.astro index 11abc1e..723bbec 100644 --- a/src/components/Profile.astro +++ b/src/components/Profile.astro @@ -1,8 +1,16 @@ --- +interface Props { + path: string; +} + +const { path } = Astro.props; ---
-

mudkip

+
+

mudkip

+

{path}

+

@@ -14,4 +22,16 @@ user-select: none; gap: 1.25em; } + + /* fix all this */ + #profile #text { + margin-top: -1em; + flex-direction: column; + gap: 0; + } + + #profile p { + margin-top: -0.5em; + color: var(--surface-5); + } \ No newline at end of file diff --git a/src/content/blog/welcome.md b/src/content/blog/welcome.md index 9598056..5981c8f 100644 --- a/src/content/blog/welcome.md +++ b/src/content/blog/welcome.md @@ -2,4 +2,4 @@ date: 2024-05-09 title: welcome --- -This page only exists because of a code limitation. \ No newline at end of file +this page only exists because of a code limitation \ No newline at end of file diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro index 908681a..23886e7 100644 --- a/src/layouts/Page.astro +++ b/src/layouts/Page.astro @@ -6,12 +6,14 @@ import "../style.css"; interface Props { title: string; + path?: string; } -const { title } = Astro.props; +const { title, path = "~/" + title.toLowerCase().replaceAll(" ", "-") } = Astro.props; --- + {path} - - ~/{title === "mudkip" ? "" : title} - - + +
- - + +
diff --git a/src/pages/about.astro b/src/pages/about.astro index e2c5ecc..55dc467 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -6,7 +6,7 @@ import Page from "@layouts/Page.astro";