jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/865088 )
Change subject: [doc] Add previous, next, index, and modules links to sidebar
......................................................................
[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(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
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
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/865088
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: tests
Gerrit-Change-Id: I6f4361de4d333e87442dbbadf80dfc8493a6a25b
Gerrit-Change-Number: 865088
Gerrit-PatchSet: 1
Gerrit-Owner: KBach <kbach(a)wikimedia.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged