diff --git a/src/unfold/sites.py b/src/unfold/sites.py index 9257131a7..e8e91597f 100644 --- a/src/unfold/sites.py +++ b/src/unfold/sites.py @@ -2,7 +2,6 @@ import hashlib import time from collections.abc import Callable -from http import HTTPStatus from typing import Any from urllib.parse import parse_qs, urlparse @@ -64,11 +63,6 @@ def get_urls(self) -> list[URLPattern]: urlpatterns = ( [ path("search/", self.admin_view(self.search), name="search"), - path( - "toggle-sidebar/", - self.admin_view(self.toggle_sidebar), - name="toggle_sidebar", - ), ] + extra_urls + super().get_urls() @@ -171,16 +165,6 @@ def index( request, self.index_template or "admin/index.html", context ) - def toggle_sidebar( - self, request: HttpRequest, extra_context: dict[str, Any] | None = None - ) -> HttpResponse: - if "toggle_sidebar" not in request.session: - request.session["toggle_sidebar"] = True - else: - request.session["toggle_sidebar"] = not request.session["toggle_sidebar"] - - return HttpResponse(status=HTTPStatus.OK) - def _search_apps( self, app_list: list[dict[str, Any]], search_term: str ) -> list[SearchResult]: diff --git a/src/unfold/templates/unfold/helpers/welcomemsg.html b/src/unfold/templates/unfold/helpers/welcomemsg.html index 89f73bbef..b548f4fd5 100644 --- a/src/unfold/templates/unfold/helpers/welcomemsg.html +++ b/src/unfold/templates/unfold/helpers/welcomemsg.html @@ -3,7 +3,7 @@
{% if is_nav_sidebar_enabled %} - + dock_to_right diff --git a/src/unfold/templates/unfold/layouts/skeleton.html b/src/unfold/templates/unfold/layouts/skeleton.html index d4d63e7c6..c1211a6dc 100644 --- a/src/unfold/templates/unfold/layouts/skeleton.html +++ b/src/unfold/templates/unfold/layouts/skeleton.html @@ -59,7 +59,17 @@ {% endblock %} - + {% if colors %}