html logo_only is now an option

This commit is contained in:
Daniel Oaks 2013-12-08 23:18:43 +10:00
parent 22df9d33e8
commit 8bd1938c8b
5 changed files with 15 additions and 5 deletions

View File

@ -106,7 +106,9 @@ html_theme = 'sphinx_rtd_theme'
# 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 = {}
html_theme_options = {
# 'logo_only': True, # if we have a html_logo below, this shows /only/ the logo with no title text
}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ["../.."]

View File

@ -135,6 +135,9 @@
border-radius: 0
max-width: 100% // shrink on mobile, if appropriate
background: rgba(0,0,0,0) // make hover background of parent show up properly
&.icon
img.logo
margin-top: 0.85em // space it away from the title text
.wy-nav .wy-menu-vertical
header

View File

@ -96,12 +96,16 @@
{# SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
{% if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{% endif %}
{% if logo %}
{# Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #}
<a href="{{ pathto(master_doc) }}"><img src="{{ pathto('_static/' + logo, 1) }}" class="logo" /></a>
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }} </a>
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" />
{% endif %}
</a>
{% include "searchbox.html" %}
</div>

File diff suppressed because one or more lines are too long

View File

@ -5,3 +5,4 @@ stylesheet = css/theme.css
[options]
typekit_id = hiw1hhg
analytics_id =
logo_only =