docs: Make the short port names in the port/version sidebar lowercase.
To make it neater and simpler.
This commit is contained in:
parent
a6aa35af09
commit
37d5aa1377
13
docs/conf.py
13
docs/conf.py
|
@ -26,10 +26,10 @@ from collections import OrderedDict
|
||||||
micropy_port = os.getenv('MICROPY_PORT') or 'pyboard'
|
micropy_port = os.getenv('MICROPY_PORT') or 'pyboard'
|
||||||
tags.add('port_' + micropy_port)
|
tags.add('port_' + micropy_port)
|
||||||
ports = OrderedDict((
|
ports = OrderedDict((
|
||||||
('unix', ('unix', 'unix')),
|
('unix', 'unix'),
|
||||||
('pyboard', ('pyboard', 'the pyboard')),
|
('pyboard', 'the pyboard'),
|
||||||
('wipy', ('WiPy', 'the WiPy')),
|
('wipy', 'the WiPy'),
|
||||||
('esp8266', ('ESP8266', 'the ESP8266')),
|
('esp8266', 'the ESP8266'),
|
||||||
))
|
))
|
||||||
|
|
||||||
# The members of the html_context dict are available inside topindex.html
|
# The members of the html_context dict are available inside topindex.html
|
||||||
|
@ -38,11 +38,10 @@ micropy_all_versions = (os.getenv('MICROPY_ALL_VERSIONS') or 'latest').split(','
|
||||||
url_pattern = '%s/en/%%s/%%s' % (os.getenv('MICROPY_URL_PREFIX') or '/',)
|
url_pattern = '%s/en/%%s/%%s' % (os.getenv('MICROPY_URL_PREFIX') or '/',)
|
||||||
html_context = {
|
html_context = {
|
||||||
'port':micropy_port,
|
'port':micropy_port,
|
||||||
'port_short_name':ports[micropy_port][0],
|
'port_name':ports[micropy_port],
|
||||||
'port_name':ports[micropy_port][1],
|
|
||||||
'port_version':micropy_version,
|
'port_version':micropy_version,
|
||||||
'all_ports':[
|
'all_ports':[
|
||||||
(port_name[0], url_pattern % (micropy_version, port_id))
|
(port_id, url_pattern % (micropy_version, port_id))
|
||||||
for port_id, port_name in ports.items()
|
for port_id, port_name in ports.items()
|
||||||
],
|
],
|
||||||
'all_versions':[
|
'all_versions':[
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
<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="rst-current-version" data-toggle="rst-current-version">
|
||||||
<span class="fa fa-book"> Ports and Versions</span>
|
<span class="fa fa-book"> Ports and Versions</span>
|
||||||
{{ port_short_name }} ({{ port_version }})
|
{{ port }} ({{ port_version }})
|
||||||
<span class="fa fa-caret-down"></span>
|
<span class="fa fa-caret-down"></span>
|
||||||
</span>
|
</span>
|
||||||
<div class="rst-other-versions">
|
<div class="rst-other-versions">
|
||||||
|
|
Loading…
Reference in New Issue