diff --git a/Gruntfile.js b/Gruntfile.js index cbbfd7b84..a7e40acd8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -70,7 +70,7 @@ module.exports = function(grunt) { cwd: 'sass', src: ['*.sass'], dest: 'sphinx_rtd_theme/static/css', - ext: '.css' + ext: '.css_t' }] }, build: { @@ -84,7 +84,7 @@ module.exports = function(grunt) { cwd: 'sass', src: ['*.sass'], dest: 'sphinx_rtd_theme/static/css', - ext: '.css' + ext: '.css_t' }] } }, diff --git a/MANIFEST.in b/MANIFEST.in index 1e6a2ebd3..2dfcf18f2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ include *.txt include LICENSE recursive-include sphinx_rtd_theme *.conf -recursive-include sphinx_rtd_theme *.css +recursive-include sphinx_rtd_theme *.css_t recursive-include sphinx_rtd_theme *.eot recursive-include sphinx_rtd_theme *.html recursive-include sphinx_rtd_theme *.js diff --git a/README.rst b/README.rst index be882b226..a0f5863a3 100644 --- a/README.rst +++ b/README.rst @@ -87,6 +87,7 @@ file of this repository, and can be defined in your project's ``conf.py`` via .. code:: python html_theme_options = { + # Base Options 'typekit_id': '', 'canonical_url': '', 'analytics_id': '', @@ -94,6 +95,8 @@ file of this repository, and can be defined in your project's ``conf.py`` via 'display_version': True, 'prev_next_buttons_location': bottom, 'style_external_links': False, + # CSS Options + 'nav_search_background_color': #2980B9, # Toc options 'collapse_navigation': False, 'sticky_navigation': True, @@ -117,6 +120,11 @@ Base options and will display the "Next" and "Previous" buttons accordingly * ``style_external_links`` Add an icon next to external links. Defaults to ``False``. +CSS Options +~~~~~~~~~~~ + +* ``nav_search_background_color`` Color. Defines the color for the navigation search area. + TOC Options ~~~~~~~~~~~ diff --git a/sass/_theme_layout.sass b/sass/_theme_layout.sass index 626d1f45e..283267652 100644 --- a/sass/_theme_layout.sass +++ b/sass/_theme_layout.sass @@ -170,7 +170,7 @@ padding: $gutter / 2 margin-bottom: $gutter / 2 z-index: $z-index-popover - background-color: $nav-search-background-color + background-color: #{$nav-search-background-color} text-align: center padding: $gutter / 2 display: block diff --git a/sass/_theme_variables.sass b/sass/_theme_variables.sass index 349ea50e7..df60dd9f5 100644 --- a/sass/_theme_variables.sass +++ b/sass/_theme_variables.sass @@ -41,7 +41,7 @@ $menu-link-active: $white // Navigation colors $nav-background-color: $menu-background-color -$nav-search-background-color: $blue +$nav-search-background-color: "{{ theme_nav_search_background_color }}" $nav-search-color: $section-background-color $nav-link-color: $blue $nav-link-color-visited: $purple diff --git a/sphinx_rtd_theme/theme.conf b/sphinx_rtd_theme/theme.conf index 47c4dae5c..56a3490f1 100644 --- a/sphinx_rtd_theme/theme.conf +++ b/sphinx_rtd_theme/theme.conf @@ -3,6 +3,9 @@ inherit = basic stylesheet = css/theme.css pygments_style = default +[colors] +nav_search_background_color = #2980B9 + [options] typekit_id = hiw1hhg canonical_url =