refactor: serve same index page for all sort routes (hash-driven client-side)
This commit is contained in:
+4
-4
@@ -43,10 +43,10 @@ handleRequest recipes request respond =
|
|||||||
case Wai.pathInfo request of
|
case Wai.pathInfo request of
|
||||||
-- Index page (default: alphabetical)
|
-- Index page (default: alphabetical)
|
||||||
[] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
|
[] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
|
||||||
-- Index page (sorted by tags)
|
-- Index page (sorted by tags) — sort mode ignored, driven client-side
|
||||||
["sorted", "tags"] -> respond (htmlResponse (Html.indexPage Html.TagSort recipes))
|
["sorted", "tags"] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
|
||||||
-- Index page (sorted by course/category)
|
-- Index page (sorted by course/category) — sort mode ignored, driven client-side
|
||||||
["sorted", "course"] -> respond (htmlResponse (Html.indexPage Html.CourseSort recipes))
|
["sorted", "course"] -> respond (htmlResponse (Html.indexPage Html.AlphaSort recipes))
|
||||||
-- Recipe detail page
|
-- Recipe detail page
|
||||||
["recipes", rawPath] ->
|
["recipes", rawPath] ->
|
||||||
case lookupRecipe (urlDecodePath rawPath) recipes of
|
case lookupRecipe (urlDecodePath rawPath) recipes of
|
||||||
|
|||||||
Reference in New Issue
Block a user