-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathbase_site.html
41 lines (40 loc) · 1.71 KB
/
base_site.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% extends "admin/base.html" %}
{% load static baton_tags %}
{% load i18n %}
{% block title %}
{% if subtitle %}{{ subtitle }} |{% endif %}
{{ title }} | {{ site_title|default:_("Django site admin") }}
{% endblock title %}
{% block extrahead %}
{{ block.super }}
{% baton_config as conf %}
{{ conf | json_script:"baton-config" }}
<script charset="utf-8">
(function () {
// immediately set the theme mode to avoid flashes
var systemTheme = window.matchMedia("(prefers-color-scheme: dark)");
var theme = JSON.parse(document.getElementById('baton-config').textContent).forceTheme || localStorage.getItem('baton-theme') || (systemTheme.matches ? 'dark' : 'light');
document.getElementsByTagName('html')[0].setAttribute('data-bs-theme', theme);
})()
</script>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<script src="{% static 'baton/app/dist/baton.min.js' %}"></script>
<!-- <script src="http://localhost:8080/static/baton/app/dist/baton.min.js"></script> -->
<script src="{% static 'baton/js_snippets/init_baton.js' %}"></script>
{% baton_theme %}
{% if LANGUAGE_BIDI %}
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/rtl.css' %}">
<script src="{% static 'baton/js_snippets/rtl.js' %}"></script>
{% endif %}
{% endblock extrahead %}
{% block branding %}
<div class="baton-startup-overlay"></div>
<h1 id="site-name">
<a href="{% url 'admin:index' %}">{{ site_header|default:_("Django administration") }}</a>
</h1>
{% endblock branding %}
{% block nav-global %}
{% endblock nav-global %}
{% block footer %}
{% footer %}
{% endblock footer %}