Skip to content

Commit

Permalink
DOC: Upgrade theme
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Apr 2, 2022
1 parent 8e32cbf commit 4f85333
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 33 deletions.
16 changes: 6 additions & 10 deletions doc/theme/layout.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
{% extends "basic/layout.html" %}

{% if theme_bootstrap_version == "3" %}
{% set bootstrap_version, navbar_version = "3.3.7", "" %}
{% set bootstrap_version, navbar_version = "3.4.1", "" %}
{% set bs_span_prefix = "col-md-" %}
{% else %}
{% set bootstrap_version, navbar_version = "2.3.2", "-2" %}
{% set bs_span_prefix = "span" %}
{% endif %}

{% set script_files = script_files + [
'_static/js/jquery-1.11.0.min.js',
'_static/js/jquery-fix.js',
'_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js',
'_static/bootstrap-sphinx.js'
]
%}

{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %}

{%- set bs_content_width = render_sidebar and "9" or "12"%}
Expand Down Expand Up @@ -60,6 +52,10 @@
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.12.4.min.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }}"></script>
<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }}"></script>
{% endblock %}

{# Silence the sidebar's, relbar's #}
Expand All @@ -73,7 +69,7 @@
<div class="container">
<div class="row">
{%- block sidebar1 %}{{ bsidebar() }}{% endblock %}
<div class="{{ bs_span_prefix }}{{ bs_content_width }} content">
<div class="body {{ bs_span_prefix }}{{ bs_content_width }} content" role="main">
{% block body %}{% endblock %}
</div>
{% block sidebar2 %} {# possible location for sidebar #} {% endblock %}
Expand Down
11 changes: 5 additions & 6 deletions doc/theme/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% set script_files = script_files + ['_static/searchtools.js'] %}
{% block extrahead %}
<script type="text/javascript">
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
</script>
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/language_data.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('searchindex.js', 1) }}"></script>
{# this is used when loading the search index using $.ajax fails,
such as on Chrome for documents on localhost #}
<script type="text/javascript" id="searchindexloader"></script>
Expand Down Expand Up @@ -42,15 +41,15 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
</div>
<input type="submit" class="btn btn-default" value="{{ _('search') }}" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
</form>
{% else %}
<form class="form-search">
<input type="text" class="input-medium search-query" name="q" value="" />
<input type="submit" class="btn btn-default" value="{{ _('search') }}" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
{% endif %}

{% if search_performed %}
<h2>{{ _('Search Results') }}</h2>
{% if not search_results %}
Expand Down
5 changes: 0 additions & 5 deletions doc/theme/static/bootstrap-3.3.7/css/bootstrap.min.css

This file was deleted.

7 changes: 0 additions & 7 deletions doc/theme/static/bootstrap-3.3.7/js/bootstrap.min.js

This file was deleted.

5 changes: 5 additions & 0 deletions doc/theme/static/bootstrap-3.4.1/css/bootstrap.min.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions doc/theme/static/bootstrap-3.4.1/js/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/theme/static/bootstrap-sphinx.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@import url("./basic.css");

{% if theme_bootstrap_version == "3" %}
{% set bootstrap_version, bootstrap_additional_css = "3.3.7", "theme" %}
{% set bootstrap_version, bootstrap_additional_css = "3.4.1", "theme" %}
{% else %}
{% set bootstrap_version, bootstrap_additional_css = "2.3.2", "responsive" %}
{% endif %}
Expand Down
4 changes: 0 additions & 4 deletions doc/theme/static/js/jquery-1.11.0.min.js

This file was deleted.

5 changes: 5 additions & 0 deletions doc/theme/static/js/jquery-1.12.4.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions doc/theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
inherit = basic
stylesheet = bootstrap-sphinx.css
pygments_style = tango
# The sphinx bootstrap theme includes information typically presented in a
# theme's sidebar in the navbar, so these are disabled by default.
# Users can override this with `html_sidebars` in their conf.py.
sidebars =

# Configurable options.
[options]
Expand Down

0 comments on commit 4f85333

Please sign in to comment.