Add a toggle between dark and light theme

This commit is contained in:
Greg Burri 2025-03-31 15:31:06 +02:00
parent d22617538e
commit 559ed139aa
34 changed files with 640 additions and 469 deletions

View file

@ -2,15 +2,15 @@
{% block main_container %}
<div class="content" id="ask-reset-password">
<h1>{{ tr.t(Sentence::LostPassword) }}</h1>
<h1>{{ context.tr.t(Sentence::LostPassword) }}</h1>
<form action="/ask_reset_password" method="post">
<label for="email_field">{{ tr.t(Sentence::EmailAddress) }}</label>
<label for="email_field">{{ context.tr.t(Sentence::EmailAddress) }}</label>
<input id="email_field" type="email"
name="email" value="{{ email }}"
autocapitalize="none" autocomplete="email" autofocus="autofocus">
<span class="user-message">{{ message_email }}</span>
<input type="submit" name="commit" value="{{ tr.t(Sentence::AskResetButton) }}">
<input type="submit" name="commit" value="{{ context.tr.t(Sentence::AskResetButton) }}">
</form>
<span class="user-message">{{ message }}</span>

View file

@ -1,10 +1,15 @@
<!DOCTYPE html>
<html lang="{{ tr.current_lang_and_territory_code() }}" data-user-logged="{{ user.is_some() }}" >
<html lang="{{ context.tr.current_lang_and_territory_code() }}" data-user-logged="{{ context.user.is_some() }}" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Recettes de cuisine</title>
<link rel="stylesheet" type="text/css" href="/static/style.css">
<link rel="stylesheet" type="text/css" href="/static/
{% if context.dark_theme %}
style_dark.css
{% else %}
style_light.css
{% endif %}">
<link rel="modulepreload" href="/static/wasm/frontend.js" crossorigin="anonymous" as="fetch" type="application/wasm">
</head>

View file

@ -5,29 +5,37 @@
{% include "title.html" %}
<span class="header-menu">
{% match user %}
{% match context.user %}
{% when Some with (user) %}
<a class="create-recipe" href="/recipe/new" >{{ tr.t(Sentence::CreateNewRecipe) }}</a>
<a href="/{{ tr.current_lang_code() }}/user/edit">
<a class="create-recipe" href="/recipe/new" >{{ context.tr.t(Sentence::CreateNewRecipe) }}</a>
<a href="/{{ context.tr.current_lang_code() }}/user/edit">
{% if user.name == "" %}
{{ user.email }}
{% else %}
{{ user.name }}
{% endif %}
</a> / <a href="/signout">{{ tr.t(Sentence::SignOut) }}</a>
</a> / <a href="/signout">{{ context.tr.t(Sentence::SignOut) }}</a>
{% when None %}
<a href="/{{ tr.current_lang_code() }}/signin" >{{ tr.t(Sentence::SignInMenu) }}</a>/<a href="/{{ tr.current_lang_code() }}/signup">{{ tr.t(Sentence::SignUpMenu) }}</a>/<a href="/{{ tr.current_lang_code() }}/ask_reset_password">{{ tr.t(Sentence::LostPassword) }}</a>
<a href="/{{ context.tr.current_lang_code() }}/signin" >{{ context.tr.t(Sentence::SignInMenu) }}</a>/<a href="/{{ context.tr.current_lang_code() }}/signup">{{ context.tr.t(Sentence::SignUpMenu) }}</a>/<a href="/{{ context.tr.current_lang_code() }}/ask_reset_password">{{ context.tr.t(Sentence::LostPassword) }}</a>
{% endmatch %}
<select id="select-website-language">
{% for lang in translation::available_languages() %}
<option value="{{ lang.0 }}"
{%~ if tr.current_lang_code() == lang.0 %}
{%~ if context.tr.current_lang_code() == lang.0 %}
selected
{% endif %}
>{{ lang.1 }}</option>
{% endfor %}
</select>
<label id="toggle-theme">
<input type="checkbox"
{%~ if !context.dark_theme %}
checked
{% endif %} >
<span class="slider"></span>
</label>
</span>
</div>

View file

