From f38aa2e3016cccc6701c05ec0bf0f0a248227b22 Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Wed, 3 Apr 2019 15:04:04 -0700 Subject: [PATCH] doc: improve visibility of doc version menu Move the doc version selection menu from the bottom of the left nav menu to above the TOC menu, making it more obvious. Signed-off-by: David B. Kinder --- doc/_templates/layout.html | 4 ++++ doc/_templates/versions.html | 29 +---------------------------- doc/_templates/zversions.html | 28 ++++++++++++++++++++++++++++ doc/static/zephyr-custom.css | 10 ++++------ 4 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 doc/_templates/zversions.html diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index b6894ee4ef1..277d9bd832a 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -8,3 +8,7 @@ {% endif %} {{ super() }} {% endblock %} +{% block menu %} + {% include "zversions.html" %} + {{ super() }} +{% endblock %} diff --git a/doc/_templates/versions.html b/doc/_templates/versions.html index 2f265d8acc5..0600b2a75af 100644 --- a/doc/_templates/versions.html +++ b/doc/_templates/versions.html @@ -1,28 +1 @@ -{# Add rst-badge after rst-versions for small badge style. #} -
- - Zephyr Project - v: {{ current_version }} - - -
-
-
{{ _('Versions') }}
- {% for slug, url in versions %} -
{{ slug }}
- {% endfor %} -
-
-
{{ _('On zephyrproject.org') }}
-
- Project Home -
-
- Downloads -
-
- Releases -
-
-
-
+{# remove from this spot#} diff --git a/doc/_templates/zversions.html b/doc/_templates/zversions.html new file mode 100644 index 00000000000..adb2d4a785a --- /dev/null +++ b/doc/_templates/zversions.html @@ -0,0 +1,28 @@ +{# Add rst-badge after rst-versions for small badge style. #} +
+ + Zephyr Project + v: {{ current_version }} + + +
+
+
{{ _('Document Release Versions') }}
+ {% for slug, url in versions %} +
{{ slug }}
+ {% endfor %} +
+
+
{{ _('zephyrproject.org Links') }}
+
+ Project Home +
+
+ Downloads +
+
+ Releases +
+
+
+
diff --git a/doc/static/zephyr-custom.css b/doc/static/zephyr-custom.css index d4d73500913..e301a250c0d 100644 --- a/doc/static/zephyr-custom.css +++ b/doc/static/zephyr-custom.css @@ -23,13 +23,11 @@ } */ -/* tweak doc version selection +/* tweak doc version selection */ .rst-versions { - position: static; - border-top: none; - padding: 0px; + position: static !important; } -*/ + .rst-versions .rst-current-version { padding: 5px; @@ -135,7 +133,7 @@ th,td { } /* doxygenXX item color tweaks, light blue background with dark blue top border */ -.rst-content dl:not(.docutils) dl dt, dl:not(.docutils) dt { +.rst-content dl:not(.docutils) dl dt, dl:not(.docutils,.rst-other-versions) dt { background: #e7f2fa !important; border-top: none !important; border-left: none !important; */