doc: improve visibility of doc version menu

Move the doc version selection menu from the bottom of the left nav menu
to above the TOC menu, making it more obvious.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2019-04-03 15:04:04 -07:00 committed by Anas Nashif
parent f35b854345
commit f38aa2e301
4 changed files with 37 additions and 34 deletions

View file

@ -8,3 +8,7 @@
{% endif %}
{{ super() }}
{% endblock %}
{% block menu %}
{% include "zversions.html" %}
{{ super() }}
{% endblock %}

View file

@ -1,28 +1 @@
{# Add rst-badge after rst-versions for small badge style. #}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Zephyr Project</span>
v: {{ current_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
{% for slug, url in versions %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %}
</dl>
<dl>
<dt>{{ _('On zephyrproject.org') }}</dt>
<dd>
<a href="https://www.zephyrproject.org/">Project Home</a>
</dd>
<dd>
<a href="https://www.zephyrproject.org/developers/#downloads">Downloads</a>
</dd>
<dd>
<a href="https://github.com/zephyrproject-rtos/zephyr/releases">Releases</a>
</dd>
</dl>
</div>
</div>
{# remove from this spot#}

28
doc/_templates/zversions.html vendored Normal file
View file

@ -0,0 +1,28 @@
{# Add rst-badge after rst-versions for small badge style. #}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Zephyr Project</span>
v: {{ current_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Document Release Versions') }}</dt>
{% for slug, url in versions %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %}
</dl>
<dl>
<dt>{{ _('zephyrproject.org Links') }}</dt>
<dd>
<a href="https://www.zephyrproject.org/">Project Home</a>
</dd>
<dd>
<a href="https://www.zephyrproject.org/developers/#downloads">Downloads</a>
</dd>
<dd>
<a href="https://github.com/zephyrproject-rtos/zephyr/releases">Releases</a>
</dd>
</dl>
</div>
</div>

View file

@ -23,13 +23,11 @@
}
*/
/* tweak doc version selection
/* tweak doc version selection */
.rst-versions {
position: static;
border-top: none;
padding: 0px;
position: static !important;
}
*/
.rst-versions .rst-current-version {
padding: 5px;
@ -135,7 +133,7 @@ th,td {
}
/* doxygenXX item color tweaks, light blue background with dark blue top border */
.rst-content dl:not(.docutils) dl dt, dl:not(.docutils) dt {
.rst-content dl:not(.docutils) dl dt, dl:not(.docutils,.rst-other-versions) dt {
background: #e7f2fa !important;
border-top: none !important;
border-left: none !important; */