From 4ed01cd69c1535cfa64befac5c00f016db9b5eb5 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 16 Oct 2018 11:20:58 -0500 Subject: [PATCH] Make a bare-bones starlingxdocs theme We can use this as a starting point for further changes. These files are copies of those from openstacdocs with most of the openstac-specific bits removed. This way we can track additional changes made as we progress. Change-Id: I41c2a7d63ba7796aa3cf3cc001e077d5de28a14d Signed-off-by: Dean Troyer --- .../theme/starlingxdocs/footer.html | 41 +++++++++++++++ .../theme/starlingxdocs/header.html | 52 +++++++++++++++++++ .../theme/starlingxdocs/sidebartoc_menu.html | 6 +++ .../starlingxdocs/sidebartoc_menu_apiref.html | 11 ++++ .../theme/starlingxdocs/titlerow.html | 20 +++++++ .../add-starlingxdocs-10a33318f8630486.yaml | 4 +- tox.ini | 12 +++++ 7 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 openstackdocstheme/theme/starlingxdocs/footer.html create mode 100644 openstackdocstheme/theme/starlingxdocs/header.html create mode 100644 openstackdocstheme/theme/starlingxdocs/sidebartoc_menu.html create mode 100644 openstackdocstheme/theme/starlingxdocs/sidebartoc_menu_apiref.html create mode 100644 openstackdocstheme/theme/starlingxdocs/titlerow.html diff --git a/openstackdocstheme/theme/starlingxdocs/footer.html b/openstackdocstheme/theme/starlingxdocs/footer.html new file mode 100644 index 0000000..0e49375 --- /dev/null +++ b/openstackdocstheme/theme/starlingxdocs/footer.html @@ -0,0 +1,41 @@ + diff --git a/openstackdocstheme/theme/starlingxdocs/header.html b/openstackdocstheme/theme/starlingxdocs/header.html new file mode 100644 index 0000000..336977f --- /dev/null +++ b/openstackdocstheme/theme/starlingxdocs/header.html @@ -0,0 +1,52 @@ +{% if page_source_suffix %}{# an input file was read #} + +{% else %}{# a template was rendered directly #} + +{% endif %} + {% include 'os_search_install.html' %} + diff --git a/openstackdocstheme/theme/starlingxdocs/sidebartoc_menu.html b/openstackdocstheme/theme/starlingxdocs/sidebartoc_menu.html new file mode 100644 index 0000000..451a492 --- /dev/null +++ b/openstackdocstheme/theme/starlingxdocs/sidebartoc_menu.html @@ -0,0 +1,6 @@ + + diff --git a/openstackdocstheme/theme/starlingxdocs/sidebartoc_menu_apiref.html b/openstackdocstheme/theme/starlingxdocs/sidebartoc_menu_apiref.html new file mode 100644 index 0000000..477cece --- /dev/null +++ b/openstackdocstheme/theme/starlingxdocs/sidebartoc_menu_apiref.html @@ -0,0 +1,11 @@ + + diff --git a/openstackdocstheme/theme/starlingxdocs/titlerow.html b/openstackdocstheme/theme/starlingxdocs/titlerow.html new file mode 100644 index 0000000..27c3c25 --- /dev/null +++ b/openstackdocstheme/theme/starlingxdocs/titlerow.html @@ -0,0 +1,20 @@ +
+
+ {%- if theme_sidebar_dropdown == 'os_docs' %} +

{{ title }}

+ {% else %} +

StarlingX API Documentation

+ {%- endif %} +
+
+ {% if prev %} + + {% endif %} + {% if next %} + + {% endif %} + {%- if bug_project %} + + {% endif %} +
+
diff --git a/releasenotes/notes/add-starlingxdocs-10a33318f8630486.yaml b/releasenotes/notes/add-starlingxdocs-10a33318f8630486.yaml index b520791..ef34b04 100644 --- a/releasenotes/notes/add-starlingxdocs-10a33318f8630486.yaml +++ b/releasenotes/notes/add-starlingxdocs-10a33318f8630486.yaml @@ -1,8 +1,8 @@ --- features: - | - Add support for additional themes is included in the package. The - first theme is ``starlingxdocs``. The initial implementation sets up + Add support for including additional themes in the package, starting + with ``starlingxdocs``. The initial implementation sets up the new theme to inherit from ``openstackdocs`` and updates some of the ``openstackdocs`` bits that are hard coded in the Python. diff --git a/tox.ini b/tox.ini index 81a941c..275ae08 100644 --- a/tox.ini +++ b/tox.ini @@ -49,12 +49,24 @@ commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html +[testenv:releasenotes-starlingxdocs] +basepython = python3 +commands = + rm -rf releasenotes/build + sphinx-build -a -E -W -d releasenotes/build/doctrees -b html -D html_theme=starlingxdocs releasenotes/source releasenotes/build/html + [testenv:api-ref] basepython = python3 commands = rm -rf api-ref/build sphinx-build -a -E -W -d api-ref/build/doctrees -b html api-ref/source api-ref/build/html +[testenv:api-ref-starlingxdocs] +basepython = python3 +commands = + rm -rf api-ref/build + sphinx-build -a -E -W -d api-ref/build/doctrees -b html -D html_theme=starlingxdocs api-ref/source api-ref/build/html + [testenv:buildpdf] # Only build PDF and push it to publish-docs folder so that OpenStack # CI jobs will publish it.