1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/templates/base/base.html
Jeremy Stretch 239d21870b Closes #14871: Complete work on UI cleanup (#15341)
* Fix left padding of login button in top menu

* Relocate "add" buttons for embedded object tables

* Remove unused data template block & getNetboxData() utility function

* Remove bottom margin from last <p> element in rendered Markdown inside a table cell

* Prevent TomSelect from initializing on <select> elements with a size

* Fix styling of dropdown menu button for circuit commit rate

* Change .color-block to display: inline-block

* Delete unused static asset

* Improve contrast between menu group headings & items

* Remove custom color for attr-table row headings

* Fix border color of copy-to-clipboard button

* Fix toast text color in dark mode

* Fix rack elevation label/image toggles

* Increase border radius for small buttons

* Fix object selector
2024-03-04 15:55:01 -05:00

75 lines
2.1 KiB
HTML

{# Base template for (almost) all NetBox pages #}
{% load static %}
{% load helpers %}
{% load i18n %}
{% load django_htmx %}
<!DOCTYPE html>
<html
lang="en"
data-netbox-url-name="{{ request.resolver_match.url_name }}"
data-netbox-base-path="{{ settings.BASE_PATH }}"
{% 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 %}
>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, viewport-fit=cover" />
{# Page title #}
<title>{% block title %}{% trans "Home" %}{% endblock %} | NetBox</title>
<script type="text/javascript">
window.CSRF_TOKEN = "{{ csrf_token }}";
</script>
{# Static resources #}
<link
rel="stylesheet"
href="{% static 'netbox-external.css'%}?v={{ settings.VERSION }}"
onerror="window.location='{% url 'media_failure' %}?filename=netbox-external.css'"
/>
<link
rel="stylesheet"
href="{% static 'netbox.css'%}?v={{ settings.VERSION }}"
onerror="window.location='{% url 'media_failure' %}?filename=netbox.css'"
/>
<link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
<link rel="apple-touch-icon" type="image/png" href="{% static 'netbox_touch-icon-180.png' %}" />
{# Javascript #}
<script
type="text/javascript"
src="{% static 'netbox.js' %}?v={{ settings.VERSION }}"
onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
</script>
{% django_htmx_script %}
{# Additional <head> content #}
{% block head %}{% endblock %}
</head>
<body
{% if preferences|get_key:'ui.colormode' == 'dark' %}
data-bs-theme="dark"
{% endif %}
>
{# Page layout #}
{% block layout %}{% endblock %}
{# Additional Javascript #}
{% block javascript %}{% endblock %}
{# User messages #}
{% include 'inc/messages.html' %}
</body>
</html>