summaryrefslogtreecommitdiffstatshomepage
path: root/docs/themes
diff options
context:
space:
mode:
author Firehawke <34792592+Firehawke@users.noreply.github.com>2021-11-27 06:19:14 -0700
committer GitHub <noreply@github.com>2021-11-28 00:19:14 +1100
commit17b9b96af33e39b23a0ef0692792fd4c616ccc57 (patch)
tree11e3d8303385e9d6b86c663aa16c7841cc8e1c5c /docs/themes
parent9c7494cdf552f48c0b3250d10f44ae50453d1264 (diff)
docs: Implemented download links in docs theme. (#8887)
Modified the RTD theme to add PDF and EPUB download links in the left pane.
Diffstat (limited to 'docs/themes')
-rw-r--r--docs/themes/sphinx_rtd_theme/theme.conf1
-rw-r--r--docs/themes/sphinx_rtd_theme/versions.html15
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/themes/sphinx_rtd_theme/theme.conf b/docs/themes/sphinx_rtd_theme/theme.conf
index 5cc687d7f98..03537e98fc8 100644
--- a/docs/themes/sphinx_rtd_theme/theme.conf
+++ b/docs/themes/sphinx_rtd_theme/theme.conf
@@ -18,3 +18,4 @@ prev_next_buttons_location = bottom
style_external_links = False
style_nav_header_background =
vcs_pageview_mode =
+mamedevorg = True
diff --git a/docs/themes/sphinx_rtd_theme/versions.html b/docs/themes/sphinx_rtd_theme/versions.html
index bab969e64f0..fb0d4bf538b 100644
--- a/docs/themes/sphinx_rtd_theme/versions.html
+++ b/docs/themes/sphinx_rtd_theme/versions.html
@@ -32,3 +32,18 @@
</div>
</div>
{% endif %}
+{# This section only gets used when mamedevorg is set to anything in theme.conf #}
+{% if theme_mamedevorg %}
+ <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Downloads') }}">
+ <span class="rst-current-version" data-toggle="rst-current-version">
+ <span class="fa fa-book">Downloads</span>
+ <span class="fa fa-caret-down"></span>
+ </span>
+ <div class="rst-other-versions">
+ <dl>
+ <dd><a href="https://docs.mamedev.org/_files/MAME.pdf">PDF</a></dd>
+ <dd><a href="https://docs.mamedev.org/_files/MAME.epub">EPUB</a></dd>
+ </dl>
+ </div>
+ </div>
+{% endif %}