Introduce template block for nav_pills #15406
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
first of all thanks for your hard work on this software! It excels in many aspects: it's well organized, clean and transparent and very well documented. Setting up a production instance (Docker-less) with direct dev-to-production deployment was still an enormous task. I noticed too late that settings_docker is still what I need even without Docker. But well - that's fair - you cannot expect to get everything served for free on a silver plate.. 😉
There's just a single big issue I have and that's about the layout. From top to bottom, there's a menu with some items, then there's a breadcrumps bar and then - there's (often) once another menu bar - right in the middle of the page where you normally expect content. Sometimes there are messages shown above it, which moves that bar even further down.
This is somewhat odd - at least you don't see that very often. More typically it's Logo/Header > Menubar 1 > Menubar 2 > Breadcrumps > Notifications > Content > Footer
That's what I wanted to achieve at least - unfortunately it cannot be reasonably done with CSS only, because the secondary menu bar ("nav-pills") is inside the main content container and you cannot reasonably get it out of that and re-order.
(it's possible to set body to display:flex, flex-dir:column, set display:contents for main-content and then order:1,2,3,4 for the elements, but that's ugly and then you don't have a main content container anymore for border/background differentiation)
Looking at the templates it appeared straightforward to introduce a new block nav_pills for the 2nd menu-bar, I did so and it worked well. With this PR it will be possible to make a single change in base.html in order to move the nav-pills bar above the breadcrumps (needs appropriate CSS of course).
I hope it's okay the way I did it (no experience with Django) - the one case I wasn't able to figure out in limited time is the project settings view (
/settings/<project-name>/
) - is this creating the pills dynamically?For illustration, here's the final result:
(the site is for translation of our own software, not a commercial service, the breakdown of OneSky forced us into it..)
Best wishes,
sw