This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d9be1dffab66256cd198f804a1c7188d6a4c0d00
Author: Matias N <[email protected]>
AuthorDate: Sat Aug 15 23:10:44 2020 -0300

    add basic support for multiple versions
---
 Documentation/_static/custom.css     |  7 +++++++
 Documentation/_templates/layout.html | 30 ++++++++++++++++++++++++++++++
 Documentation/conf.py                |  7 +++++++
 3 files changed, 44 insertions(+)

diff --git a/Documentation/_static/custom.css b/Documentation/_static/custom.css
index 058bf37..6f470e3 100644
--- a/Documentation/_static/custom.css
+++ b/Documentation/_static/custom.css
@@ -23,3 +23,10 @@
       overflow: visible !important;
    }
 }
+
+
+.wy-nav-side
+{
+  padding-bottom: 0em !important;
+}
+
diff --git a/Documentation/_templates/layout.html 
b/Documentation/_templates/layout.html
new file mode 100644
index 0000000..43342ff
--- /dev/null
+++ b/Documentation/_templates/layout.html
@@ -0,0 +1,30 @@
+{% extends "!layout.html" %}
+{% block sidebartitle %}
+  {% if logo and theme_logo_only %}
+    <a href="{{ pathto(master_doc) }}">
+  {% else %}
+    <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
+  {% endif %}
+
+  {% if logo %}
+    {# Not strictly valid HTML, but it's the only way to display/scale
+       it properly, without weird scripting or heaps of work
+    #}
+    <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ 
_('Logo') }}"/>
+  {% endif %}
+  </a>
+  
+  <!-- this version selector is quite ugly, should be probably replaced by 
something
+       more modern -->
+       
+  <div class="version-selector">
+    <select>
+    {% for nuttx_version in nuttx_versions %}
+      <option value="{{ nuttx_version }}" {% if nuttx_version == version 
%}selected="selected"{% endif %}>{{ nuttx_version }}</option>
+    {% endfor %}
+    </select>
+  </div>
+  
+  {% include "searchbox.html" %}
+{% endblock %}
+
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 243fbbf..ab828e6 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -51,6 +51,13 @@ templates_path = ['_templates']
 # This pattern also affects html_static_path and html_extra_path.
 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 
+# list of documentation versions to offer (besides latest)
+
+html_context = dict()
+html_context['nuttx_versions'] = ['latest']
+
+# TODO: append other options using releases detected from git (or maybe just
+# a few hand-selected ones, or maybe just a "stable" option)
 
 # -- Options for HTML output -------------------------------------------------
 

Reply via email to