From 6919c06898c4b58fbb949e9ee6c128c91bcb5d51 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 15 Mar 2020 14:22:39 +0900 Subject: [PATCH] Fix #7297: html theme: ``bizstyle`` does not support ``sidebarwidth`` --- CHANGES | 1 + sphinx/themes/bizstyle/static/bizstyle.css_t | 8 ++++++-- sphinx/themes/bizstyle/theme.conf | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 4f50422e6..8a364b07f 100644 --- a/CHANGES +++ b/CHANGES @@ -102,6 +102,7 @@ Bugs fixed * #7139: ``code-block:: guess`` does not work * #7278: html search: Fix use of ``html_file_suffix`` instead of ``html_link_suffix`` in search results +* #7297: html theme: ``bizstyle`` does not support ``sidebarwidth`` * #7179: std domain: Fix whitespaces are suppressed on referring GenericObject * #7289: console: use bright colors instead of bold diff --git a/sphinx/themes/bizstyle/static/bizstyle.css_t b/sphinx/themes/bizstyle/static/bizstyle.css_t index b1ae49689..b13395b4f 100644 --- a/sphinx/themes/bizstyle/static/bizstyle.css_t +++ b/sphinx/themes/bizstyle/static/bizstyle.css_t @@ -51,9 +51,13 @@ div.body { {%- if theme_rightsidebar|tobool %} div.bodywrapper { - margin: 0 240px 0 0; + margin: 0 calc({{ theme_sidebarwidth|todim }} + 30px) 0 0; border-right: 1px solid #ccc; } +{%- else %} +div.bodywrapper { + margin: 0 0 0 calc({{ theme_sidebarwidth|todim }} + 30px); +} {%- endif %} div.related { @@ -103,7 +107,7 @@ div.sphinxsidebarwrapper { div.sphinxsidebar { margin: 0; padding: 0.5em 12px 12px 12px; - width: 210px; + width: {{ theme_sidebarwidth|todim }}; {%- if theme_rightsidebar|tobool %} float: right; {%- endif %} diff --git a/sphinx/themes/bizstyle/theme.conf b/sphinx/themes/bizstyle/theme.conf index 724eb1270..3c21b0fe0 100644 --- a/sphinx/themes/bizstyle/theme.conf +++ b/sphinx/themes/bizstyle/theme.conf @@ -5,5 +5,6 @@ pygments_style = friendly [options] rightsidebar = false +sidebarwidth = 210 maincolor = #336699