Age | Commit message (Collapse) | Author |
|
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.
|
|
This makes it easier to write a shopping list for the required
ingredients.
|
|
The recipe edit page HTML template did not contain the two time stamps
"Created" and "LastChanged" as hidden form values.
Thus the information was not passed from the backend to the frontend. On
a save the recipe without time stamp information was injected into the
backend.
This effectively deleted any time stamp information. This commit fixes
that bug by including all fields of the model.Recipe struct inside the
form of the recipe-edit.html template.
|
|
|
|
This makes the JS function way simpler and removes a duplication of the
step HTML code.
|
|
This allows to use it in two places:
- template for loop for backend-generated steps
- a HTML template tag for frontend- / JS-generated steps
|
|
|
|
This makes it impossible to move the whole JS functionality into the
central ceres.js script. Moving that JS code there makes caching
possible and bundles all JS-related code in one file.
The overall goal is to get rid of as many JS code as possible.
|
|
|
|
This takes up way less space in the code and the actual user view.
|
|
To avoid not clickable recipes on the /recipes page a default name used
to be inserted on recipe creation.
This was not a proper fix for the problem and also was annoying that the
user first had to remove the default recipe name.
This commit removes this default name.
|
|
In addition to the enforcement of titles in the model package the HTML
form field for the title is set to 'required' to give the user feedback
via the browser that a title is required.
|
|
|
|
|
|
|
|
It should be inside the body tag but used to be before it.
|
|
There is the need to add buttons to the recipe server which act like a
anchor tag (link). This can be achieved by nesting anchor and button
tag.
The problem is that if the user cycles through the elements of the page
with the 'tab' key such a button is handled as two overlapping elements
instead of one.
This commit solves the issue by using buttons with the attribute
`onclick="window.location.href='<url>';`.
|
|
They are intended to use multiple lines. This is easier to edit in a
textarea element rather than in an input element.
|
|
The <nav> section is the same on every page. This new template reduces
code duplication.
|
|
This makes the update URL more consistent with the other ones. A check
ensures consistency of the URL and JSON ID values.
|
|
While forms can be send without JavaScript this new approach has the
benefit that the whole data is send as one JSON.
This JSON format can also be used for an API or testing.
|
|
|
|
The index page / provides a redirect to /recipes but this is inefficient
since two HTTP requests are required.
|
|
|