diff options
author | xengineering <me@xengineering.eu> | 2024-03-03 19:50:50 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-03-03 19:50:50 +0100 |
commit | 4dcd846aa7c8d15c96ba13380f48b985fb2c992e (patch) | |
tree | 291e3dbab6dca9760b01d1b19c288b2314833709 /view | |
parent | fa4c7e7af50817bc895f56f3fa25b50b8444407d (diff) | |
download | ceres-4dcd846aa7c8d15c96ba13380f48b985fb2c992e.tar ceres-4dcd846aa7c8d15c96ba13380f48b985fb2c992e.tar.zst ceres-4dcd846aa7c8d15c96ba13380f48b985fb2c992e.zip |
view: Move recipe adding to /recipes
In the long term the <nav> section at the top should reference the list
views of all managed objects (recipes, users, products and so on).
With this structure it makes more sense to have the button to add a
recipe on the list view on recipes located at /recipes.
Diffstat (limited to 'view')
-rw-r--r-- | view/html/nav.html | 3 | ||||
-rw-r--r-- | view/html/recipes.html | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/view/html/nav.html b/view/html/nav.html index 9da1b6b..9e7bd6e 100644 --- a/view/html/nav.html +++ b/view/html/nav.html @@ -1,6 +1,5 @@ {{define "nav"}} <nav> - <a href="/recipes">HOME</a> - <a onclick="create('/recipe')">add recipe</a> + <a href="/recipes">Recipes</a> </nav> {{end}} diff --git a/view/html/recipes.html b/view/html/recipes.html index 0287dc5..dc072a1 100644 --- a/view/html/recipes.html +++ b/view/html/recipes.html @@ -4,12 +4,13 @@ {{ template "head" }} <header> {{ template "nav" }} - <h1>Recipe overview</h1> + <h1>Recipes</h1> </header> <body> <main> <p>Here are the available recipes 😋🍳🍔🍕🥘</p> - <input id="search" onkeyup="filter()" type="text" placeholder="Search for a recipe ..."></input> + <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> |