@ -17,7 +17,7 @@
Sentence::CalendarNovember,
Sentence::CalendarDecember,
] %}
<span class="month">{{ tr.t(*month) }}</span>
<span class="month">{{ context.tr.t(*month) }}</span>
{% endfor %}
<span class="next">NEXT</span>
@ -32,7 +32,7 @@
Sentence::CalendarSaturdayAbbreviation,
Sentence::CalendarSundayAbbreviation,
] %}
<li class="weekday">{{ tr.t(*day) }}</li>
<li class="weekday">{{ context.tr.t(*day) }}</li>
{% endfor %}
</ul>
@ -52,17 +52,17 @@
<div class="scheduled-recipe"></div>
<div class="unschedule-confirmation">
<div>{{ tr.t(Sentence::CalendarUnscheduleConfirmation) }}</div>
<div>{{ context.tr.t(Sentence::CalendarUnscheduleConfirmation) }}</div>
<input
id="input-remove-ingredients-from-shopping-list"
type="checkbox"
checked
>
<label for="input-remove-ingredients-from-shopping-list">
{{ tr.t(Sentence::CalendarRemoveIngredientsFromShoppingList) }}
{{ context.tr.t(Sentence::CalendarRemoveIngredientsFromShoppingList) }}
</label>
</div>
<span class="calendar-date-format">{{ tr.t(Sentence::CalendarDateFormat) }}</span>
<span class="calendar-date-format">{{ context.tr.t(Sentence::CalendarDateFormat) }}</span>
</div>
</div>

View file

@ -21,7 +21,7 @@
<div class="item-delete"></div>
</div>
<span class="calendar-date-format">{{ tr.t(Sentence::CalendarDateFormat) }}</span>
<span class="calendar-date-format">{{ context.tr.t(Sentence::CalendarDateFormat) }}</span>
</div>
{% endblock %}

View file

@ -2,14 +2,14 @@
{% block main_container %}
{% if let Some(user) = user %}
{% if let Some(user) = context.user %}
<div class="content" id="user-edit">
<h1>{{ tr.t(Sentence::ProfileTitle) }}</h1>
<h1>{{ context.tr.t(Sentence::ProfileTitle) }}</h1>
<form action="/{{ tr.current_lang_code() }}/user/edit" method="post">
<form action="/{{ context.tr.current_lang_code() }}/user/edit" method="post">
<label for="input-name">{{ tr.t(Sentence::Name) }}</label>
<label for="input-name">{{ context.tr.t(Sentence::Name) }}</label>
<input
id="input-name"
type="text"
@ -20,13 +20,13 @@
autofocus="autofocus">
<span></span>
<label for="input-email">{{ tr.t(Sentence::ProfileEmail) }}</label>
<label for="input-email">{{ context.tr.t(Sentence::ProfileEmail) }}</label>
<input id="input-email" type="email"
name="email" value="{{ email }}"
autocapitalize="none" autocomplete="email" autofocus="autofocus">
<span class="user-message">{{ message_email }}</span>
<label for="input-servings">{{ tr.t(Sentence::ProfileDefaultServings) }}</label>
<label for="input-servings">{{ context.tr.t(Sentence::ProfileDefaultServings) }}</label>
<input
id="input-servings"
type="number"
@ -35,15 +35,15 @@
value="{{ default_servings }}">
<span></span>
<label for="input-password-1">{{ tr.tp(Sentence::ProfileNewPassword, [Box::new(common::consts::MIN_PASSWORD_SIZE)]) }}</label>
<label for="input-password-1">{{ context.tr.tp(Sentence::ProfileNewPassword, [Box::new(common::consts::MIN_PASSWORD_SIZE)]) }}</label>
<input id="input-password-1" type="password" name="password_1" autocomplete="new-password">
<span></span>
<label for="input-password-2">{{ tr.t(Sentence::ReEnterPassword) }}</label>
<label for="input-password-2">{{ context.tr.t(Sentence::ReEnterPassword) }}</label>
<input id="input-password-2" type="password" name="password_2" autocomplete="new-password">
<span class="user-message">{{ message_password }}</span>
<input type="submit" name="commit" value="{{ tr.t(Sentence::Save) }}">
<input type="submit" name="commit" value="{{ context.tr.t(Sentence::Save) }}">
</form>
<span class="user-message">{{ message }}</span>

View file

@ -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 %}

View file

@ -5,13 +5,13 @@
<div class="content" id="recipe-view">
<h2 class="recipe-title" >{{ recipe.title }}</h2>
{% if let Some(user) = user %}
{% if let Some(user) = context.user %}
{% if crate::data::model::can_user_edit_recipe(user, recipe) %}
<a class="edit-recipe" href="/{{ tr.current_lang_code() }}/recipe/edit/{{ recipe.id }}" >Edit</a>
<a class="edit-recipe" href="/{{ context.tr.current_lang_code() }}/recipe/edit/{{ recipe.id }}" >Edit</a>
{% endif %}
{% endif %}
<span class="add-to-planner">{{ tr.t(Sentence::CalendarAddToPlanner) }}</span>
<span class="add-to-planner">{{ context.tr.t(Sentence::CalendarAddToPlanner) }}</span>
<div class="tags">
{% for tag in recipe.tags %}
@ -23,9 +23,9 @@
{% when Some(servings) %}
<span class="servings">
{% if *servings == 1 %}
{{ tr.t(Sentence::RecipeOneServing) }}
{{ context.tr.t(Sentence::RecipeOneServing) }}
{% else %}
{{ tr.tp(Sentence::RecipeSomeServings, [Box::new(**servings)]) }}
{{ context.tr.tp(Sentence::RecipeSomeServings, [Box::new(**servings)]) }}
{% endif %}
</span>
{% else %}
@ -33,7 +33,7 @@
{% match recipe.estimated_time %}
{% when Some(time) %}
{{ time ~}} {{~ tr.t(Sentence::RecipeEstimatedTimeMinAbbreviation) }}
{{ time ~}} {{~ context.tr.t(Sentence::RecipeEstimatedTimeMinAbbreviation) }}
{% else %}
{% endmatch %}
@ -41,11 +41,11 @@
{% match recipe.difficulty %}
{% when common::ron_api::Difficulty::Unknown %}
{% when common::ron_api::Difficulty::Easy %}
{{ tr.t(Sentence::RecipeDifficultyEasy) }}
{{ context.tr.t(Sentence::RecipeDifficultyEasy) }}
{% when common::ron_api::Difficulty::Medium %}
{{ tr.t(Sentence::RecipeDifficultyMedium) }}
{{ context.tr.t(Sentence::RecipeDifficultyMedium) }}
{% when common::ron_api::Difficulty::Hard %}
{{ tr.t(Sentence::RecipeDifficultyHard) }}
{{ context.tr.t(Sentence::RecipeDifficultyHard) }}
{% endmatch %}
</span>
@ -86,13 +86,13 @@
<div class="date-and-servings" >
{% include "calendar.html" %}
<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"
step="1" min="1" max="100"
value="
{% if let Some(user) = user %}
{% if let Some(user) = context.user %}
{{ user.default_servings }}
{% else %}
4
@ -106,13 +106,13 @@
checked
>
<label for="input-add-ingredients-to-shopping-list">
{{ tr.t(Sentence::CalendarAddIngredientsToShoppingList) }}
{{ context.tr.t(Sentence::CalendarAddIngredientsToShoppingList) }}
</label>
</div>
<span class="calendar-add-to-planner-success">{{ tr.t(Sentence::CalendarAddToPlannerSuccess) }}</span>
<span class="calendar-add-to-planner-already-exists">{{ tr.t(Sentence::CalendarAddToPlannerAlreadyExists) }}</span>
<span class="calendar-date-format">{{ tr.t(Sentence::CalendarDateFormat) }}</span>
<span class="calendar-add-to-planner-success">{{ context.tr.t(Sentence::CalendarAddToPlannerSuccess) }}</span>
<span class="calendar-add-to-planner-already-exists">{{ context.tr.t(Sentence::CalendarAddToPlannerAlreadyExists) }}</span>
<span class="calendar-date-format">{{ context.tr.t(Sentence::CalendarDateFormat) }}</span>
</div>
{% endblock %}

View file

