From b4cf4e88bc1ef65493e833e3047ea40aa4d1eb6d Mon Sep 17 00:00:00 2001 From: June Date: Thu, 13 Nov 2025 22:12:26 +1300 Subject: [PATCH] Refactoring sidebar and adding footer --- web/src/components/footer.astro | 29 +++++++++++++++++++++++++++ web/src/components/index/navbar.astro | 29 ++++++++++++++++++++++++--- web/src/components/sidebar.astro | 17 +++++++++------- web/src/layout/Base.astro | 1 - web/src/pages/index.astro | 3 +-- web/src/styles/global.css | 2 +- 6 files changed, 67 insertions(+), 14 deletions(-) create mode 100644 web/src/components/footer.astro diff --git a/web/src/components/footer.astro b/web/src/components/footer.astro new file mode 100644 index 0000000..717b916 --- /dev/null +++ b/web/src/components/footer.astro @@ -0,0 +1,29 @@ +--- +const links = [ + { + text: "src", + href: "https://github.com/breadone/breadone.net" + }, + { + text: "bsky", + href: "https://bsky.app/profile/breadone.xyz" + }, + { + text: "email", + href: "mailto:contact@breadone.net" + }, +] +--- + + \ No newline at end of file diff --git a/web/src/components/index/navbar.astro b/web/src/components/index/navbar.astro index c41dcee..7a8cd4b 100644 --- a/web/src/components/index/navbar.astro +++ b/web/src/components/index/navbar.astro @@ -1,12 +1,35 @@ +--- +const links = [ + { + txt: 'now', + lnk: '/now' + }, + { + txt: 'posts', + lnk: '/posts' + }, + { + txt: 'photos', + lnk: '/photos' + }, +] +--- +
- now + { + links.map(l => ( + {l.txt} + )).join() + } + +
\ No newline at end of file diff --git a/web/src/components/sidebar.astro b/web/src/components/sidebar.astro index 9319049..8f13d35 100644 --- a/web/src/components/sidebar.astro +++ b/web/src/components/sidebar.astro @@ -1,12 +1,15 @@ --- import Navbar from "src/components/index/navbar.astro" +import Footer from "./footer.astro" --- -
-
-

breadone dot net

- -
- -
+
+

breadone dot net

+ + +
+ + + +
\ No newline at end of file diff --git a/web/src/layout/Base.astro b/web/src/layout/Base.astro index 1cb7b78..5cb87d7 100644 --- a/web/src/layout/Base.astro +++ b/web/src/layout/Base.astro @@ -12,6 +12,5 @@ import BaseHead from "./BaseHead.astro"
- \ No newline at end of file diff --git a/web/src/pages/index.astro b/web/src/pages/index.astro index c82bf81..fad0762 100644 --- a/web/src/pages/index.astro +++ b/web/src/pages/index.astro @@ -5,10 +5,9 @@ import Sidebar from "src/components/sidebar.astro"
- -
+
content
diff --git a/web/src/styles/global.css b/web/src/styles/global.css index 2f3b995..f60277c 100644 --- a/web/src/styles/global.css +++ b/web/src/styles/global.css @@ -16,7 +16,7 @@ html body { @apply font-[Barnum]; - @apply w-[68%] mx-auto mt-14 h-full; + @apply w-[68%] mx-auto h-full; @apply bg-(--bg-light); }