Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add switchers to desktop view
Signed-off-by: Olga Bulat <obulat@gmail.com>
  • Loading branch information
obulat committed May 2, 2021
commit 611a1dc95de203839545cd7dd1b160b8adb73918
34 changes: 19 additions & 15 deletions python_docs_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@
<div class="related" role="navigation" aria-label="related navigation">
<h3>{{ _('Navigation') }}</h3>
<ul>
{%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}
</li>
{%- endfor %}
{%- block rootrellink %}
<li><img src="{{ pathto('_static/py.svg', 1) }}" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
{% if theme_root_include_title %}
<a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
{% endif %}
{%- endblock %}
{%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}
</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}
</li>
{%- endfor %}
{%- block rootrellink %}
<li><img src="{{ pathto('_static/py.svg', 1) }}" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
<li class="switchers">
<div class="language_switcher_placeholder"></div>
<div class="version_switcher_placeholder"></div>
</li>
<li>
{% if theme_root_include_title %}
<a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
{% endif %}
</li>
{%- endblock %}
{%- for parent in parents %}
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
{%- endfor %}
Expand Down
14 changes: 14 additions & 0 deletions python_docs_theme/static/pydoctheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ div.related ~ div.related {
border-bottom: none;
}

.related .switchers {
display: inline-flex;
}

.switchers > div {
margin-right: 5px;
}

.version_switcher_placeholder,
.language_switcher_placeholder {
padding-left: 3px;
background-color: white;
}

.inline-search {
display: inline;
}
Expand Down