From 1a0519c63b22bfb1ec5f2b23127e0a77b16db1fe Mon Sep 17 00:00:00 2001 From: Maeve Andrews Date: Wed, 8 Dec 2021 11:25:51 -0500 Subject: [PATCH] Add template blocks for an RTD-like version switcher --- docs/_static/releases.css | 1 + docs/_templates/layout.html | 35 +++++++++++++++++++++++++++++++++++ docs/conf.py | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/_static/releases.css create mode 100644 docs/_templates/layout.html diff --git a/docs/_static/releases.css b/docs/_static/releases.css new file mode 100644 index 000000000..a715e149a --- /dev/null +++ b/docs/_static/releases.css @@ -0,0 +1 @@ +.rst-other-versions .current-release { font-weight: 700; } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 000000000..63bb86705 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,35 @@ +{% extends "!layout.html" %} + +{% block extrahead %} + +{% endblock %} + +{% block extrabody %} +
+ + SecureDrop Docs + v: {{ release }} + + +
+
+
Versions
+ + stable + + + latest + +
+
+
Downloads
+
PDF
+
+
+ + A project of Freedom of the Press Foundation ยท + Privacy Policy + +
+
+{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index cf4a14f21..3c122e69d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -148,7 +148,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] +html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied