diff --git a/README.rst b/README.rst index cbf05b9..5e40ee5 100644 --- a/README.rst +++ b/README.rst @@ -90,6 +90,17 @@ The following is a description of the options that can be specified in **html_th # Html table header class. # Values: 'inverse', 'light' (Deafult: 'inverse') 'table_thead_class' : 'inverse' + + # Additional navigation links on the sidebar + 'extra_nav_links': {'Page index':'/genindex.html'}, + + # Use one of the color themes from bootswatch. + # https://bootswatch.com/ + # Values: 'None', 'cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', + # 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', + # 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti' + # (Default: 'None') + 'bootswatch' : 'None' } diff --git a/themes/sphinxbootstrap4theme/layout.html b/themes/sphinxbootstrap4theme/layout.html index 1e450d4..b597528 100644 --- a/themes/sphinxbootstrap4theme/layout.html +++ b/themes/sphinxbootstrap4theme/layout.html @@ -7,16 +7,28 @@ {{ super() }} {% endblock %} -{% set css_files = css_files + [ - '_static/bootstrap-4.3.1-dist/css/bootstrap.min.css', +{# Ideally we want the default css first, then bootstrap followed by any custom css + This way the custom css can override any bootstrap formatting if needed #} + +{% set css_files = [ '_static/sphinxbootstrap4.css' -] %} +] + css_files %} + +{% if theme_bootswatch %} + {% set css_files = [ + '_static/bootswatch-4.3.1-dist/' + theme_bootswatch + '/bootstrap.min.css' + ] + css_files %} +{% else %} + {% set css_files = [ + '_static/bootstrap-4.3.1-dist/css/bootstrap.min.css' + ] + css_files %} +{% endif %} -{% set script_files = script_files + [ - '_static/bootstrap-4.3.1-dist/js/bootstrap.min.js', - '_static/sphinxbootstrap4.js' - ] -%} +{%- block scripts %} + {{ super() }} + + +{%- endblock %} {%- macro sphinxsidebar() %} {%- if render_sidebar %} @@ -28,6 +40,16 @@ {%- for sidebartemplate in sidebars %} {%- include sidebartemplate %} {%- endfor %} + + {% if theme_extra_nav_links %} +