diff --git a/README.rst b/README.rst index 2fe0d917..4026b498 100644 --- a/README.rst +++ b/README.rst @@ -129,6 +129,10 @@ your "conf.py" file:: # Options are "nav" (default), "footer" or anything else to exclude. 'source_link_position': "nav", + # If use relbar (breadcrumbs) or not. + # Values: "true" or "false" (default) + 'relbar_enable': "false", + # Bootswatch (http://bootswatch.com/) theme. # # Options are nothing with "" (default) or the name of a valid theme diff --git a/demo/source/conf.py b/demo/source/conf.py index 574b75d7..ebb65631 100644 --- a/demo/source/conf.py +++ b/demo/source/conf.py @@ -134,6 +134,10 @@ # Options are "nav" (default), "footer" or anything else to exclude. 'source_link_position': "nav", + # If use relbar (breadcrumbs) or not. + # Values: "true" or "false" (default) + 'relbar_enable': "true", + # Bootswatch (http://bootswatch.com/) theme. # # Options are nothing with "" (default) or the name of a valid theme such diff --git a/demo/source/subdir/index.rst b/demo/source/subdir/index.rst index e68659aa..a50fb4c0 100644 --- a/demo/source/subdir/index.rst +++ b/demo/source/subdir/index.rst @@ -4,6 +4,10 @@ Subdirectory Page This page is in a subdirectory. +.. toctree:: + + relbar_example + Headings ======== This is a first level heading (``h1``). diff --git a/demo/source/subdir/relbar_example.rst b/demo/source/subdir/relbar_example.rst new file mode 100644 index 00000000..7042e795 --- /dev/null +++ b/demo/source/subdir/relbar_example.rst @@ -0,0 +1,9 @@ +========================= + Example Page for relbar +========================= + +This page is an example for relbar (breadcrumbs). + +See the top nad the bottom of this page. + + diff --git a/sphinx_bootstrap_theme/bootstrap/layout.html b/sphinx_bootstrap_theme/bootstrap/layout.html index 18e16904..58f6079d 100644 --- a/sphinx_bootstrap_theme/bootstrap/layout.html +++ b/sphinx_bootstrap_theme/bootstrap/layout.html @@ -93,10 +93,36 @@ {% endblock %} -{# Silence the sidebar's, relbar's #} +{# Silence the sidebar's #} {% block header %}{% endblock %} -{% block relbar1 %}{% endblock %} -{% block relbar2 %}{% endblock %} + +{%- block relbar1 %} + {%- if theme_relbar_enable == "true" %} + {{ relbar_bootstrap() }} + {%- endif %} +{% endblock %} + +{%- block relbar2 %} + {%- if theme_relbar_enable == "true" %} + {{ relbar_bootstrap() }} + {%- endif %} +{% endblock %} + +{%- macro relbar_bootstrap() %} +
+{%- endmacro %} + {% block sidebarsourcelink %}{% endblock %} {%- block content %} diff --git a/sphinx_bootstrap_theme/bootstrap/theme.conf b/sphinx_bootstrap_theme/bootstrap/theme.conf index 1fc2ecef..3c77696a 100644 --- a/sphinx_bootstrap_theme/bootstrap/theme.conf +++ b/sphinx_bootstrap_theme/bootstrap/theme.conf @@ -47,6 +47,10 @@ navbar_fixed_top = true # Options are "nav" (default), "footer" or anything else to exclude. source_link_position = nav +# If use relbar (breadcrumbs) or not. +# Values: "true" or "false" (default) +relbar_enable = false + # Bootswatch (http://bootswatch.com/) theme. # # Options are nothing with "" (default) or the name of a valid theme such as