package templates import "fmt" // DocsLayout renders the standalone documentation site: a docs-owned topbar // (search, theme picker, Open App), a docs-only sidebar with category → // subcategory navigation, and the markdown content. // // It deliberately does NOT embed the app Header: docs are a public surface // (setup and troubleshooting happen pre-login), and the app chrome assumed a // signed-in user — it rendered a sign-in form that silently degraded into a // native GET submit (credentials into the URL) because this page never loaded // htmx. Signed-out visitors get a plain "Sign in" LINK here; the form lives // on /login where it belongs. templ DocsLayout(nav Navigation, doc Document, user User, currentPath string) { @ThemeFlashGuard() { doc.Title } - Bookhoard Documentation @DocsTopbar(user)
@DocsSidebar(nav, currentPath)
if len(doc.Breadcrumb) > 0 { }

{ doc.Title }

if len(doc.TOC) > 0 {
On this page @Icon("chevron-down", "h-4 w-4 ml-auto")
for _, item := range doc.TOC { { item.Title } }
}
@UnsafeHTML(doc.Content).ToComponent()