diff --git a/client/src/App.css b/client/src/App.css index 1d2bc97..f202981 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -1,12 +1,67 @@ -html { +:root { + /* Catppuccin colors */ + /* Light mode */ + --light-text: #1e2030; + --light-background: #eff1f5; + --light-accent: #8839ef; + --light-highlight: #209fb5; + /* Dark mode */ + --dark-text: #cad3f5; + --dark-background: #24273a; + --dark-accent: #c6a0f6; + --dark-highlight: #7dc4e4; + + /* Global configs */ color-scheme: light dark; font-family: system-ui; - display: flex; - align-items: center; - justify-content: center; +} + +@media (prefers-color-scheme: light) { + html { + color: var(--light-text); + background-color: var(--light-background); + } + + h1 { + color: var(--light-highlight); + } +} + +@media (prefers-color-scheme: dark) { + html { + color: var(--dark-text); + background-color: var(--dark-background); + } + + h1 { + color: var(--dark-highlight); + } +} + +html { } body { - height: 100%; - width: 100%; + min-height: 100svh; + height: fit-content; + display: flex; + flex-direction: column; + align-items: center; + margin: 0; +} + +#app { + height: 100%; + min-width: 100%; + display: flex; + flex-direction: column; + align-items: center; + align-content: center; + justify-content: center; +} + +#body { + max-width: 40rem; + width: 100%; + height: 100%; } diff --git a/client/src/App.tsx b/client/src/App.tsx index b01dfa7..82db791 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,6 +1,6 @@ -import "/src/App.css"; -import { About } from "./pages/about"; -import { Root } from "./pages/root"; +import "@/App.css"; +import { About } from "@/pages/about"; +import { Root } from "@/pages/root"; import { BrowserRouter, Route, Routes } from "react-router"; export function App() { diff --git a/client/src/components/header/header.css b/client/src/components/header/header.css index dd546ca..a5862d7 100644 --- a/client/src/components/header/header.css +++ b/client/src/components/header/header.css @@ -1,9 +1,14 @@ header { - border-color: #c6a0f6; + --margin: 0.25rem; + --padding: 0.25rem; border-width: 2px; border-style: solid; - position: sticky top; + position: sticky; + + margin: var(--margin); + padding: var(--padding); + width: calc(100% - (2 * var(--margin)) - (2 * var(--padding)) - 4px); } nav { @@ -20,8 +25,27 @@ nav { } a { - color: #cad3f5; text-decoration: none; font-weight: bold; } } + +@media (prefers-color-scheme: light) { + header { + border-color: var(--light-accent); + } + + a { + color: var(--light-text); + } +} + +@media (prefers-color-scheme: dark) { + header { + border-color: var(--dark-accent); + } + + a { + color: var(--dark-text); + } +} diff --git a/client/src/components/header/index.tsx b/client/src/components/header/index.tsx index 18eda90..90dcd5c 100644 --- a/client/src/components/header/index.tsx +++ b/client/src/components/header/index.tsx @@ -1,3 +1,4 @@ +import "@/App.css"; import "./header.css"; import { Nav } from "./nav"; diff --git a/client/src/components/header/nav.tsx b/client/src/components/header/nav.tsx index 68d2f24..26938fb 100644 --- a/client/src/components/header/nav.tsx +++ b/client/src/components/header/nav.tsx @@ -5,13 +5,17 @@ export function Nav() { return ( ); } + +function NavLink(props: { path: string; name: string }) { + return ( +
Firstly, this is intended for those who have a starvation/diet control fetish. This is not intended to help with weight loss or similar reasons to fast.
- > +
Edit src/App.tsx to get started!