refactor: serve same index page for all sort routes (hash-driven client-side)

This commit is contained in:
2026-05-19 21:40:34 -04:00
parent d5e9c7e0d3
commit 9252a76503
+4 -4
View File
@@ -43,10 +43,10 @@ handleRequest recipes request respond =
case Wai.pathInfo request of
-- Index page (default: alphabetical)
[] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
-- Index page (sorted by tags)
["sorted", "tags"] -> respond (htmlResponse (Html.indexPage Html.TagSort recipes))
-- Index page (sorted by course/category)
["sorted", "course"] -> respond (htmlResponse (Html.indexPage Html.CourseSort recipes))
-- Index page (sorted by tags) — sort mode ignored, driven client-side
["sorted", "tags"] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
-- Index page (sorted by course/category) — sort mode ignored, driven client-side
["sorted", "course"] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
-- Recipe detail page
["recipes", rawPath] ->
case lookupRecipe (urlDecodePath rawPath) recipes of