From 044cb02e9f70e4b5abe8ca59a037f3b1308eecf0 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 28 Feb 2022 01:03:14 -0500 Subject: [PATCH 1/2] navbar_links supports menus --- README.rst | 13 +++++++++++++ sphinx_bootstrap_theme/bootstrap/navbar.html | 17 ++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d75bf41e..07c7340c 100644 --- a/README.rst +++ b/README.rst @@ -96,9 +96,22 @@ your "conf.py" file:: # (name, "http://example.com", True) # arbitrary absolute url # Note the "1" or "True" value above as the third argument to indicate # an arbitrary url. + # You can create a menu of links by making the name '_menu' and + # providing a list of links or '_divider' to add a divider. + # ("_menu", name, [ + # ("Examples", "examples"), + # ("_divider", ), + # ("Link", "http://example.com", True), + # ]) + 'navbar_links': [ ("Examples", "examples"), ("Link", "http://example.com", True), + ("_menu", "Example Menu", [ + ("Examples", "examples"), + ("_divider", ), + ("Link", "http://example.com", True), + ]), ], # Render the next and previous page links in navbar. (Default: true) diff --git a/sphinx_bootstrap_theme/bootstrap/navbar.html b/sphinx_bootstrap_theme/bootstrap/navbar.html index 5c1d9b9b..2a4a0796 100644 --- a/sphinx_bootstrap_theme/bootstrap/navbar.html +++ b/sphinx_bootstrap_theme/bootstrap/navbar.html @@ -20,7 +20,22 @@