File: base.html

package info (click to toggle)
python-mkdocs 1.4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,640 kB
  • sloc: python: 12,310; javascript: 2,315; perl: 142; sh: 84; makefile: 24; xml: 12
file content (191 lines) | stat: -rw-r--r-- 7,479 bytes parent folder | download
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html class="writer-html5" lang="{{ config.theme.locale|default('en') }}" >
<head>
  {%- block site_meta %}
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    {%- if page and page.is_homepage %}<meta name="description" content="{{ config.site_description }}" />{%- endif %}
    {%- if config.site_author %}<meta name="author" content="{{ config.site_author }}" />{%- endif %}
    {%- if page and page.canonical_url %}<link rel="canonical" href="{{ page.canonical_url }}" />{%- endif %}
    {%- if config.site_favicon %}
      <link rel="shortcut icon" href="{{ config.site_favicon|url }}" />
    {%- else %}
      <link rel="shortcut icon" href="{{ 'img/favicon.ico'|url }}" />
    {%- endif %}
  {%- endblock %}

  {%- block htmltitle %}
    <title>{% if page and page.title and not page.is_homepage %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
  {%- endblock %}

  {%- block styles %}
    <link rel="stylesheet" href="{{ 'css/theme.css'|url }}" />
    <link rel="stylesheet" href="{{ 'css/theme_extra.css'|url }}" />
    {%- if config.theme.highlightjs %}
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
    {%- endif %}
    {%- for path in extra_css %}
        <link href="{{ path }}" rel="stylesheet" />
    {%- endfor %}
  {%- endblock %}

  {%- block libs %}
    {% if page %}
      <script>
        // Current page data
        var mkdocs_page_name = {{ page.title|tojson }};
        var mkdocs_page_input_path = {{ page.file.src_path|string|tojson }};
        var mkdocs_page_url = {{ page.abs_url|tojson }};
      </script>
    {% endif %}
    <script src="{{ 'js/jquery-3.6.0.min.js'|url }}" defer></script>
    <!--[if lt IE 9]>
      <script src="{{ 'js/html5shiv.min.js'|url }}"></script>
    <![endif]-->
    {%- if config.theme.highlightjs %}
      <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
      {%- for lang in config.theme.hljs_languages %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/languages/{{lang}}.min.js"></script>
      {%- endfor %}
      <script>hljs.initHighlightingOnLoad();</script>
    {%- endif %}
  {%- endblock %}

  {%- block extrahead %} {% endblock %}

  {%- block analytics %}
    {%- if config.theme.analytics.gtag %}
      <script async src="https://www.googletagmanager.com/gtag/js?id={{ config.theme.analytics.gtag }}"></script>
      <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', '{{ config.theme.analytics.gtag }}'{%- if config.theme.analytics.anonymize_ip %}, {'anonymize_ip': true}{%- endif %});
      </script>
    {%- elif config.google_analytics %}
      <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

        ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
        {%- if config.theme.analytics.anonymize_ip %}ga('set', 'anonymizeIp', true);{%- endif %}
        ga('send', 'pageview');
      </script>
    {% endif %}
  {%- endblock %}
</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    {#- SIDE NAV, TOGGLES ON MOBILE #}
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
    <div class="wy-side-scroll">
      <div class="wy-side-nav-search">
      {%- block site_name %}
        {%- if config.theme.logo %}
          <a href="{{ nav.homepage.url|url }}">
        {%- else %}
          <a href="{{ nav.homepage.url|url }}" class="icon icon-home"> {{ config.site_name }}
        {%- endif %}
        {%- if config.theme.logo %}
          <img src="{{ config.theme.logo|url }}" class="logo" alt="{% trans %}Logo{% endtrans %}"/>
        {%- endif %}
        </a>
      {%- endblock %}
      {%- if config.extra.version %}
        <div class="version">
          {{ config.extra.version }}
        </div>
      {%- endif %}
      {%- block search_button %}
        {%- if 'search' in config['plugins'] %}{%- include "searchbox.html" %}{%- endif %}
      {%- endblock %}
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{% trans %}Navigation menu{% endtrans %}">
        {%- block site_nav %}
          {%- set navlevel = 1 %}
          {%- for nav_item in nav %}
            {%- if nav_item.is_section %}
              <p class="caption"><span class="caption-text">{{ nav_item.title }}</span></p>
              <ul{% if nav_item.active %} class="current"{% endif %}>
                {%- for nav_item in nav_item.children %}
                  <li class="toctree-l{{ navlevel }}{% if nav_item.active %} current{% endif %}">
                    {%- include 'nav.html' %}
                  </li>
                {%- endfor %}
              </ul>
            {%- elif config.theme.include_homepage_in_sidebar or (not nav_item == nav.homepage) %}
              <ul{% if nav_item.active %} class="current"{% endif %}>
                <li class="toctree-l{{ navlevel }}{% if nav_item.active %} current{% endif %}">
                  {%- include 'nav.html' %}
                </li>
              </ul>
            {%- endif %}
          {%- endfor %}
        {%- endblock %}
      </div>
    </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      {#- MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
      <nav class="wy-nav-top" role="navigation" aria-label="{% trans %}Mobile navigation menu{% endtrans %}">
        {%- block mobile_nav %}
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="{{ nav.homepage.url|url }}">{{ config.site_name }}</a>
        {% endblock %}
      </nav>

      {#- PAGE CONTENT #}
      <div class="wy-nav-content">
        <div class="rst-content">
          {%- include "breadcrumbs.html" %}
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div class="section" itemprop="articleBody">
              {% block content %}
                {{ page.content }}
              {% endblock %}
            </div>
          </div>
          {%- block footer %}
            {%- include "footer.html" %}
          {% endblock %}
        </div>
      </div>

    </section>

  </div>

  {% include "versions.html" -%}

  {%- block scripts %}
    <script>var base_url = '{{ base_url }}';</script>
    <script src="{{ 'js/theme_extra.js'|url }}" defer></script>
    <script src="{{ 'js/theme.js'|url }}" defer></script>
    {%- for path in extra_javascript %}
      <script src="{{ path }}" defer></script>
    {%- endfor %}
    <script defer>
        window.onload = function () {
            SphinxRtdTheme.Navigation.enable({{ 'true' if config.theme.sticky_navigation else 'false' }});
        };
    </script>
  {%- endblock %}

</body>
</html>
{% if page and page.is_homepage %}
<!--
MkDocs version : {{ mkdocs_version }}
Build Date UTC : {{ build_date_utc }}
-->
{% endif %}