Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use semantic markup in flyout #1164

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
53 changes: 26 additions & 27 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,37 @@
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
<h3 class="label" id="version-versions">{{ _('Versions') }}</h3>
<ul aria-labeledby="version-versions">
{%- if test_versions %}
{%- for version in test_versions %}
<dd><a href="#">{{ version }}</a></dd>
<li><a href="#">{{ version }}</a></li>
{%- endfor %}
{%- else %}
<dd><a href="#">latest</a></dd>
<dd><a href="#">1.0</a></dd>
<dd><a href="#">1.1</a></dd>
<li><a href="#">latest</a></li>
<li><a href="#">1.0</a></li>
<li><a href="#">1.1</a></li>
{%- endif %}
</dl>
<dl>
<dt>{{ _('Downloads') }}</dt>
<dd><a href="#">PDF</a></dd>
<dd><a href="#">ePub</a></dd>
<dd><a href="#">HTML</a></dd>
</dl>
<dl>
{#- Translators: The phrase "Read the Docs" is not translated #}
<dt>{{ _('On Read the Docs') }}</dt>
<dd>
<a href="#">{{ _('Project Home') }}</a>
</dd>
<dd>
<a href="#">{{ _('Builds') }}</a>
</dd>
</dl>
<dl>
<dt>Debug</dt>
<dd><a href="#" data-toggle="rst-debug-badge">Swap badge position</a></dd>
</dl>
</ul>

<h3 class="label" id="version-downloads">{{ _('Downloads') }}</h3>
<ul aria-labeledby="version-downloads">
<li><a href="#">PDF</a></li>
<li><a href="#">ePub</a></li>
<li><a href="#">HTML</a></li>
</ul>

{#- Translators: The phrase "Read the Docs" is not translated #}
<h3 class="label" id="version-rtd-proj">{{ _('On Read the Docs') }}</h3>
<ul aria-labeledby="version-rtd-proj">
<li><a href="#">{{ _('Project Home') }}</a></li>
<li><a href="#">{{ _('Builds') }}</a></li>
</ul>

<h3 class="label" id="version-debug">Debug</h3>
<ul aria-labeledby="version-debug">
<li><a href="#" data-toggle="rst-debug-badge">Swap badge position</a></li>
</ul>
</div>
</div>
{%- endif %}
Expand Down
32 changes: 15 additions & 17 deletions sphinx_rtd_theme/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,26 @@
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
<h3 class="label" id="version-versions">{{ _('Versions') }}</h3>
<ul aria-labeledby="version-versions">
{% for slug, url in versions %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
<li><a href="{{ url }}">{{ slug }}</a></li>
{% endfor %}
</dl>
<dl>
<dt>{{ _('Downloads') }}</dt>
</ul>

<h3 class="label" id="version-downloads">{{ _('Downloads') }}</h3>
<ul aria-labeledby="version-downloads">
{% for type, url in downloads %}
<dd><a href="{{ url }}">{{ type }}</a></dd>
<li><a href="{{ url }}">{{ type }}</a></li>
{% endfor %}
</dl>
<dl>
</ul>

<h3 class="label" id="version-rtd-proj">{{ _('On Read the Docs') }}</h3>
<ul aria-labeledby="version-rtd-proj">
{# Translators: The phrase "Read the Docs" is not translated #}
<dt>{{ _('On Read the Docs') }}</dt>
<dd>
<a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">{{ _('Project Home') }}</a>
</dd>
<dd>
<a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">{{ _('Builds') }}</a>
</dd>
</dl>
<li><a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">{{ _('Project Home') }}</a></li>
<li><a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">{{ _('Builds') }}</a></li>
</ul>
</div>
</div>
{% endif %}
5 changes: 4 additions & 1 deletion src/sass/_theme_badge.sass
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
margin: 20px 0
padding: 0
border-top: solid 1px lighten($menu-background-color, 5%)
dd
li
display: inline-block
margin: 0
a
Expand Down Expand Up @@ -85,6 +85,9 @@
padding: 0 $base-line-height / 4
display: block
text-align: center
h3.label
margin-bottom: 0
color: $nav-caption

+media($tablet)
.rst-versions
Expand Down