diff --git a/app/(aspects)/layout.tsx b/app/(aspects)/layout.tsx new file mode 100644 index 00000000..fb7a040c --- /dev/null +++ b/app/(aspects)/layout.tsx @@ -0,0 +1,20 @@ +import styles from "./styles.module.css"; +import { Sidebar } from "@/components/sidebar"; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( +
+
+
+ +
+
+
+ + 🔙 Homepage + + {children} +
+
+ ); +} diff --git a/app/(aspects)/styles.module.css b/app/(aspects)/styles.module.css new file mode 100644 index 00000000..1b3d1e2a --- /dev/null +++ b/app/(aspects)/styles.module.css @@ -0,0 +1,42 @@ +/* centered content with responsive sidebar */ +.aspect-wrapper { + display: flex; + justify-content: center; + max-width: 960px; + margin: 40px auto 80px auto; +} + +.sidebar-floater { + position: absolute; + justify-content: center; + width: calc(30%); + left: 0; +} +.sidebar { + width: 240px; + font-size: 16px; + margin: 28px auto 0 auto; +} + +.content { + max-width: 680px; + margin: 0 auto 0 auto; +} +.home-link { + font-size: 26px; +} +.content a { + text-decoration: underline; +} + +/* replace sidebar with home link on narrow screen */ +@media (min-width: 1281px) { + .home-link { + display: none; + } +} +@media (max-width: 1280px) { + .sidebar { + display: none; + } +} diff --git a/app/globals.css b/app/globals.css index b15864b2..9067c496 100644 --- a/app/globals.css +++ b/app/globals.css @@ -94,45 +94,3 @@ a:active { a:visited { color: var(--color-chocolate); } - -/* centered content with responsive sidebar */ -body { - display: flex; - justify-content: center; - max-width: 960px; - margin: 40px auto 80px auto; - #sidebar { - position: absolute; - justify-content: center; - width: calc(30%); - left: 0; - div { - width: 240px; - font-size: 16px; - margin: 28px auto 0 auto; - } - } - #content { - max-width: 680px; - margin: 0 auto 0 auto; - .home-link { - font-size: 26px; - } - a { - text-decoration: underline; - } - } -} -/* replace sidebar with home link on narrow screen */ -@media (min-width: 1281px) { - #content { - .home-link { - display: none; - } - } -} -@media (max-width: 1280px) { - #sidebar { - display: none; - } -} diff --git a/app/layout.tsx b/app/layout.tsx index 83813727..4aec9ad7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,22 +1,9 @@ import "./globals.css"; -import { Sidebar } from "@/components/sidebar"; export default function Layout({ children }: { children: React.ReactNode }) { return ( - - -
- - 🔙 Homepage - -
{children}
-
- + {children} ); } diff --git a/app/page.tsx b/app/page.tsx index 33820f90..97e9b903 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,3 +1,5 @@ +import { Sidebar } from "@/components/sidebar"; + export const metadata = { title: "Victor's Website", description: "on the independent web", @@ -10,5 +12,5 @@ export const metadata = { }; export default function Page() { - return
; + return ; }