diff --git a/docs/book.toml b/docs/book.toml index 838fd9d..d9129e2 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -11,6 +11,8 @@ build-dir = "../target/docs" create-missing = false [output.html] -default-theme = "light" +default-theme = "navy" +preferred-dark-theme = "navy" +additional-css = ["theme/lore.css"] fold = { enable = false } search = { enable = false } diff --git a/docs/src/index.md b/docs/src/index.md index 3875500..68397f3 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,4 +1,4 @@ -# Kaptan Developer Manual +# Kaptan documentation Kaptan is an embedded Rust flight-controller project. This manual is the single source of project documentation: board support, safety boundaries, @@ -9,7 +9,7 @@ The checked-in firmware is telemetry-only. It does not expose physical motor authority, and no document in this site should be read as a physical-flight release claim. -## Start here +## Index - New contributors should read [Getting started](getting-started.md). - Board work belongs under [Boards](boards/index.md). diff --git a/docs/theme/lore.css b/docs/theme/lore.css new file mode 100644 index 0000000..e80a272 --- /dev/null +++ b/docs/theme/lore.css @@ -0,0 +1,223 @@ +/* + * Static, text-first presentation inspired by lore.kernel.org. + * Palette: Orkavian's published black, silver, and green site tokens. + */ +:root, +html.light, +html.rust, +html.coal, +html.navy, +html.ayu { + --background: #050505; + --background-secondary: #0a0a0a; + --text: #cccccc; + --text-muted: #888888; + --accent: #00ff41; + --border: #333333; +} + +html, +body { + background: var(--background); + color: var(--text); + font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, + Consolas, "Liberation Mono", monospace; + font-size: 15px; + line-height: 1.65; +} + +* { + animation: none !important; + border-radius: 0 !important; + box-shadow: none !important; + transition: none !important; +} + +/* Replace mdBook's interactive chrome with a quiet, static masthead. */ +#mdbook-sidebar, +#mdbook-sidebar-toggle-anchor, +#mdbook-menu-bar-hover-placeholder, +#mdbook-help-container, +#mdbook-menu-bar .left-buttons, +#mdbook-menu-bar .right-buttons { + display: none !important; +} + +#mdbook-page-wrapper, +.page-wrapper, +.page { + margin-left: 0 !important; + transform: none !important; +} + +#mdbook-menu-bar { + background: var(--background-secondary); + border-bottom: 1px solid var(--border); + display: block; + height: auto; + margin: 0; + min-height: 0; + padding: 0.55rem max(1rem, calc((100vw - 78ch) / 2)); + position: static; +} + +#mdbook-menu-bar .menu-title { + color: var(--text); + font-family: inherit; + font-size: 0.85rem; + font-weight: 700; + letter-spacing: 0.08em; + line-height: 1.4; + text-transform: uppercase; +} + +.content { + margin: 0 auto; + max-width: 78ch; + padding: 1.75rem 1rem 3rem; +} + +.content main { + margin: 0; + max-width: none; +} + +h1, +h2, +h3, +h4 { + color: var(--text); + font-family: inherit; + font-weight: 700; + line-height: 1.35; +} + +h1 { + font-size: 1.25rem; + margin: 0 0 1.25rem; +} + +h2 { + border-bottom: 1px solid var(--border); + font-size: 1rem; + margin: 2rem 0 0.75rem; + padding-bottom: 0.35rem; +} + +h3, +h4 { + font-size: 1rem; + margin: 1.5rem 0 0.5rem; +} + +a { + color: var(--accent); + text-decoration: underline; + text-underline-offset: 0.15em; +} + +a.header { + color: inherit; + text-decoration: none; +} + +p, +ul, +ol, +table, +blockquote, +pre { + margin: 0 0 1rem; +} + +ul, +ol { + padding-left: 1.5rem; +} + +li + li { + margin-top: 0.2rem; +} + +code, +pre, +kbd { + font-family: inherit; +} + +code { + background: var(--background-secondary); + color: var(--text); + padding: 0.05rem 0.25rem; +} + +pre { + background: var(--background-secondary); + border: 1px solid var(--border); + overflow-x: auto; + padding: 0.75rem; +} + +pre code { + padding: 0; +} + +table { + border-collapse: collapse; + width: 100%; +} + +th, +td { + border: 1px solid var(--border); + padding: 0.35rem 0.5rem; + text-align: left; +} + +th { + color: var(--text); + font-weight: 700; +} + +blockquote { + border-left: 2px solid var(--border); + color: var(--text-muted); + margin-left: 0; + padding-left: 0.8rem; +} + +hr { + border: 0; + border-top: 1px solid var(--border); + margin: 1.5rem 0; +} + +.nav-wrapper { + border-top: 1px solid var(--border); + margin-top: 2rem; + padding-top: 0.75rem; +} + +.nav-chapters { + background: none; +} + +.nav-chapters a { + color: var(--accent); +} + +@media print { + html, + body { + background: #ffffff; + color: #000000; + } + + #mdbook-menu-bar { + display: none; + } + + a { + color: #000000; + } +}