diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 902fe90b..980aa962 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -68,6 +68,7 @@ your global navigation uses more than one level, things will likely be broken. * Bugfix: Ensure theme files do not override docs_dir files on Windows (#1876) * Add canonical tag to `readthedocs` theme (#1669). * Improved error message for when `git` is not available. +* Add support for `nav_style` theme option for the `mkdocs` theme (#1930). ## Version 1.0.4 (2018-09-07) diff --git a/docs/user-guide/styling-your-docs.md b/docs/user-guide/styling-your-docs.md index e567b588..efb24394 100644 --- a/docs/user-guide/styling-your-docs.md +++ b/docs/user-guide/styling-your-docs.md @@ -73,6 +73,14 @@ supports the following options: * __`search`__: Display the search modal. Default: `83` (s) +* __`nav_style`__: This adjusts the visual style for the top navigation bar; by + default, this is set to `primary` (the default), but it can also be set to + `dark` or `light`. + + theme: + name: mkdocs + nav_style: dark + [styles]: https://highlightjs.org/static/demo/ ### readthedocs diff --git a/mkdocs/tests/config/config_tests.py b/mkdocs/tests/config/config_tests.py index bf773b20..5a90480e 100644 --- a/mkdocs/tests/config/config_tests.py +++ b/mkdocs/tests/config/config_tests.py @@ -132,7 +132,8 @@ class ConfigTests(unittest.TestCase): 'highlightjs': True, 'hljs_style': 'github', 'hljs_languages': [], - 'shortcuts': {'help': 191, 'next': 78, 'previous': 80, 'search': 83} + 'shortcuts': {'help': 191, 'next': 78, 'previous': 80, 'search': 83}, + 'nav_style': 'primary' } }, { 'dirs': [os.path.join(theme_dir, 'readthedocs'), mkdocs_templates_dir], @@ -194,7 +195,8 @@ class ConfigTests(unittest.TestCase): 'highlightjs': True, 'hljs_style': 'github', 'hljs_languages': [], - 'shortcuts': {'help': 191, 'next': 78, 'previous': 80, 'search': 83} + 'shortcuts': {'help': 191, 'next': 78, 'previous': 80, 'search': 83}, + 'nav_style': 'primary' } } ) diff --git a/mkdocs/tests/theme_tests.py b/mkdocs/tests/theme_tests.py index bb3f2704..f87a58ac 100644 --- a/mkdocs/tests/theme_tests.py +++ b/mkdocs/tests/theme_tests.py @@ -34,7 +34,8 @@ class ThemeTests(unittest.TestCase): 'highlightjs': True, 'hljs_style': 'github', 'hljs_languages': [], - 'shortcuts': {'help': 191, 'next': 78, 'previous': 80, 'search': 83} + 'shortcuts': {'help': 191, 'next': 78, 'previous': 80, 'search': 83}, + 'nav_style': 'primary' }) def test_custom_dir(self): diff --git a/mkdocs/themes/mkdocs/base.html b/mkdocs/themes/mkdocs/base.html index c599333f..a195939c 100644 --- a/mkdocs/themes/mkdocs/base.html +++ b/mkdocs/themes/mkdocs/base.html @@ -59,8 +59,7 @@ - -