mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
html logo_only is now an option
This commit is contained in:
parent
22df9d33e8
commit
8bd1938c8b
@ -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 = ["../.."]
|
||||
|
@ -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
|
||||
|
@ -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
@ -5,3 +5,4 @@ stylesheet = css/theme.css
|
||||
[options]
|
||||
typekit_id = hiw1hhg
|
||||
analytics_id =
|
||||
logo_only =
|
||||
|
Loading…
Reference in New Issue
Block a user