fix(ui): section tabs above the breadcrumb, so the Ansible tab strip holds still (#5214)
The tabs were drawn in each page's content block, which base.html renders after the breadcrumb, so on every nested Ansible page the strip moved down a line. base.html now has a section_tabs block above the breadcrumb, and every Ansible page fills it. A guard in test_breadcrumbs.py fails any page that calls a tabs macro outside that block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,9 +73,10 @@
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{# A section's own pages as tabs under the crumbs (#5328): items are
|
||||
(key, label, href); the one whose key is `active` is the current page.
|
||||
Links, not a tablist: each tab is its own page. #}
|
||||
{# A section's own pages as tabs (#5328): items are (key, label, href); the
|
||||
one whose key is `active` is the current page. Links, not a tablist: each
|
||||
tab is its own page. Call it in base.html's section_tabs block, which sits
|
||||
above the breadcrumb, so the strip stays put as the trail grows. #}
|
||||
{% macro section_tabs(items, active, label) -%}
|
||||
<nav class="section-tabs" aria-label="{{ label }}">
|
||||
{%- for key, text, href in items %}
|
||||
|
||||
Reference in New Issue
Block a user