steid

@jamesgill /

af126c7feat: tailwind theme and the first components25d
1use topcoat::{Result, router::layout, tailwind, view::view};
14223e7feat: claim, sign in, and sign out through the browser1mo
2
3/// The HTML shell every page renders inside.
4///
5/// A layout rather than a helper function: `view!` needs the request context in scope,
6/// so a plain `fn shell(..)` cannot build one. Layouts wrap by path prefix, and this
7/// one is at `/`, so it wraps everything.
af126c7feat: tailwind theme and the first components25d
8///
9/// `class="dark"` opts the whole document into the dark palette. Steid is dark-first —
10/// developers live there — and light mode is a later toggle rather than the default.
14223e7feat: claim, sign in, and sign out through the browser1mo
11#[layout("/")]
12async fn root_layout(slot: Result) -> Result {
13 let content = slot?;
14
15 view! {
16 <!DOCTYPE html>
af126c7feat: tailwind theme and the first components25d
17 <html lang="en" class="dark">
14223e7feat: claim, sign in, and sign out through the browser1mo
18 <head>
19 <meta charset="utf-8" />
20 <meta name="viewport" content="width=device-width, initial-scale=1" />
21 <title>"steid"</title>
af126c7feat: tailwind theme and the first components25d
22 <link rel="stylesheet" href=(tailwind::stylesheet!()) />
14223e7feat: claim, sign in, and sign out through the browser1mo
23 topcoat::dev::script()
24 </head>
25 <body>
af126c7feat: tailwind theme and the first components25d
26 <main class="mx-auto max-w-3xl px-6 py-10">(content)</main>
14223e7feat: claim, sign in, and sign out through the browser1mo
27 </body>
28 </html>
29 }
30}