base.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% load static %} {% load helpers %}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <title>{% block title %}Home{% endblock %} | NetBox</title>
  6. <link
  7. rel="stylesheet"
  8. href="{% static 'netbox-external.css'%}"
  9. onerror="window.location='{% url 'media_failure' %}?filename=netbox-external.css'"
  10. />
  11. <link
  12. rel="stylesheet"
  13. href="{% static 'netbox-light.css'%}"
  14. onerror="window.location='{% url 'media_failure' %}?filename=netbox-light.css'"
  15. />
  16. <link
  17. rel="stylesheet"
  18. href="{% static 'netbox-dark.css'%}"
  19. onerror="window.location='{% url 'media_failure' %}?filename=netbox-dark.css'"
  20. />
  21. <link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
  22. <meta charset="UTF-8" />
  23. <meta
  24. name="viewport"
  25. content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"
  26. />
  27. <script
  28. type="text/javascript"
  29. src="{% static 'netbox.js' %}"
  30. onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
  31. </script>
  32. {% block head %}{% endblock %}
  33. </head>
  34. {% with color_mode=preferences|get_key:'ui.colormode' %}
  35. <body{%if color_mode == 'dark'%} data-netbox-color-mode="dark"{% elif color_mode == 'light' %} data-netbox-color-mode="light"{% endif %}>
  36. {% block layout %}{% endblock %}
  37. {% block javascript %}{% endblock %}
  38. {% include './messages.html' %}
  39. <div id="netbox-data" style="display: none!important; visibility: hidden!important">
  40. {% block data %}{% endblock %}
  41. </div>
  42. </body>
  43. {% endwith %}
  44. </html>