diff options
| author | Georg Brandl <georg@python.org> | 2009-02-15 01:43:10 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-02-15 01:43:10 +0100 |
| commit | 25b71e4143a33b8916f7e4c89860b5175ef5983f (patch) | |
| tree | 268c3f897671fad9348126ede758da2d4b3de2f0 /sphinx/themes/default | |
| parent | 2d62179bb0c7aa5f20cf1218d8b83027405768eb (diff) | |
| download | sphinx-git-25b71e4143a33b8916f7e4c89860b5175ef5983f.tar.gz | |
* Add support for theme options.
* Make the right-/stickysidebar alternatives for the default design options.
* Add theme-related options to quickstart.
Diffstat (limited to 'sphinx/themes/default')
| -rw-r--r-- | sphinx/themes/default/layout.html | 12 | ||||
| -rw-r--r-- | sphinx/themes/default/static/rightsidebar.css | 6 | ||||
| -rw-r--r-- | sphinx/themes/default/static/stickysidebar.css | 13 | ||||
| -rw-r--r-- | sphinx/themes/default/theme.conf | 4 |
4 files changed, 26 insertions, 9 deletions
diff --git a/sphinx/themes/default/layout.html b/sphinx/themes/default/layout.html new file mode 100644 index 000000000..9a909b0b9 --- /dev/null +++ b/sphinx/themes/default/layout.html @@ -0,0 +1,12 @@ +{% extends "basic/layout.html" %} +{% block extrahead %} +{%- if theme_rightsidebar|tobool %} + <link rel="stylesheet" href="{{ pathto('_static/rightsidebar.css', 1) }}" + type="text/css" /> +{%- endif %} +{%- if theme_stickysidebar|tobool %} + <link rel="stylesheet" href="{{ pathto('_static/stickysidebar.css', 1) }}" + type="text/css" /> +{%- endif %} +{{ super() }} +{% endblock %} diff --git a/sphinx/themes/default/static/rightsidebar.css b/sphinx/themes/default/static/rightsidebar.css index bc604a893..d21eb0969 100644 --- a/sphinx/themes/default/static/rightsidebar.css +++ b/sphinx/themes/default/static/rightsidebar.css @@ -1,10 +1,8 @@ -/** - * Sphinx Doc Design -- Right Side Bar Overrides - */ - +/* rightsidebar overrides for default design */ div.sphinxsidebar { float: right; + right: 0; /* for sticky sidebar */ } div.bodywrapper { diff --git a/sphinx/themes/default/static/stickysidebar.css b/sphinx/themes/default/static/stickysidebar.css index dfc99c77a..01450853c 100644 --- a/sphinx/themes/default/static/stickysidebar.css +++ b/sphinx/themes/default/static/stickysidebar.css @@ -1,15 +1,17 @@ -/** - * Sphinx Doc Design -- Sticky sidebar Overrides - */ +/* stickysidebar overrides for default design */ div.sphinxsidebar { top: 30px; - left: 0px; + height: 100%; + overflow: auto; position: fixed; margin: 0; - float: none; + background-color: #1c4e63; } +/* this is nice, but it it leads to hidden headings when jumping + to an anchor */ +/* div.related { position: fixed; } @@ -17,3 +19,4 @@ div.related { div.documentwrapper { margin-top: 30px; } +*/ diff --git a/sphinx/themes/default/theme.conf b/sphinx/themes/default/theme.conf index 1f5132065..f3d4d5ea6 100644 --- a/sphinx/themes/default/theme.conf +++ b/sphinx/themes/default/theme.conf @@ -2,3 +2,7 @@ inherit = basic stylesheet = default.css pygments_style = sphinx + +[options] +rightsidebar = false +stickysidebar = false |
