package templates import ( "backend/internal/auth" "backend/internal/db/sqlc" "backend/internal/web/ui" ) // SidebarNavIcon renders the SVG icon for the given sidebar icon kind. // SVG paths ported verbatim from go-backend/internal/web/views/icons.templ SidebarIcon. templ SidebarNavIcon(kind string) { switch kind { case "panels": case "tasks": case "layers": case "planning": case "chat": case "files": default: } } // SidebarNavItemRow renders one nav list item. // If item.Href is empty, renders as a non-interactive div (visual-only, per D-N02). // If item.Href is non-empty, renders as an anchor tag. templ SidebarNavItemRow(item sidebarNavItem) { if item.Href == "" {
} else { } } // SidebarProjectsSection renders the projects list in the sidebar. templ SidebarProjectsSection(tablos []sqlc.Tablo) { } // SidebarOrganizationFooter renders the user/org info at the bottom of the sidebar. // Per D-F01/D-F02/D-F03: shows user email initial as avatar, email as name, and logout form. templ SidebarOrganizationFooter(user *auth.User, csrfToken string) { } // DashboardSidebar renders the full sidebar with brand, nav, projects, and footer. templ DashboardSidebar(activePath string, tablos []sqlc.Tablo, user *auth.User, csrfToken string) { } // AppLayout is the authenticated HTML shell for all dashboard pages. // It replaces Layout for all authenticated routes in Phase 15+. // // Differences from Layout: // - Uses .dashboard-shell grid with sidebar + main content // - DashboardSidebar renders nav, projects, and org footer // - main#app-main-content.dashboard-main wraps page children // - Scripts: htmx.min.js, sortable.min.js, discussion-sse.js (per D-L04) templ AppLayout(title string, user *auth.User, csrfToken string, activePath string, tablos []sqlc.Tablo) { { title }
@DashboardSidebar(activePath, tablos, user, csrfToken)
{ children... }
}