From 2fee76ea41f37e3a068273c05a98b892ab29228c Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 13 Jan 2026 14:09:50 -1000 Subject: Add Trello card creation and completion UI (Phase 3 Step 3) Implement interactive Trello card management with HTMX: Frontend: - Create trello-board.html partial with add card form - Add collapsible form with list selector and card title input - Add completion checkbox on each card - Update trello-boards.html to use new partial - Use HTMX for seamless partial updates (hx-post, hx-swap) Backend: - Add HandleCreateCard: creates card and re-renders board - Add HandleCompleteCard: marks card as closed - Register /cards and /cards/complete POST routes Features: - Add cards to any list via dropdown - Mark cards complete with checkbox (removes from view) - Real-time board updates without full page reload - Glassmorphism styling for form All tests pass. Full Trello write operations now available in UI. Co-Authored-By: Claude Sonnet 4.5 --- web/templates/partials/trello-board.html | 82 +++++++++++++++++++++++++++++++ web/templates/partials/trello-boards.html | 29 +---------- 2 files changed, 83 insertions(+), 28 deletions(-) create mode 100644 web/templates/partials/trello-board.html (limited to 'web/templates') diff --git a/web/templates/partials/trello-board.html b/web/templates/partials/trello-board.html new file mode 100644 index 0000000..0b176cd --- /dev/null +++ b/web/templates/partials/trello-board.html @@ -0,0 +1,82 @@ +{{define "trello-board"}} +
+ +
+

{{.Name}}

+
+ + + {{if .Lists}} +
+ + + Add Card + +
+ + + + + + + +
+
+ {{end}} + + +
+ {{range .Cards}} +
+
+ + + +
+

{{.Name}}

+
+ {{if .ListName}} + + {{.ListName}} + + {{end}} + {{if .DueDate}} + + Due: {{.DueDate.Format "Jan 2"}} + + {{end}} + {{if .URL}} + + View → + + {{end}} +
+
+
+
+ {{end}} +
+
+{{end}} diff --git a/web/templates/partials/trello-boards.html b/web/templates/partials/trello-boards.html index bd460cf..3d42517 100644 --- a/web/templates/partials/trello-boards.html +++ b/web/templates/partials/trello-boards.html @@ -11,34 +11,7 @@
{{range .Boards}} {{if .Cards}} -
-

{{.Name}}

-
- {{range .Cards}} -
-

{{.Name}}

-
- {{if .ListName}} - - {{.ListName}} - - {{end}} - {{if .DueDate}} - - Due: {{.DueDate.Format "Jan 2"}} - - {{end}} - {{if .URL}} - - View → - - {{end}} -
-
- {{end}} -
-
+ {{template "trello-board" .}} {{end}} {{end}}
-- cgit v1.2.3