diff options
author | xengineering <me@xengineering.eu> | 2024-11-03 15:50:08 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-11-03 16:06:58 +0100 |
commit | c1b976edd0c27fdc488da7ff4c1b7551df0323cd (patch) | |
tree | 4c1015811d626f7d0ce37ba1cb590c5de47dd72d /view/html/recipes.html | |
parent | 7cd3a096a975801a07fb3ff06b6fac70e17234ce (diff) | |
download | ceres-c1b976edd0c27fdc488da7ff4c1b7551df0323cd.tar ceres-c1b976edd0c27fdc488da7ff4c1b7551df0323cd.tar.zst ceres-c1b976edd0c27fdc488da7ff4c1b7551df0323cd.zip |
view: Implement favorite recipes
This marks favorite recipes with a `⭐` emoticon. The favorite flag
value can be set on the recipe edit page. Favorite recipes are listed
first on the recipe list view.
Furthermore as a second priority the created time stamp is used in the
recipe list so that more recent recipes are listed first.
Diffstat (limited to 'view/html/recipes.html')
-rw-r--r-- | view/html/recipes.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/view/html/recipes.html b/view/html/recipes.html index d9e720b..35059f7 100644 --- a/view/html/recipes.html +++ b/view/html/recipes.html @@ -12,7 +12,7 @@ {{if ne (len .) 0}} <p><input id="search" onkeyup="filter()" type="text" placeholder="Search for a recipe ..."></p> <ul id="recipes">{{range .}} - <li><a href="./recipe/{{.Id}}">{{.Title}}</a></li>{{end}} + <li><a href="./recipe/{{.Id}}">{{.Title}}</a>{{if .IsFavorite}} ⭐{{end}}</li>{{end}} </ul>{{else}} <p><i>No recipes available.</i></p>{{end}} </main> |