Skip to content

Commit d4b903a

Browse files
feat(webui): migrate /proposals to consolidated dark theme with shared nav (#1632)
Move proposals list and detail templates from layout-based (sidebar) to standalone pages with shared nav partial and Tailwind dark theme utilities. Update handlers to use Execute instead of ExecuteTemplate for standalone template rendering. Closes #1628
1 parent 48de10b commit d4b903a

5 files changed

Lines changed: 219 additions & 170 deletions

File tree

internal/webui/embed.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ var pageTemplates = []string{
4848
"templates/webhook_detail.html",
4949
"templates/admin.html",
5050
"templates/onboard/index.html",
51-
"templates/proposals/list.html",
52-
"templates/proposals/detail.html",
5351
}
5452

5553
// standalonePageTemplates is the list of templates that do NOT extend
@@ -62,6 +60,8 @@ var pageTemplates = []string{
6260
var standalonePageTemplates = []string{
6361
"templates/work/board.html",
6462
"templates/work/detail.html",
63+
"templates/proposals/list.html",
64+
"templates/proposals/detail.html",
6565
}
6666

6767
// parseTemplates parses all embedded HTML templates using a clone-per-page

internal/webui/handlers_proposals.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (s *Server) handleProposalsPage(w http.ResponseWriter, r *http.Request) {
115115
http.Error(w, "template missing: proposals/list.html", http.StatusInternalServerError)
116116
return
117117
}
118-
if err := tmpl.ExecuteTemplate(w, "templates/layout.html", view); err != nil {
118+
if err := tmpl.Execute(w, view); err != nil {
119119
http.Error(w, "template error: "+err.Error(), http.StatusInternalServerError)
120120
}
121121
}
@@ -166,7 +166,7 @@ func (s *Server) handleProposalDetailPage(w http.ResponseWriter, r *http.Request
166166
http.Error(w, "template missing: proposals/detail.html", http.StatusInternalServerError)
167167
return
168168
}
169-
if err := tmpl.ExecuteTemplate(w, "templates/layout.html", view); err != nil {
169+
if err := tmpl.Execute(w, view); err != nil {
170170
http.Error(w, "template error: "+err.Error(), http.StatusInternalServerError)
171171
}
172172
}

0 commit comments

Comments
 (0)