diff --git a/docs/test.md b/docs/test.md index 41a71a4..b4bb64c 100644 --- a/docs/test.md +++ b/docs/test.md @@ -9,4 +9,8 @@ Hello **world**, list: Edited OFFLINE -Edited OFFLINE v3 \ No newline at end of file +Edited OFFLINE v3 +| Col A | Col B | Col C | Col D | Col E | Col F | Col G | +|-------|-------|-------|-------|-------|-------|-------| +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | +| long text here to force overflow ........ | x | x | x | x | x | diff --git a/web/src/App.tsx b/web/src/App.tsx index bcff3e1..24165bb 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "preact/hooks"; import { createClient } from "@connectrpc/connect"; import { createConnectTransport } from "@connectrpc/connect-web"; -import { BookOpen, Gauge, Link as LinkIcon, Menu, Play } from "lucide-preact"; +import { BookOpen, Gauge, Link as LinkIcon, Play } from "lucide-preact"; import type { Item, Link } from "./gen/homelab/v1/homelab_pb"; import { HomelabService } from "./gen/homelab/v1/homelab_pb"; import { MonitorCard } from "./components/MonitorCard"; @@ -44,7 +44,6 @@ export function App() { exec: [], }); const [category, setCategory] = useState("monitor"); - const [drawerOpen, setDrawerOpen] = useState(false); const [docs, setDocs] = useState(localDocs()); const [openDoc, setOpenDoc] = useState(null); @@ -71,53 +70,50 @@ export function App() { const open = docs.find((d) => d.name === openDoc); return ( -
- setDrawerOpen((v) => !v)} /> - -
- {/* Top bar */} - - -
- {category === "links" && } - {category === "monitor" && ( -
- {content.monitors.map((it) => )} -
- )} - {category === "exec" && content.exec.map((it) => )} - {category === "docs" && - (open ? ( - setOpenDoc(null)} /> - ) : ( - setOpenDoc(d.name)} /> - ))} -
-
- - {/* Sidebar */} -
-
+ +
+ +
+ {category === "links" && } + {category === "monitor" && ( +
+ {content.monitors.map((it) => )} +
+ )} + {category === "exec" && content.exec.map((it) => )} + {category === "docs" && + (open ? ( + setOpenDoc(null)} /> + ) : ( + setOpenDoc(d.name)} /> + ))} +
+ + {/* Mobile footer nav */} +
+ {CATEGORIES.map((c) => ( + + ))}
); diff --git a/web/src/app.css b/web/src/app.css index be0d5af..8b8b692 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -2,3 +2,11 @@ @plugin "daisyui" { themes: dark --default; } + +/* Markdown reader: tables scroll sideways instead of overflowing the card. */ +.prose table { + display: block; + overflow-x: auto; + white-space: nowrap; +} +