-
Notifications
You must be signed in to change notification settings - Fork 317
/
layout.html
115 lines (101 loc) · 3.75 KB
/
layout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{%- extends "basic/layout.html" %}
{%- import "static/webpack-macros.html" as _webpack with context %}
{# prev/next buttons #}
{% macro prev_next(prev, next, prev_title='', next_title='') %}
{%- if prev %}
<a class='left-prev' id="prev-link" href="{{ prev.link|e }}" title="{{ _('previous page')}}">{{ prev_title or prev.title }}</a>
{%- endif %}
{%- if next %}
<a class='right-next' id="next-link" href="{{ next.link|e }}" title="{{ _('next page')}}">{{ next_title or next.title }}</a>
{%- endif %}
{% endmacro %}
{%- block css %}
{{ _webpack.head_pre_bootstrap() }}
{{ _webpack.head_pre_icons() }}
{% block fonts %}
{{ _webpack.head_pre_fonts() }}
{% endblock %}
{{- css() }}
{{ _webpack.head_js_preload() }}
{%- endblock %}
{%- block extrahead %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="docsearch:language" content="en">
{% for favicon in theme_favicons %}
{% if favicon.href[:4] == 'http'%}
<link rel="{{ favicon.rel }}" sizes="{{ favicon.sizes }}" href="{{ favicon.href }}">
{% else %}
<link rel="{{ favicon.rel }}" sizes="{{ favicon.sizes }}" href="{{ pathto('_static/' + favicon.href, 1) }}">
{% endif %}
{% endfor %}
{%- endblock %}
{# Silence the sidebar's, relbar's #}
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}
{% block body_tag %}
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
{%- endblock %}
{%- block content %}
{# Added to support a banner with an alert #}
<div class="container-fluid" id="banner"></div>
{% block docs_navbar %}
<nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main">
{%- include "docs-navbar.html" %}
</nav>
{% endblock %}
<div class="container-xl">
<div class="row">
{% block docs_sidebar %}
{% if sidebars %}
<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar">
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
{% else %}
<div class="col-12 col-md-1 col-xl-2 bd-sidebar no-sidebar"></div>
{% endif %}
{% endblock %}
{% block docs_toc %}
<div class="d-none d-xl-block col-xl-2 bd-toc">
{% if meta is defined and not (meta is not none and 'notoc' in meta) %}
{% for toc_item in theme_page_sidebar_items %}
<div class="toc-item">
{% include toc_item %}
</div>
{% endfor %}
{% endif %}
</div>
{% endblock %}
{% block docs_main %}
{% if sidebars %}
{% set content_col_class = "col-md-9 col-xl-7" %}
{% else %}
{% set content_col_class = "col-md-11 col-xl-8" %}
{% endif %}
<main class="col-12 {{ content_col_class }} py-md-5 pl-md-5 pr-md-4 bd-content" role="main">
{% block docs_body %}
<div>
{% block body %} {% endblock %}
</div>
{% endblock %}
{% if theme_show_prev_next %}
<div class='prev-next-bottom'>
{{ prev_next(prev, next) }}
</div>
{% endif %}
</main>
{% endblock %}
</div>
</div>
{%- block scripts_end %}
{{ _webpack.body_post() }}
{{ generate_google_analytics_script(id=theme_google_analytics_id) }}
{%- endblock %}
{%- endblock %}
{%- block footer %}
{%- include "footer.html" %}
{%- endblock %}