Files
recipes/cookbook/templates/base.html
2025-07-03 16:29:54 +02:00

138 lines
4.6 KiB
HTML

{% load static %}
{% load i18n %}
{% load theming_tags %}
{% load custom_tags %}
{% theme_values request as theme_values %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}
{% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
<meta name="robots" content="noindex,nofollow"/>
<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">
<link rel="manifest" crossorigin="use-credentials" href="{% url 'web_manifest' %}">
<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"/>
<!-- Bootstrap 4 -->
<link id="id_main_css" href="{{ theme_values.theme }}" rel="stylesheet">
{% if theme_values.custom_theme %}
<link id="id_custom_css" href="{{ theme_values.custom_theme }}" rel="stylesheet">
{% endif %}
<link href="{% static 'css/app.min.css' %}" rel="stylesheet">
<script src="{% static 'js/jquery-3.5.1.min.js' %}"></script>
<script src="{% static 'js/popper.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<!-- Select2 for use with django autocomplete light -->
<link href="{% static 'css/select2.min.css' %}" rel="stylesheet"/>
<script src="{% static 'js/select2.min.js' %}"></script>
<!-- Bootstrap theme for select2 -->
<link rel="stylesheet" href="{% static 'css/select2-bootstrap.css' %}"/>
<link rel="stylesheet" href="{% static 'themes/select2-bootstrap-theme.css' %}"/>
<!-- Fontawesome icons -->
<link rel="stylesheet" href="{% static "fontawesome/fontawesome_all.min.css" %}">
{% block extra_head %} <!-- block for templates to put stuff into header -->
{% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg {{ theme_values.nav_text_class }}"
id="id_main_nav"
style="{{ theme_values.sticky_nav }}; background-color: {{ theme_values.nav_bg_color }}">
{% if not request.user.userpreference.left_handed %}
{% if not request.user.is_authenticated or request.user.userpreference.nav_show_logo %}
<a class="navbar-brand p-0 me-2 justify-content-center" href="{% base_path request 'base' %}"
aria-label="Tandoor">
<img class="brand-icon" src="{{ theme_values.nav_logo }}" alt="Logo">
</a>
{% endif %}
{% endif %}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</nav>
<div class="container-fluid mt-2 mt-md-3 mt-xl-3 mt-lg-3{% if request.user.userpreference.left_handed %} left-handed {% endif %}"
id="id_base_container">
<div class="row">
<div class="col-xl-2 d-none d-xl-block">
{% block content_xl_left %}
{% endblock %}
</div>
<div class="col-xl-8 col-12">
{% for message in messages %}
<div class="row">
<div class="col col-md-12">
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
</div>
{% endfor %}
{% block content %}
{% endblock %}
</div>
<div class="col-xl-2 d-none d-xl-block">
{% block content_xl_right %}
{% endblock %}
</div>
</div>
{% block content_fluid %}
{% endblock %}
{% user_prefs request as prefs %}
{{ prefs|json_script:'user_preference' }}
</div>
{% block script %}
{% endblock script %}
<script type="application/javascript">
</script>
<style>
#id_base_container {
padding-bottom: env(safe-area-inset-bottom);
}
</style>
</body>
</html>