mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Add configurable version display to nav header
This adds a subtle version display to the nav header. It will pull this information from conf.py `version` if it exists, or if on RTD, `current_version` from the conf additional context. If neither exists, or the `display_version` option is false, the block will not display.
This commit is contained in:
parent
6277c21110
commit
5e7d604290
|
@ -58,9 +58,9 @@ copyright = u'2013, Dave Snider'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '1'
|
version = '0.1.9'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '1'
|
release = '0.1.9'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
@ -205,6 +205,12 @@
|
||||||
&.icon
|
&.icon
|
||||||
img.logo
|
img.logo
|
||||||
margin-top: 0.85em // space it away from the title text
|
margin-top: 0.85em // space it away from the title text
|
||||||
|
> div.version
|
||||||
|
margin-top: -1 * ($gutter / 4)
|
||||||
|
margin-bottom: $gutter / 2
|
||||||
|
font-weight: normal
|
||||||
|
color: rgba(255,255,255,.3)
|
||||||
|
|
||||||
|
|
||||||
.wy-nav .wy-menu-vertical
|
.wy-nav .wy-menu-vertical
|
||||||
header
|
header
|
||||||
|
|
|
@ -100,6 +100,18 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{% if theme_display_version %}
|
||||||
|
{%- set nav_version = version %}
|
||||||
|
{% if READTHEDOCS and current_version %}
|
||||||
|
{%- set nav_version = current_version %}
|
||||||
|
{% endif %}
|
||||||
|
{% if nav_version %}
|
||||||
|
<div class="version">
|
||||||
|
{{ nav_version }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include "searchbox.html" %}
|
{% include "searchbox.html" %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,3 +8,4 @@ analytics_id =
|
||||||
sticky_navigation = False
|
sticky_navigation = False
|
||||||
logo_only =
|
logo_only =
|
||||||
collapse_navigation = False
|
collapse_navigation = False
|
||||||
|
display_version = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user