From c1b976edd0c27fdc488da7ff4c1b7551df0323cd Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 3 Nov 2024 15:50:08 +0100 Subject: view: Implement favorite recipes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- view/html/recipe.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'view/html/recipe.html') diff --git a/view/html/recipe.html b/view/html/recipe.html index b2fe773..b8fd130 100644 --- a/view/html/recipe.html +++ b/view/html/recipe.html @@ -12,7 +12,8 @@

{{ if ne .Recipe.Notes "" }} -

{{.Recipe.Notes}}

{{end}}{{ if ne .Recipe.Portions "" }} +

{{.Recipe.Notes}}

{{end}} +

Is favorite: {{if .Recipe.IsFavorite}}Yes{{else}}No{{end}}

{{ if ne .Recipe.Portions "" }}

Portions: {{.Recipe.Portions}}

{{end}}{{ if ne .Recipe.Url "" }}

Original recipe: {{.Recipe.Url}}

{{end}}{{if .HasIngredients}}

Ingredient summary:

-- cgit v1.2.3-70-g09d2