Fixed #35798, Refs #31641 -- Prevented admin navigation sidebar loading flicker.

Thank you to Mario Munoz and Thibaud Colas for the testing and review.
This commit is contained in:
Gavin Wahl 2022-11-02 16:29:17 -06:00 committed by Sarah Boyce
parent ef56e1ff6d
commit 747b417a22
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,6 @@
{% endblock %}
{% if not is_popup and is_nav_sidebar_enabled %}
<link rel="stylesheet" href="{% static "admin/css/nav_sidebar.css" %}">
<script src="{% static 'admin/js/nav_sidebar.js' %}" defer></script>
{% endif %}
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}

View File

@ -1,4 +1,4 @@
{% load i18n %}
{% load i18n static %}
<button class="sticky toggle-nav-sidebar" id="toggle-nav-sidebar" aria-label="{% translate 'Toggle navigation' %}"></button>
<nav class="sticky" id="nav-sidebar" aria-label="{% translate 'Sidebar' %}">
<input type="search" id="nav-filter"
@ -6,3 +6,4 @@
aria-label="{% translate 'Filter navigation items' %}">
{% include 'admin/app_list.html' with app_list=available_apps show_changelinks=False %}
</nav>
<script src="{% static 'admin/js/nav_sidebar.js' %}"></script>