@ -1,12 +1,12 @@
{% macro recipe_item(id, title, is_current) %}
<li>
<a href="/{{ tr.current_lang_code() }}/recipe/view/{{ id }}" class="recipe-item
<a href="/{{ context.tr.current_lang_code() }}/recipe/view/{{ id }}" class="recipe-item
{%~ if is_current %}
current
{% endif %}" id="recipe-{{ id }}"
>
{% if title == "" %}
{{ tr.t(Sentence::UntitledRecipe) }}
{{ context.tr.t(Sentence::UntitledRecipe) }}
{% else %}
{{ title }}
{% endif %}
@ -16,7 +16,7 @@
<div id="recipes-list">
{% if !recipes.unpublished.is_empty() %}
{{ tr.t(Sentence::UnpublishedRecipes) }}
{{ context.tr.t(Sentence::UnpublishedRecipes) }}
{% endif %}
<nav class="recipes-list-unpublished">

View file

@ -4,10 +4,10 @@
<div class="content" id="reset-password">
<form action="/reset_password" method="post">
<label for="password_field_1">Choose a new password (minimum 8 characters)</label>
<label for="password_field_1">{{ context.tr.tp(Sentence::AskResetChooseNewPassword, [Box::new(common::consts::MIN_PASSWORD_SIZE)]) }}</label>
<input id="password_field_1" type="password" name="password_1">
<label for="password_field_1">Re-enter password</label>
<label for="password_field_1">{{ context.tr.t(Sentence::ReEnterPassword) }}</label>
<input id="password_field_2" type="password" name="password_2">
{{ message_password }}

View file

@ -4,17 +4,17 @@
<div class="content" id="sign-in">
<h1>{{ tr.t(Sentence::SignInTitle) }}</h1>
<h1>{{ context.tr.t(Sentence::SignInTitle) }}</h1>
<form action="/signin" method="post">
<label for="input-email">{{ tr.t(Sentence::EmailAddress) }}</label>
<label for="input-email">{{ context.tr.t(Sentence::EmailAddress) }}</label>
<input id="input-email" type="email" name="email" value="{{ email }}"
autocapitalize="none" autocomplete="email" autofocus="autofocus">
<label for="input-password">{{ tr.t(Sentence::Password) }}</label>
<label for="input-password">{{ context.tr.t(Sentence::Password) }}</label>
<input id="input-password" type="password" name="password" autocomplete="current-password">
<input type="submit" value="{{ tr.t(Sentence::SignInMenu) }}">
<input type="submit" value="{{ context.tr.t(Sentence::SignInMenu) }}">
</form>
<span class="user-message">{{ message }}</span>

View file

@ -4,10 +4,10 @@
<div class="content" id="sign-up">
<h1>{{ tr.t(Sentence::SignUpTitle) }}</h1>
<h1>{{ context.tr.t(Sentence::SignUpTitle) }}</h1>
<form action="/signup" method="post">
<label for="input-email">{{ tr.t(Sentence::EmailAddress) }}</label>
<label for="input-email">{{ context.tr.t(Sentence::EmailAddress) }}</label>
<input id="input-email" type="email"
name="email" value="{{ email }}"
autocapitalize="none" autocomplete="email" autofocus="autofocus"
@ -15,16 +15,16 @@
<span class="user-message">{{ message_email }}</span>
<label for="input-password-1">
{{ tr.tp(Sentence::ChooseAPassword, [Box::new(common::consts::MIN_PASSWORD_SIZE)]) }}
{{ context.tr.tp(Sentence::ChooseAPassword, [Box::new(common::consts::MIN_PASSWORD_SIZE)]) }}
</label>
<input id="input-password-1" type="password" name="password_1" autocomplete="new-password">
<span></span>
<label for="input-password-2">{{ tr.t(Sentence::ReEnterPassword) }}</label>
<label for="input-password-2">{{ context.tr.t(Sentence::ReEnterPassword) }}</label>
<input id="input-password-2" type="password" name="password_2" autocomplete="new-password">
<span class="user-message">{{ message_password }}</span>
<input type="submit" name="commit" value="{{ tr.t(Sentence::SignUpButton) }}">
<input type="submit" name="commit" value="{{ context.tr.t(Sentence::SignUpButton) }}">
</form>
<span class="user-message">{{ message }}</span>

View file

@ -1 +1 @@
<a class="title" href="/{{ tr.current_lang_code() }}/"><img class="logo" src="/static/logo.svg" alt="logo">{{ tr.t(Sentence::MainTitle) }}</a>
<a class="title" href="/{{ context.tr.current_lang_code() }}/"><img class="logo" src="/static/logo.svg" alt="logo">{{ context.tr.t(Sentence::MainTitle) }}</a>