Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}


Expand Down
40 changes: 31 additions & 9 deletions themes/sphinxbootstrap4theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
<script type="text/javascript" src="{{ pathto('_static/bootstrap-4.3.1-dist/js/bootstrap.min.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/sphinxbootstrap4.js', 1) }}"></script>
{%- endblock %}

{%- macro sphinxsidebar() %}
{%- if render_sidebar %}
Expand All @@ -28,6 +40,16 @@
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}

{% if theme_extra_nav_links %}
<hr />
<ul>
{% for text, uri in theme_extra_nav_links.items() %}
<li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
{% endfor %}
</ul>
{% endif %}

{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}
Expand Down Expand Up @@ -81,7 +103,7 @@
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
<div class="body">
<div class="body" role="main">
{% block body %} {% endblock %}
</div>
{%- if render_sidebar %}
Expand Down
9 changes: 9 additions & 0 deletions themes/sphinxbootstrap4theme/localtoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{# Allow for CSS on the local toc #}
{%- if display_toc %}
<div class="local-toc-heading">
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table of Contents') }}</a></h3>
</div>
<div class="local-toc">
{{ toc }}
</div>
{%- endif %}
2 changes: 1 addition & 1 deletion themes/sphinxbootstrap4theme/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{%- endif %}
<ul class="navbar-nav mr-auto">
{% if theme_navbar_show_pages %}
<li class="nav-item dropdown d-none d-sm-block" id="navbar-pages">
<li class="nav-item dropdown" id="navbar-pages">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">{{theme_navbar_pages_title}}</a>
<ul class="dropdown-menu">
{{ toctree(maxdepth=4, collapse=False, includehidden=False) }}
Expand Down
5 changes: 4 additions & 1 deletion themes/sphinxbootstrap4theme/search.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% extends "!layout.html" %}
{% set title = _('Search') %}
{% set script_files = script_files + ['_static/searchtools.js'] %}
{%- block scripts %}
{{ super() }}
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
{%- endblock %}
{% block extrahead %}
<script type="text/javascript">
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Cerulean 4.3.1
// Bootswatch


@mixin btn-shadow($color){
@include gradient-y-three-colors(lighten($color, 8%), $color, 60%, darken($color, 4%));
}

$text-shadow: 0 1px 0 rgba(0, 0, 0, 0.05) !default;

// Navbar ======================================================================

.bg-primary {
@include btn-shadow($primary);
}

.bg-dark {
@include btn-shadow($blue);
}

.bg-light {
@include gradient-y-three-colors(lighten($gray-200, 8%), $gray-200, 60%, darken($gray-200, 2%));
}

.navbar-brand,
.nav-link {
text-shadow: $text-shadow
}

// Buttons =====================================================================

.btn {
text-shadow: $text-shadow
}

.btn-primary {
@include btn-shadow($primary);
}

.btn-secondary {
@include btn-shadow($secondary);
color: $gray-700;
}

.btn-success {
@include btn-shadow($success);
}

.btn-info {
@include btn-shadow($info);
}

.btn-warning {
@include btn-shadow($warning);
}

.btn-danger {
@include btn-shadow($danger);
}

.btn-light {
@include btn-shadow($light);
}

.btn-dark {
@include btn-shadow($dark);
}


// Typography ==================================================================

.text-secondary {
color: $gray-500 !important;
}

.bg-primary,
.bg-success,
.bg-info,
.bg-warning,
.bg-danger,
.bg-dark {
h1, h2, h3, h4, h5, h6 {
color: $white;
}
}

// Tables ======================================================================

// Forms =======================================================================

// Navs ========================================================================

.dropdown-menu {
.dropdown-header {
color: $gray-600;
}
}

// Indicators ==================================================================

// Progress bars ===============================================================

// Containers ==================================================================
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Cerulean 4.3.1
// Bootswatch

//
// Color system
//

$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #868e96 !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
$black: #000 !default;

$blue: #033C73 !default;
$indigo: #6610f2 !default;
$purple: #6f42c1 !default;
$pink: #e83e8c !default;
$red: #C71C22 !default;
$orange: #fd7e14 !default;
$yellow: #DD5600 !default;
$green: #73A839 !default;
$teal: #20c997 !default;
$cyan: #2FA4E7 !default;

$primary: $cyan !default;
$secondary: $gray-200 !default;
$success: $green !default;
$info: $blue !default;
$warning: $yellow !default;
$danger: $red !default;
$light: $gray-100 !default;
$dark: $gray-800 !default;

// Body

$body-color: $gray-700 !default;

// Fonts

$headings-color: $cyan !default;

// Dropdowns

$dropdown-link-color: $body-color !default;
$dropdown-link-hover-color: $white !default;
$dropdown-link-hover-bg: $primary !default;

// Navbar

$navbar-dark-color: rgba($white,.8) !default;
$navbar-dark-hover-color: $white !default;
Loading