From 02e523ca70bc77dc31931c3ad430b9c13ada438e Mon Sep 17 00:00:00 2001 From: Zhanna Tsitkov Date: Wed, 23 May 2012 15:59:24 -0400 Subject: [PATCH] Modified the Sphinx HTML page layout 1. The Feedback button is moved into the footer; 2. The default page/doc width are set to 960px; --- doc/rst_source/_static/kerb.css | 38 +++++++++- doc/rst_source/_templates/layout.html | 104 +++++++++++++++++--------- doc/rst_source/conf.py | 2 +- 3 files changed, 106 insertions(+), 38 deletions(-) diff --git a/doc/rst_source/_static/kerb.css b/doc/rst_source/_static/kerb.css index 93c1340fe..d23df9df0 100644 --- a/doc/rst_source/_static/kerb.css +++ b/doc/rst_source/_static/kerb.css @@ -8,18 +8,36 @@ div.body { padding-right: 2em; text-align: left; + overflow-x: hidden; } /* Page layout */ +div.header, div.content, div.footer { + width: 70%; + margin-left: auto; + margin-right: auto; +} + + div.header-wrapper { - background: #59121e; + background: white; border-bottom: 3px solid #2e3436; - border-top: 3px solid #2e3436; + border-top: 13px solid #59121e; } /* Header */ +div.header { + padding-top: 10px; + padding-bottom: 10px; +} + +div.header h1 { + font-family: "Georgia", "Times New Roman", serif, black; + font-weight: normal; +} + div.header div.right a { color: #fcaf3e; letter-spacing: .1em; @@ -29,6 +47,14 @@ div.header div.right a { /* Content */ +div.document { + width: 70%; + float: left; + background-color: white; + padding-top: 20px; + padding-bottom: 20px; +} + div.document div.section h1 { margin-bottom: 20px; padding: 1px; @@ -44,6 +70,14 @@ div.document div.section dl { /* Sidebar */ +div.sidebar { + float: right; + font-size: .9em; + padding-top: 0px; + width: 20%; + background-color: #4c0f1a; +} + div.sidebar ul { list-style-type: none; padding: 1px; diff --git a/doc/rst_source/_templates/layout.html b/doc/rst_source/_templates/layout.html index 438c8dfcd..3d7c2ba7b 100644 --- a/doc/rst_source/_templates/layout.html +++ b/doc/rst_source/_templates/layout.html @@ -4,46 +4,80 @@ [('index', 'Full Table of Contents', 'C', 'Contents')] %} {% set css_files = css_files + ["_static/kerb.css"] %} -{% block relbar1 %} -
-
- -
-
-
+{% macro feedback_rellinks() %} + +{%- endmacro %} + +{% block footer %} {{ feedback_rellinks() }}{% endblock %} + +{% block header %} +
+
+ {% if logo %} + + {% endif %} + {% block headertitle %} +

{{ shorttitle|e }}

+ {% endblock %} +
+ {%- for rellink in rellinks|reverse %} + {{ rellink[3] }} + {%- if not loop.last %}{{ reldelim2 }}{% endif %} + {%- endfor %} +
+

+
{% endblock %} + {%- block content %} -
+
- {%- block sidebar1 %} - - {%- endblock %} -
- {%- block document %} - {{ super() }} - {%- endblock %} -
-
+

{{ _('On this page') }}

+ {{ toc }} +
+

{{ _('Table of contents') }}

+ {{ toctree(collapse=true, maxdepth=-1, titles_only=true) }} +
+

Full Table of Contents +

+

{{ _('Search') }}

+ +
+ {%- endblock %} +
+ {%- block document %}{{ super() }}{%- endblock %} +
+
{% endblock %} diff --git a/doc/rst_source/conf.py b/doc/rst_source/conf.py index 45d6d546e..9331cbd02 100644 --- a/doc/rst_source/conf.py +++ b/doc/rst_source/conf.py @@ -98,7 +98,7 @@ html_theme = 'agogo' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = { "headerbg": "#59121e", "linkcolor": "#a63019", "footerbg": "#59121e", "bgcolor": "#59121e" } +html_theme_options = { "linkcolor": "#a63019", "footerbg": "#59121e", "bgcolor": "#59121e", "documentwidth": "910px", "pagewidth": "960px" } # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] -- 2.26.2