diff options
author | xengineering <me@xengineering.eu> | 2024-03-06 20:53:38 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-03-06 21:42:44 +0100 |
commit | 06293b48bb1288348e36dceb779cc06f31b0ba8d (patch) | |
tree | 48a63de5000ef4971e55261ce0bc448a0d3e510f /view | |
parent | f10765778208840e4dd675646041305ad6b17861 (diff) | |
download | ceres-06293b48bb1288348e36dceb779cc06f31b0ba8d.tar ceres-06293b48bb1288348e36dceb779cc06f31b0ba8d.tar.zst ceres-06293b48bb1288348e36dceb779cc06f31b0ba8d.zip |
view: Display message in case of no recipes
Diffstat (limited to 'view')
-rw-r--r-- | view/html/recipes.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/view/html/recipes.html b/view/html/recipes.html index dc072a1..c0a0719 100644 --- a/view/html/recipes.html +++ b/view/html/recipes.html @@ -8,12 +8,13 @@ </header> <body> <main> - <p>Here are the available recipes 😋🍳🍔🍕🥘</p> + <p><button onclick="create('/recipe')">create</button></p> +{{if ne (len .) 0}} <p><input id="search" onkeyup="filter()" type="text" placeholder="Search for a recipe ..."></p> - <button onclick="create('/recipe')">add</button> <ul id="recipes">{{range .}} <li><a href="./recipe/{{.Id}}">{{.Title}}</a></li>{{end}} - </ul> + </ul>{{else}} + <p><i>No recipes available.</i></p>{{end}} </main> {{ template "footer" }} <script src="/static/view/static/ceres.js"></script> |