From 248869e2dbd8d988865f9258759300e44fe7fe6a Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 17 Jun 2018 15:22:06 +0900 Subject: [PATCH 1/2] doc: Use badge to show latest release --- doc/_templates/indexsidebar.html | 14 ++------------ doc/_themes/sphinx13/static/sphinx13.css | 4 ++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/doc/_templates/indexsidebar.html b/doc/_templates/indexsidebar.html index b07ef2033..d67a5e2ea 100644 --- a/doc/_templates/indexsidebar.html +++ b/doc/_templates/indexsidebar.html @@ -3,19 +3,9 @@ {%trans%}project{%endtrans%}

Download

-{% if version.endswith('+') %} -

{%trans%}This documentation is for version {{ version }}, which is - not released yet.{%endtrans%}

-

{%trans%}You can use it from the - Git repo or look for - released versions in the Python - Package Index.{%endtrans%}

-{% else %} -

{%trans%}Current version: {{ version }}{%endtrans%}

-

{%trans%}Get Sphinx from the Python Package -Index, or install it with:{%endtrans%}

+

{%trans%}Current version: {%endtrans%}

+

{%trans%}Install Sphinx with:{%endtrans%}

pip install -U Sphinx
-{% endif %}

{%trans%}Questions? Suggestions?{%endtrans%}

diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css index 24a33fba7..85281f037 100644 --- a/doc/_themes/sphinx13/static/sphinx13.css +++ b/doc/_themes/sphinx13/static/sphinx13.css @@ -140,6 +140,10 @@ div.sphinxsidebar .logo img { vertical-align: middle; } +div.sphinxsidebar .download a img { + vertical-align: middle; +} + div.subscribeformwrapper { display: block; overflow: auto; From e1a87ba0736d4d47af4d9a77fa51c00625e3f3c1 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Tue, 19 Jun 2018 21:58:06 +0900 Subject: [PATCH 2/2] Fix broken testcase by alabaster-0.711 --- tests/test_theming.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test_theming.py b/tests/test_theming.py index b887cfb04..8c09271e3 100644 --- a/tests/test_theming.py +++ b/tests/test_theming.py @@ -11,6 +11,7 @@ import os +import alabaster import pytest from sphinx.theming import ThemeError @@ -23,11 +24,14 @@ from sphinx.theming import ThemeError def test_theme_api(app, status, warning): cfg = app.config + themes = ['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku', + 'traditional', 'epub', 'nature', 'pyramid', 'bizstyle', 'classic', 'nonav', + 'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child'] + if alabaster.version.__version_info__ >= (0, 7, 11): + themes.append('alabaster') + # test Theme class API - assert set(app.html_themes.keys()) == \ - set(['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku', - 'traditional', 'epub', 'nature', 'pyramid', 'bizstyle', 'classic', 'nonav', - 'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child']) + assert set(app.html_themes.keys()) == set(themes) assert app.html_themes['test-theme'] == app.srcdir / 'test_theme' / 'test-theme' assert app.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip' assert app.html_themes['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'