mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-04-27 21:26:43 +00:00
version banner fixes (#331)
* version banner fixes * More context * Banner tweaks * Template fix * HTML tweaks * Banner simplificatio
This commit is contained in:
parent
cf5dbf03cf
commit
c23165307b
@ -1,13 +1,14 @@
|
||||
{% if config.extra.version %}
|
||||
{% if config.version_banner %}
|
||||
<div class='md-banner md-banner--warning'>
|
||||
<div class='md-grid md-typeset'>
|
||||
{% if config.extra.version == "latest" %}
|
||||
This documentation is for the <em>development</em> version of InvenTree, which may be significantly different from previous stable releases.
|
||||
For stable release documentation, use the version selector located in the bottom right corner of this page.
|
||||
{% elif self.outdated() %}
|
||||
This documentation is for an outdated version of InvenTree.
|
||||
For updated release documentation, use the version selector located in the bottom right corner of this page.
|
||||
<small>
|
||||
{% if config.readthedocs.version == 'latest' %}
|
||||
This documentation is for the <em>development</em> version of InvenTree, which may be significantly different from the stable releases.
|
||||
{% else %}
|
||||
This documentation is for an outdated version of InvenTree.
|
||||
{% endif %}
|
||||
For <em>stable</em> release documentation, use the version selector located in the bottom right corner of this page.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -49,6 +49,10 @@ def on_config(config, *args, **kwargs):
|
||||
# Supply this to the context
|
||||
config['readthedocs'] = readthedocs
|
||||
|
||||
# Determine if we want to display a 'version' banner
|
||||
# Basically we do, *unless* we are displaying the "stable" version
|
||||
config['version_banner'] = rtd_version != 'stable'
|
||||
|
||||
else:
|
||||
print("'READTHEDOCS' environment variable not found")
|
||||
print("Building for localhost configuration!")
|
||||
|
Loading…
x
Reference in New Issue
Block a user