Add a toggle between dark and light theme
This commit is contained in:
parent
d22617538e
commit
559ed139aa
34 changed files with 640 additions and 469 deletions
|
|
@ -9,18 +9,18 @@
|
|||
{% block content %}
|
||||
|
||||
<div class="content" id="recipe-edit">
|
||||
<label for="input-title">{{ tr.t(Sentence::RecipeTitle) }}</label>
|
||||
<label for="input-title">{{ context.tr.t(Sentence::RecipeTitle) }}</label>
|
||||
<input
|
||||
id="input-title"
|
||||
type="text"
|
||||
value="{{ recipe.title }}"
|
||||
autofocus="true">
|
||||
|
||||
<label for="text-area-description">{{ tr.t(Sentence::RecipeDescription) }}</label>
|
||||
<label for="text-area-description">{{ context.tr.t(Sentence::RecipeDescription) }}</label>
|
||||
<textarea
|
||||
id="text-area-description">{{ recipe.description }}</textarea>
|
||||
|
||||
<label for="input-servings">{{ tr.t(Sentence::RecipeServings) }}</label>
|
||||
<label for="input-servings">{{ context.tr.t(Sentence::RecipeServings) }}</label>
|
||||
<input
|
||||
id="input-servings"
|
||||
type="number"
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
{{ s }}
|
||||
{% endif %}">
|
||||
|
||||
<label for="input-estimated-time">{{ tr.t(Sentence::RecipeEstimatedTime) }}</label>
|
||||
<label for="input-estimated-time">{{ context.tr.t(Sentence::RecipeEstimatedTime) }}</label>
|
||||
<input
|
||||
id="input-estimated-time"
|
||||
type="number"
|
||||
|
|
@ -40,16 +40,16 @@
|
|||
{{ t }}
|
||||
{% endif %}">
|
||||
|
||||
<label for="select-difficulty">{{ tr.t(Sentence::RecipeDifficulty) }}</label>
|
||||
<label for="select-difficulty">{{ context.tr.t(Sentence::RecipeDifficulty) }}</label>
|
||||
<select id="select-difficulty">
|
||||
<option value="0" {%~ call is_difficulty(common::ron_api::Difficulty::Unknown) %}> - </option>
|
||||
<option value="1" {%~ call is_difficulty(common::ron_api::Difficulty::Easy) %}>{{ tr.t(Sentence::RecipeDifficultyEasy) }}</option>
|
||||
<option value="2" {%~ call is_difficulty(common::ron_api::Difficulty::Medium) %}>{{ tr.t(Sentence::RecipeDifficultyMedium) }}</option>
|
||||
<option value="3" {%~ call is_difficulty(common::ron_api::Difficulty::Hard) %}>{{ tr.t(Sentence::RecipeDifficultyHard) }}</option>
|
||||
<option value="1" {%~ call is_difficulty(common::ron_api::Difficulty::Easy) %}>{{ context.tr.t(Sentence::RecipeDifficultyEasy) }}</option>
|
||||
<option value="2" {%~ call is_difficulty(common::ron_api::Difficulty::Medium) %}>{{ context.tr.t(Sentence::RecipeDifficultyMedium) }}</option>
|
||||
<option value="3" {%~ call is_difficulty(common::ron_api::Difficulty::Hard) %}>{{ context.tr.t(Sentence::RecipeDifficultyHard) }}</option>
|
||||
</select>
|
||||
|
||||
<div id="container-tags">
|
||||
<label for="input-tags" >{{ tr.t(Sentence::RecipeTags) }}</label>
|
||||
<label for="input-tags" >{{ context.tr.t(Sentence::RecipeTags) }}</label>
|
||||
<span class="tags"></span>
|
||||
<input
|
||||
id="input-tags"
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
value="">
|
||||
</div>
|
||||
|
||||
<label for="select-language">{{ tr.t(Sentence::RecipeLanguage) }}</label>
|
||||
<label for="select-language">{{ context.tr.t(Sentence::RecipeLanguage) }}</label>
|
||||
<select id="select-language">
|
||||
{% for lang in translation::available_languages() %}
|
||||
<option value="{{ lang.0 }}"
|
||||
|
|
@ -75,71 +75,71 @@
|
|||
checked
|
||||
{% endif %}
|
||||
>
|
||||
<label for="input-is-published">{{ tr.t(Sentence::RecipeIsPublished) }}</label>
|
||||
<label for="input-is-published">{{ context.tr.t(Sentence::RecipeIsPublished) }}</label>
|
||||
|
||||
<input id="input-delete" type="button" value="{{ tr.t(Sentence::RecipeDelete) }}">
|
||||
<input id="input-delete" type="button" value="{{ context.tr.t(Sentence::RecipeDelete) }}">
|
||||
|
||||
<div id="groups-container">
|
||||
</div>
|
||||
|
||||
<input id="input-add-group" type="button" value="{{ tr.t(Sentence::RecipeAddAGroup) }}">
|
||||
<input id="input-add-group" type="button" value="{{ context.tr.t(Sentence::RecipeAddAGroup) }}">
|
||||
</div>
|
||||
|
||||
<div id="hidden-templates">
|
||||
<div class="group">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="input-group-name">{{ tr.t(Sentence::RecipeGroupName) }}</label>
|
||||
<label for="input-group-name">{{ context.tr.t(Sentence::RecipeGroupName) }}</label>
|
||||
<input class="input-group-name" type="text">
|
||||
|
||||
<label for="input-group-comment">{{ tr.t(Sentence::RecipeGroupComment) }}</label>
|
||||
<label for="input-group-comment">{{ context.tr.t(Sentence::RecipeGroupComment) }}</label>
|
||||
<input class="input-group-comment" type="text">
|
||||
|
||||
<input class="input-group-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveGroup) }}">
|
||||
<input class="input-group-delete" type="button" value="{{ context.tr.t(Sentence::RecipeRemoveGroup) }}">
|
||||
|
||||
<div class="steps">
|
||||
</div>
|
||||
|
||||
<input class="input-add-step" type="button" value="{{ tr.t(Sentence::RecipeAddAStep) }}">
|
||||
<input class="input-add-step" type="button" value="{{ context.tr.t(Sentence::RecipeAddAStep) }}">
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="text-area-step-action">{{ tr.t(Sentence::RecipeStepAction) }}</label>
|
||||
<label for="text-area-step-action">{{ context.tr.t(Sentence::RecipeStepAction) }}</label>
|
||||
<textarea class="text-area-step-action"></textarea>
|
||||
|
||||
<input class="input-step-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveStep) }}">
|
||||
<input class="input-step-delete" type="button" value="{{ context.tr.t(Sentence::RecipeRemoveStep) }}">
|
||||
|
||||
<div class="ingredients"></div>
|
||||
|
||||
<input class="input-add-ingredient" type="button" value="{{ tr.t(Sentence::RecipeAddAnIngredient) }}">
|
||||
<input class="input-add-ingredient" type="button" value="{{ context.tr.t(Sentence::RecipeAddAnIngredient) }}">
|
||||
</div>
|
||||
|
||||
<div class="ingredient">
|
||||
<span class="drag-handle"></span>
|
||||
|
||||
<label for="input-ingredient-name">{{ tr.t(Sentence::RecipeIngredientName) }}</label>
|
||||
<label for="input-ingredient-name">{{ context.tr.t(Sentence::RecipeIngredientName) }}</label>
|
||||
<input class="input-ingredient-name" type="text">
|
||||
|
||||
<label for="input-ingredient-quantity">{{ tr.t(Sentence::RecipeIngredientQuantity) }}</label>
|
||||
<label for="input-ingredient-quantity">{{ context.tr.t(Sentence::RecipeIngredientQuantity) }}</label>
|
||||
<input class="input-ingredient-quantity" type="number" step="0.1" min="0" max="10000">
|
||||
|
||||
<label for="input-ingredient-unit">{{ tr.t(Sentence::RecipeIngredientUnit) }}</label>
|
||||
<label for="input-ingredient-unit">{{ context.tr.t(Sentence::RecipeIngredientUnit) }}</label>
|
||||
<input class="input-ingredient-unit" type="text">
|
||||
|
||||
<label for="input-ingredient-comment">{{ tr.t(Sentence::RecipeIngredientComment) }}</label>
|
||||
<label for="input-ingredient-comment">{{ context.tr.t(Sentence::RecipeIngredientComment) }}</label>
|
||||
<input class="input-ingredient-comment" type="text">
|
||||
|
||||
<input class="input-ingredient-delete" type="button" value="{{ tr.t(Sentence::RecipeRemoveIngredient) }}">
|
||||
<input class="input-ingredient-delete" type="button" value="{{ context.tr.t(Sentence::RecipeRemoveIngredient) }}">
|
||||
</div>
|
||||
|
||||
<div class="dropzone"></div>
|
||||
|
||||
<span class="recipe-delete-confirmation">{{ tr.t(Sentence::RecipeDeleteConfirmation) }}</span>
|
||||
<span class="recipe-group-delete-confirmation">{{ tr.t(Sentence::RecipeGroupDeleteConfirmation) }}</span>
|
||||
<span class="recipe-step-delete-confirmation">{{ tr.t(Sentence::RecipeStepDeleteConfirmation) }}</span>
|
||||
<span class="recipe-ingredient-delete-confirmation">{{ tr.t(Sentence::RecipeIngredientDeleteConfirmation) }}</span>
|
||||
<span class="recipe-delete-confirmation">{{ context.tr.t(Sentence::RecipeDeleteConfirmation) }}</span>
|
||||
<span class="recipe-group-delete-confirmation">{{ context.tr.t(Sentence::RecipeGroupDeleteConfirmation) }}</span>
|
||||
<span class="recipe-step-delete-confirmation">{{ context.tr.t(Sentence::RecipeStepDeleteConfirmation) }}</span>
|
||||
<span class="recipe-ingredient-delete-confirmation">{{ context.tr.t(Sentence::RecipeIngredientDeleteConfirmation) }}</span>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue