mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
80 lines
2.6 KiB
HTML
80 lines
2.6 KiB
HTML
{% load django_vite %}
|
|
|
|
{% load i18n %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
{% load theming_tags %}
|
|
{% load custom_tags %}
|
|
|
|
{% theme_values request as theme_values %}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="{{ LANGUAGE_CODE }}">
|
|
<head>
|
|
<title>Tandoor</title>
|
|
<meta name="description" content="{% trans 'Tandoor Recipe Manager' %}">
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, minimal-ui, shrink-to-fit=no">
|
|
<meta name="robots" content="noindex,nofollow"/>
|
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
|
|
|
<link rel="manifest" crossorigin="use-credentials" href="{% url 'web_manifest' %}">
|
|
|
|
<link rel="icon" href="{{ theme_values.logo_color_svg }}">
|
|
<link rel="icon" href="{{ theme_values.logo_color_32 }}" sizes="32x32">
|
|
<link rel="icon" href="{{ theme_values.logo_color_128 }}" sizes="128x128">
|
|
<link rel="icon" href="{{ theme_values.logo_color_192 }}" sizes="192x192">
|
|
<link rel="apple-touch-icon" href="{{ theme_values.logo_color_180 }}" sizes="180x180">
|
|
|
|
<meta name="msapplication-TileColor" content="{{ theme_values.nav_bg_color }}">
|
|
<meta name="msapplication-TileImage" content="{{ theme_values.logo_color_144 }}">
|
|
|
|
<meta name="theme-color" content="{{ theme_values.nav_bg_color }}">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
|
|
|
{% if theme_values.custom_theme %}
|
|
<link id="id_custom_space_css" href="{{ theme_values.custom_theme }}" rel="stylesheet">
|
|
{% endif %}
|
|
|
|
<style>
|
|
{% if request.user.userpreference.theme == 'TANDOOR_DARK' %}
|
|
/* vueform/multiselect */
|
|
/* when append to body is true the multiselects dropdown does not recognize the .v-theme--dark condition and renders a white background otherwise */
|
|
|
|
.multiselect-dropdown, .multiselect-options, .multiselect-option {
|
|
background: #212121 !important;
|
|
}
|
|
{% endif %}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div id="app"></div>
|
|
|
|
{% vite_hmr_client %}
|
|
{% vite_asset 'src/apps/tandoor/main.ts' %}
|
|
|
|
<script type="application/javascript">
|
|
localStorage.setItem('BASE_PATH', "{% base_path request 'base' %}")
|
|
|
|
|
|
window.addEventListener("load", () => {
|
|
if ("serviceWorker" in navigator) {
|
|
navigator.serviceWorker.register("{% url 'service_worker' %}", {scope: "{% base_path request 'base' %}" + '/'}).then(function (reg) {
|
|
}).catch(function (err) {
|
|
console.warn('Error whilst registering service worker', err);
|
|
});
|
|
} else {
|
|
console.warn('service worker not in navigator');
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
|