UI adjustments: Import link in header, matching font sizes, cook history titles, click-to-upload images
- Add Import link to all page headers (landing, recipe, cook history, import) - Match ingredient list font size to recipe method text (both 15px) - Show recipe titles instead of filenames on Cook History page - Make clicking anywhere on recipe hero image/placeholder trigger file upload dialog
This commit is contained in:
+5
-1
@@ -667,7 +667,11 @@ handleRequest recipeDir state db request respond = do
|
||||
["cook-history"] -> do
|
||||
entries <- CookLog.fetchAllEntries db
|
||||
let grouped = groupEntries entries
|
||||
respond $ htmlResponse (Html.cookHistoryPage grouped)
|
||||
recipeTitleLookup fn =
|
||||
case Map.lookup (map toLower (stripCookExt (T.unpack fn))) recipes of
|
||||
Just info -> Idx.riTitle info
|
||||
Nothing -> fn
|
||||
respond $ htmlResponse (Html.cookHistoryPage recipeTitleLookup grouped)
|
||||
-- Cook log JSON endpoint for all entries
|
||||
["cook-log"] -> do
|
||||
entries <- CookLog.fetchAllEntries db
|
||||
|
||||
Reference in New Issue
Block a user