Skip to content

Commit c2b61e4

Browse files
authored
Merge pull request #703 from nokia/header-background
Change search background
2 parents 3a31dba + 5877f37 commit c2b61e4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/configuring.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ file of this repository, and can be defined in your project's ``conf.py`` via
2525
'prev_next_buttons_location': 'bottom',
2626
'style_external_links': False,
2727
'vcs_pageview_mode': '',
28+
'style_nav_header_background': 'white',
2829
# Toc options
2930
'collapse_navigation': True,
3031
'sticky_navigation': True,
@@ -49,6 +50,9 @@ Base options
4950
* ``vcs_pageview_mode`` String. Changes how to view files when using `display_github`, `display_gitlab`, etc.
5051
When using Github or Gitlab this can be: `blob` (default), `edit`, or `raw`,
5152
on Bitbucket, this can be either: `view` (default) or `edit`.
53+
* ``style_nav_header_background`` String. Changes the background of the search area in the navigation bar. The value
54+
can be anything valid in a CSS `background` property. The default `#2980B9` will be used if the property is not
55+
defined.
5256

5357
TOC Options
5458
~~~~~~~~~~~

sphinx_rtd_theme/layout.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,10 @@
105105

106106
{% block extrabody %} {% endblock %}
107107
<div class="wy-grid-for-nav">
108-
109108
{# SIDE NAV, TOGGLES ON MOBILE #}
110109
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
111110
<div class="wy-side-scroll">
112-
<div class="wy-side-nav-search">
111+
<div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
113112
{% block sidebartitle %}
114113

115114
{% if logo and theme_logo_only %}

sphinx_rtd_theme/theme.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ collapse_navigation = True
1010
sticky_navigation = True
1111
navigation_depth = 4
1212
includehidden = True
13-
titles_only =
13+
titles_only =
1414
logo_only =
1515
display_version = True
1616
prev_next_buttons_location = bottom
1717
style_external_links = False
18+
style_nav_header_background =

0 commit comments

Comments
 (0)