diff options
author | Pauli Virtanen <pav@iki.fi> | 2013-05-01 21:33:12 +0300 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2013-05-01 21:33:12 +0300 |
commit | 783ef9c1dffc1a81ac0dff0d2ed9a351d5357a00 (patch) | |
tree | c6e7cfdc14bc216c23ee9fc34c4326ad6cf604dd | |
parent | ac97ca48fe9b7cb4704a2c50ab08845800369a69 (diff) | |
download | scipy-sphinx-theme-783ef9c1dffc1a81ac0dff0d2ed9a351d5357a00.tar.gz |
Add theme option for plastering the scipy.org logo on top
-rw-r--r-- | README.rst | 7 | ||||
-rw-r--r-- | _theme/scipy/layout.html | 17 | ||||
-rw-r--r-- | _theme/scipy/static/img/scipy_org_logo.gif | bin | 0 -> 2933 bytes | |||
-rw-r--r-- | _theme/scipy/static/scipy.css_t | 9 | ||||
-rw-r--r-- | _theme/scipy/theme.conf | 1 | ||||
-rw-r--r-- | conf.py | 5 |
6 files changed, 37 insertions, 2 deletions
@@ -26,6 +26,13 @@ configuration variable: One of ``"left"``, ``"right"``, ``"none"``. Defines where the sidebar should appear. +.. attribute:: scipy_org_logo + + Whether to plaster the scipy.org logo on top. + + You can use your own logo by overriding the :attr:`layout.html:header` + block. + The following blocks are defined: .. attribute:: layout.html:header diff --git a/_theme/scipy/layout.html b/_theme/scipy/layout.html index e979121..ebc331f 100644 --- a/_theme/scipy/layout.html +++ b/_theme/scipy/layout.html @@ -160,7 +160,22 @@ {%- block extrahead %} {% endblock %} </head> <body> -{%- block header %}{% endblock %} +{%- block header %} +{% if theme_scipy_org_logo %} +<div class="container"> + <div class="top-scipy-org-logo-header"> + <a href="{{ pathto('index') }}"> + <img border=0 alt="SciPy" src="{{ pathto('_static/img/scipy_org_logo.gif', 1) }}"></a> + </div> + </div> +</div> +{% else %} + <div class="container"> + <div class="header"> + </div> + </div> +{% endif %} +{% endblock %} {%- block content %} <div class="container"> diff --git a/_theme/scipy/static/img/scipy_org_logo.gif b/_theme/scipy/static/img/scipy_org_logo.gif Binary files differnew file mode 100644 index 0000000..ab2e3ac --- /dev/null +++ b/_theme/scipy/static/img/scipy_org_logo.gif diff --git a/_theme/scipy/static/scipy.css_t b/_theme/scipy/static/scipy.css_t index 4320a3c..bef1b81 100644 --- a/_theme/scipy/static/scipy.css_t +++ b/_theme/scipy/static/scipy.css_t @@ -189,3 +189,12 @@ div.spc-rightsidebar h4 { line-height: inherit; border-bottom: none; } + +div.top-scipy-org-logo-header { + text-align: left; + background-color: rgb(140, 170, 230); + border-bottom: 8px solid rgb(0, 51, 153); + margin-top: 10px; + padding: 5px; + box-shadow: 0px 0px 3px rgb(136, 136, 136); +} diff --git a/_theme/scipy/theme.conf b/_theme/scipy/theme.conf index 3255db6..bd48c4e 100644 --- a/_theme/scipy/theme.conf +++ b/_theme/scipy/theme.conf @@ -7,3 +7,4 @@ pygments_style = friendly edit_link = false rootlinks = [] sidebar = left +scipy_org_logo = @@ -18,9 +18,12 @@ pygments_style = 'sphinx' html_theme = 'scipy' html_theme_path = ['_theme'] -html_logo = '_static/scipyshiny_small.png' +#html_logo = '_static/scipyshiny_small.png' +html_static_path = ['_static'] html_theme_options = { "edit_link": "true", + "sidebar": "right", + "scipy_org_logo": "true", "rootlinks": [("http://scipy.org/", "Scipy.org"), ("http://docs.scipy.org/", "Docs")] } |