diff --git a/src/components/Header.astro b/src/components/Header.astro deleted file mode 100644 index 39230b0..0000000 --- a/src/components/Header.astro +++ /dev/null @@ -1,68 +0,0 @@ ---- -const { pathname } = Astro.url; -const currentPath = - pathname.endsWith("/") && pathname.length > 1 - ? pathname.slice(0, -1) - : pathname; -const navItems = [ - { href: "/", label: "About" }, - { href: "/now", label: "Now" }, - { href: "/writing", label: "Writing" }, -]; ---- - -
-

dnsc

- -
- - diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro new file mode 100644 index 0000000..6f17ad3 --- /dev/null +++ b/src/components/Sidebar.astro @@ -0,0 +1,53 @@ +--- +const { pathname } = Astro.url; + +const year = new Date().getFullYear(); +const currentPath = + pathname.endsWith("/") && pathname.length > 1 + ? pathname.slice(0, -1) + : pathname; +const navItems = [ + { href: "/", label: "About" }, + { href: "/now", label: "Now" }, + { href: "/writing", label: "Writing" }, +]; +--- + + + + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 4fcd45e..d342ff5 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,4 +1,6 @@ --- +import Sidebar from "../components/Sidebar.astro"; + const { title } = Astro.props; --- @@ -15,8 +17,11 @@ const { title } = Astro.props; {title} - - + + +
+ +
@@ -50,4 +55,11 @@ const { title } = Astro.props; --container-md: 600px; --container-sm: 480px; } + + [data-main-layout] { + margin-top: 3rem; + padding: 0.5rem; + padding-left: 0; + padding-right: 1rem; + } diff --git a/src/pages/index.astro b/src/pages/index.astro index ef71118..749072c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,10 +1,9 @@ --- import Layout from "../layouts/Layout.astro"; -import Header from "../components/Header.astro"; --- -
+

Welcome!