Skip to content

Commit d3002a5

Browse files
undeMalumm-aciek
andauthored
Keep breadcrumbs visible on mobile (#326)
Co-authored-by: Maciej Olko <maciej.olko@gmail.com>
1 parent 60c31d0 commit d3002a5

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

python_docs_theme/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h3>{{ _('Navigation') }}</h3>
1414
</li>
1515
{%- endfor %}
1616
{%- block rootrellink %}
17-
<li><img src="{{ pathto('_static/' ~ theme_root_icon, 1) }}" alt="{{ theme_root_icon_alt_text }}" style="vertical-align: middle; margin-top: -1px"></li>
17+
<li class="root-icon"><img src="{{ pathto('_static/' ~ theme_root_icon, 1) }}" alt="{{ theme_root_icon_alt_text }}" style="vertical-align: middle; margin-top: -1px"></li>
1818
<li><a href="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
1919
<li class="switchers">
2020
<div class="language_switcher_placeholder"></div>

python_docs_theme/static/pydoctheme.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,16 @@ div.genindex-jumpbox a {
564564
margin-inline-start: 1rem;
565565
margin-inline-end: 0;
566566
}
567-
/* Remove sidebar and top related bar */
568-
div.related, div.sphinxsidebar {
567+
/* Remove sidebar and desktop-only related controls */
568+
div.related li.right, div.related li.switchers, div.sphinxsidebar {
569569
display: none;
570570
}
571+
div.related .root-icon, div.related .root-icon + li {
572+
display: none;
573+
}
574+
div.related {
575+
line-height: 1.3;
576+
}
571577
/* Anchorlinks are not hidden by fixed-positioned navbar when scrolled to */
572578
html {
573579
scroll-padding-top: 40px;

0 commit comments

Comments
 (0)