summaryrefslogtreecommitdiff
path: root/kitchen/urls_htmx.py
diff options
context:
space:
mode:
authorCaine <caine@jihakuz.xyz>2026-04-02 23:08:43 +0100
committerCaine <caine@jihakuz.xyz>2026-04-02 23:08:43 +0100
commitc4ca4348edc5c4fd6cc36e9833fbb9c697f3bf9d (patch)
tree54b06b47d639e15f7860b3366db40bdd648e9885 /kitchen/urls_htmx.py
parent963ca2dd5549843e992af718053d08c10d5ec843 (diff)
Phase 4: HTMX frontend with dark palette
- 4 pages: Pantry, Recipes, Shopping List, Cook Log - HTMX-powered: add/delete pantry items, toggle shopping, generate smart list - Custom 13-colour palette from Lospec (dark bg, yellow accent) - Mobile-responsive - Whitenoise for static files in production - All routes under /app/ - API (/api/) stays internal, frontend (/app/) for browser use
Diffstat (limited to 'kitchen/urls_htmx.py')
-rw-r--r--kitchen/urls_htmx.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/kitchen/urls_htmx.py b/kitchen/urls_htmx.py
new file mode 100644
index 0000000..390f6c1
--- /dev/null
+++ b/kitchen/urls_htmx.py
@@ -0,0 +1,17 @@
+from django.urls import path
+from . import views_htmx
+
+urlpatterns = [
+ # Full pages
+ path("", views_htmx.pantry_page, name="app-pantry"),
+ path("recipes/", views_htmx.recipes_page, name="app-recipes"),
+ path("shopping/", views_htmx.shopping_page, name="app-shopping"),
+ path("log/", views_htmx.log_page, name="app-log"),
+
+ # HTMX partials
+ path("pantry/add/", views_htmx.pantry_add, name="app-pantry-add"),
+ path("pantry/<int:item_id>/delete/", views_htmx.pantry_delete, name="app-pantry-delete"),
+ path("shopping/generate/", views_htmx.shopping_generate, name="app-shopping-generate"),
+ path("shopping/<int:item_id>/toggle/", views_htmx.shopping_toggle, name="app-shopping-toggle"),
+ path("shopping/clear/", views_htmx.shopping_clear, name="app-shopping-clear"),
+]