2021-05-17 16:27:27 -04:00
|
|
|
{# Base template for (almost) all NetBox pages #}
|
|
|
|
{% load static %}
|
|
|
|
{% load helpers %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2024-01-22 12:09:15 -05:00
|
|
|
{% load django_htmx %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<!DOCTYPE html>
|
2021-07-24 10:31:46 -07:00
|
|
|
<html
|
|
|
|
lang="en"
|
2021-09-01 15:22:38 -07:00
|
|
|
data-netbox-url-name="{{ request.resolver_match.url_name }}"
|
2021-09-01 09:34:33 -04:00
|
|
|
data-netbox-base-path="{{ settings.BASE_PATH }}"
|
2021-09-29 17:44:28 -07:00
|
|
|
{% with preferences|get_key:'ui.colormode' as color_mode %}
|
|
|
|
{% if color_mode == 'dark'%}
|
|
|
|
data-netbox-color-mode="dark"
|
|
|
|
{% elif color_mode == 'light' %}
|
|
|
|
data-netbox-color-mode="light"
|
|
|
|
{% else %}
|
|
|
|
data-netbox-color-mode="unset"
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2021-07-24 10:31:46 -07:00
|
|
|
>
|
2021-03-13 02:19:42 -07:00
|
|
|
<head>
|
2021-05-17 16:27:27 -04:00
|
|
|
<meta charset="UTF-8" />
|
2024-01-17 16:25:42 -05:00
|
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, viewport-fit=cover" />
|
2021-05-17 16:27:27 -04:00
|
|
|
|
|
|
|
{# Page title #}
|
2023-07-29 03:30:25 +07:00
|
|
|
<title>{% block title %}{% trans "Home" %}{% endblock %} | NetBox</title>
|
2021-05-17 16:27:27 -04:00
|
|
|
|
2021-08-01 00:27:27 -07:00
|
|
|
<script type="text/javascript">
|
2022-08-29 14:40:03 -07:00
|
|
|
window.CSRF_TOKEN = "{{ csrf_token }}";
|
2021-07-24 10:31:46 -07:00
|
|
|
</script>
|
|
|
|
|
2021-05-17 16:27:27 -04:00
|
|
|
{# Static resources #}
|
2021-03-13 02:19:42 -07:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
2021-12-21 13:00:52 -05:00
|
|
|
href="{% static 'netbox-external.css'%}?v={{ settings.VERSION }}"
|
2021-05-07 16:12:27 -07:00
|
|
|
onerror="window.location='{% url 'media_failure' %}?filename=netbox-external.css'"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
2024-01-17 16:25:42 -05:00
|
|
|
href="{% static 'netbox.css'%}?v={{ settings.VERSION }}"
|
|
|
|
onerror="window.location='{% url 'media_failure' %}?filename=netbox.css'"
|
2021-08-18 16:17:50 -07:00
|
|
|
/>
|
2021-03-13 02:19:42 -07:00
|
|
|
<link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
|
2021-12-17 17:31:36 +03:00
|
|
|
<link rel="apple-touch-icon" type="image/png" href="{% static 'netbox_touch-icon-180.png' %}" />
|
2021-05-17 16:27:27 -04:00
|
|
|
|
|
|
|
{# Javascript #}
|
2021-03-13 02:19:42 -07:00
|
|
|
<script
|
2021-04-20 01:18:24 -07:00
|
|
|
type="text/javascript"
|
2021-12-21 13:00:52 -05:00
|
|
|
src="{% static 'netbox.js' %}?v={{ settings.VERSION }}"
|
2021-04-15 16:52:30 -07:00
|
|
|
onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
|
|
|
|
</script>
|
2024-01-22 12:09:15 -05:00
|
|
|
{% django_htmx_script %}
|
2021-05-17 16:27:27 -04:00
|
|
|
|
|
|
|
{# Additional <head> content #}
|
2021-04-20 01:18:24 -07:00
|
|
|
{% block head %}{% endblock %}
|
|
|
|
</head>
|
2021-08-05 09:35:36 -07:00
|
|
|
|
2024-01-17 16:25:42 -05:00
|
|
|
<body
|
|
|
|
{% if preferences|get_key:'ui.colormode' == 'dark' %}
|
|
|
|
data-bs-theme="dark"
|
|
|
|
{% endif %}
|
|
|
|
>
|
2021-05-17 16:27:27 -04:00
|
|
|
|
|
|
|
{# Page layout #}
|
2021-04-20 01:18:24 -07:00
|
|
|
{% block layout %}{% endblock %}
|
2021-05-17 16:27:27 -04:00
|
|
|
|
|
|
|
{# Additional Javascript #}
|
2021-03-13 02:19:42 -07:00
|
|
|
{% block javascript %}{% endblock %}
|
2021-05-17 16:27:27 -04:00
|
|
|
|
|
|
|
{# User messages #}
|
|
|
|
{% include 'inc/messages.html' %}
|
|
|
|
|
|
|
|
{# Data container #}
|
2021-04-20 01:18:24 -07:00
|
|
|
<div id="netbox-data" style="display: none!important; visibility: hidden!important">
|
2021-05-17 16:27:27 -04:00
|
|
|
{% block data %}{% endblock %}
|
2021-04-20 01:18:24 -07:00
|
|
|
</div>
|
2021-05-17 16:27:27 -04:00
|
|
|
|
2021-03-13 02:19:42 -07:00
|
|
|
</body>
|
2016-03-01 11:23:03 -05:00
|
|
|
</html>
|