deactivate "skip to main content" link and dark mode

I am using one of my django instances on a display with fixed width / height, and the page is built to cover the screen 100% in fullscreen mode. This works well since many years, but due to some package update that I really needed I upgraded to django 5. Now in the admin, the “skip to main content” link destroys my layout. Can I somehow remove the “feature”? I know. I could just copay the main admin base.html into my templates/admin/ directory and remove the lines manually. But is there a smoother way?

Also, while we are at it, I want to deactivate the dark mode for the admin completely. But the tag in the base.html can only be manipulated, if I overwrite the whole file, which seems a little bit dramatic just to insert a data-theme="light" switch …?

I agree and I think the “Skip to main content” feature should have a settings toggle to switch it on/off. Looking at base.html it doesn’t seem to have such a capability. It ought to be a simple fix to put it in an {% if skip %} block.

On a design note, looking at the ticket #33726 which created it, the justification seems to be related to skipping navigation in the sidebar. Perhaps it should have been tied to switching on the sidebar?

1 Like

Is the Skip to Content link visible in your Admin screens? I think it’s supposed to be invisible by default, as you can see by its CSS django/django/contrib/admin/static/admin/css/base.css at main · django/django · GitHub