doc: make doc version selector more obvious

Move the doc version selector menu higher on the left nav to make it
more visible (from its prior bottom of the nav menu)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2019-04-04 14:32:53 -07:00 committed by David Kinder
parent 5531673f79
commit fe470cfe23
4 changed files with 41 additions and 29 deletions

25
doc/_templates/aversions.html vendored Normal file
View File

@ -0,0 +1,25 @@
{# 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"> Project ACRN</span>
v: {{ current_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Document Versions') }}</dt>
{% for slug, url in versions %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %}
</dl>
<dl>
<dt>{{ _('projectacrn.org links') }}</dt>
<dd>
<a href="https://www.projectacrn.org/">Project Home</a>
</dd>
<dd>
<a href="https://github.com/projectacrn/acrn-hypervisor/wiki">Wiki</a>
</dd>
</dl>
</div>
</div>

14
doc/_templates/layout.html vendored Normal file
View File

@ -0,0 +1,14 @@
{% extends "!layout.html" %}
{% block document %}
{% if is_release %}
<div class="wy-alert wy-alert-danger">
The <a href="/{{ pagename }}.html">latest development version</a>
of this page may be more current than this released {{ version }} version.
</div>
{% endif %}
{{ super() }}
{% endblock %}
{% block menu %}
{% include "aversions.html" %}
{{ super() }}
{% endblock %}

View File

@ -1,25 +1 @@
{# Add rst-badge after rst-versions for small badge style. #} {# wipe out the versions.html from the rtd theme #}
<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"> Project ACRN</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 projectacrn.org') }}</dt>
<dd>
<a href="https://www.projectacrn.org/">Project Home</a>
</dd>
<dd>
<a href="https://github.com/projectacrn/acrn-hypervisor/wiki">Wiki</a>
</dd>
</dl>
</div>
</div>

View File

@ -30,13 +30,10 @@
font-weight: bold; font-weight: bold;
} }
/* tweak doc version selection /* tweak doc version selection */
.rst-versions { .rst-versions {
position: static; position: static;
border-top: none;
padding: 0px;
} }
*/
.rst-versions .rst-current-version { .rst-versions .rst-current-version {
padding: 5px; padding: 5px;