jenkins-bot submitted this change.
[doc] Add previous, next, index, and modules links to sidebar
Links will appear under version number and above the search bar.
They are intended as supplementary navigation and are smaller than
other elements.
Bug: T323803
Change-Id: I6f4361de4d333e87442dbbadf80dfc8493a6a25b
---
M docs/_static/css/pywikibot.css
A docs/_templates/page.html
2 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/docs/_static/css/pywikibot.css b/docs/_static/css/pywikibot.css
index 6721511..b3e5ebf 100644
--- a/docs/_static/css/pywikibot.css
+++ b/docs/_static/css/pywikibot.css
@@ -29,3 +29,17 @@
margin-left: unset;
margin-right: unset;
}
+
+.sidebar-rellinks {
+ margin-top: -0.25rem;
+ padding-bottom: 0.25rem;
+ font-size: 75%;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ justify-content: center;
+}
+
+.sidebar-rellinks a {
+ padding: 0.25rem;
+}
diff --git a/docs/_templates/page.html b/docs/_templates/page.html
new file mode 100644
index 0000000..2f92cc7
--- /dev/null
+++ b/docs/_templates/page.html
@@ -0,0 +1,20 @@
+{% extends "!page.html" %}
+{% block left_sidebar %}
+<div class="sidebar-sticky">
+ {%- for sidebar_section in sidebars %}
+ {# Add rellinks under logo and version info #}
+ {% if loop.index == 2 %}
+ <div class="sidebar-rellinks"
+ role="navigation"
+ aria-label="related navigation">
+ {%- for rellink in rellinks|reverse %}
+ <a href="{{ pathto(rellink[0])|e }}"
+ title="{{ rellink[1]|striptags|e }}"
+ {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
+ {%- endfor %}
+ </div>
+ {% endif %}
+ {%- include sidebar_section %}
+ {%- endfor %}
+</div>
+{% endblock left_sidebar %}
To view, visit change 865088. To unsubscribe, or for help writing mail filters, visit settings.