diff --git a/docs/source/_templates/versions.html b/docs/source/_templates/versions.html new file mode 100644 index 00000000000..3e5e6a020af --- /dev/null +++ b/docs/source/_templates/versions.html @@ -0,0 +1,14 @@ +{% if mamedev_site %} +
+ + Downloads + + +
+
+
PDF
+
EPUB
+
+
+
+{% endif %} diff --git a/docs/source/conf.py b/docs/source/conf.py index b0216243210..95dc1d19bbf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -262,3 +262,12 @@ texinfo_documents = [ # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' + +# Add download links at bottom left when the MAMEDEV environment +# varaible is set. See versions.html in the _template folder. +try: + html_context +except NameError: + html_context = dict() +if os.getenv("MAMEDEV") != None: + html_context['mamedev_site'] = True diff --git a/docs/themes/sphinx_rtd_theme/theme.conf b/docs/themes/sphinx_rtd_theme/theme.conf index 03537e98fc8..5cc687d7f98 100644 --- a/docs/themes/sphinx_rtd_theme/theme.conf +++ b/docs/themes/sphinx_rtd_theme/theme.conf @@ -18,4 +18,3 @@ 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 fb0d4bf538b..0d0e1251a0c 100644 --- a/docs/themes/sphinx_rtd_theme/versions.html +++ b/docs/themes/sphinx_rtd_theme/versions.html @@ -1,49 +1,34 @@ {% if READTHEDOCS %} {# Add rst-badge after rst-versions for small badge style. #} -
- - Read the Docs - v: {{ current_version }} - - -
-
-
{{ _('Versions') }}
- {% for slug, url in versions %} -
{{ slug }}
- {% endfor %} -
-
-
{{ _('Downloads') }}
- {% for type, url in downloads %} -
{{ type }}
- {% endfor %} -
-
- {# Translators: The phrase "Read the Docs" is not translated #} -
{{ _('On Read the Docs') }}
-
- {{ _('Project Home') }} -
-
- {{ _('Builds') }} -
-
-
-
-{% endif %} -{# This section only gets used when mamedevorg is set to anything in theme.conf #} -{% if theme_mamedevorg %} -
- - Downloads - - -
-
-
PDF
-
EPUB
-
-
-
+
+ + Read the Docs + v: {{ current_version }} + + +
+
+
{{ _('Versions') }}
+ {% for slug, url in versions %} +
{{ slug }}
+ {% endfor %} +
+
+
{{ _('Downloads') }}
+ {% for type, url in downloads %} +
{{ type }}
+ {% endfor %} +
+
+ {# Translators: The phrase "Read the Docs" is not translated #} +
{{ _('On Read the Docs') }}
+
+ {{ _('Project Home') }} +
+
+ {{ _('Builds') }} +
+
+
+
{% endif %} diff --git a/docs/update.sh b/docs/update.sh index b4becc71a11..8ec416471f7 100755 --- a/docs/update.sh +++ b/docs/update.sh @@ -12,7 +12,8 @@ elif [ $LOCAL = $BASE ]; then echo "Need to pull" git pull make clean - make site + # The environment variable added here adds bottom left download pane. + MAMEDEV=1 make site elif [ $REMOTE = $BASE ]; then echo "Need to push" else