summaryrefslogtreecommitdiffstats
path: root/theme/mkdocs_windmill/base.html
blob: 8b4feb89a4df6ec5205af67871778cc807bd86c7 (plain)
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
<!DOCTYPE html>
<html lang="en">
<head>
  {% set is_top = (page and page.is_homepage) and not force_plain_page %}
  {% set base_url = base_url or "." %}

  {%- 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="/img/favicon.ico">
    {% else %}<link rel="shortcut icon" href="/img/favicon.ico">{% endif %}
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  {%- 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 href="{{ base_url }}/css/bootstrap-3.3.7.min.css" rel="stylesheet">
    <link href="{{ base_url }}/css/font-awesome-4.7.0.css" rel="stylesheet">
    <link href="{{ base_url }}/css/base.css" rel="stylesheet">
    <link rel="stylesheet" href="{{ base_url }}/css/highlight.css">
    {%- for path in extra_css %}
    <link href="{{ path }}" rel="stylesheet">
    {%- endfor %}
  {%- endblock %}

  {%- block libs %}
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

    <script src="{{ base_url }}/js/jquery-3.2.1.min.js"></script>
    <script src="{{ base_url }}/js/bootstrap-3.3.7.min.js"></script>
    <script src="{{ base_url }}/js/highlight.pack.js"></script>
    {% if is_top %}
      <script src="{{ base_url }}/js/elasticlunr.min.js"></script>
    {% endif %}
    <base target="_top">
  {%- endblock %}

  {%- block scripts %}
    <script>
      var base_url = '{{ base_url }}';
      var is_top_frame = {% if is_top %}(window === window.parent){% else %}false{% endif %};
      {%- if page %}
        {# Include the first two levels of TOC data as a JS object, to be rendered in top frame #}
        var pageToc = [
        {%- for item in page.toc %}
          {title: {{ item.title|tojson }}, url: {{ ('#_top' if loop.first else item.url)|tojson }}, children: [
            {%- for item in item.children %}
              {title: {{ item.title|tojson }}, url: {{ item.url|tojson }} },
            {%- endfor %}
          ]},
        {%- endfor %}
        ];
      {%- else %}
        var page_toc = null;
      {%- endif %}

    </script>
    <script src="{{ base_url }}/js/base.js"></script>
    {%- for path in extra_javascript %}
      <script src="{{ path }}"></script>
    {%- endfor %}
  {%- endblock %}

  {%- block analytics %}
    {%- if 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','//www.google-analytics.com/analytics.js','ga');

        ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
        ga('send', 'pageview');
    </script>
    {%- endif %}
  {%- endblock %}

  {%- block extrahead %} {% endblock %}
</head>

<body>
<script>
if (is_top_frame) { $('body').addClass('wm-top-page'); }
</script>

{#
 # Code for the top frame. It should ideally be separate from the index page (which is likely
 # possible once theme_config is released with mkdocs 1.0).
 #}
{%- if is_top -%}
  {% include 'topbar.html' %}

  <div id="main-content" class="wm-page-top-frame">
    {% include 'nav-pane.html' %}
    <div class="wm-content-pane">
      <iframe class="wm-article" name="article"></iframe>
    </div>
  </div>

{%- endif -%}

{# Code for the main template for all content pages. #}

<div class="container-fluid wm-page-content">
  <a name="_top"></a>
  {%- if config.extra.article_nav_top != False %}
    {% include "article-nav.html" %}
  {%- endif %}

  {%- block content %}
    {% if page and page.meta.source %}
      <div class="source-links">
      {% for filename in page.meta.source %}
          <span class="label label-primary">{{ filename }}</span>
      {% endfor %}
      </div>
    {% endif %}

    {{ page.content }}
  {%- endblock %}

  <br>
  {%- if config.extra.article_nav_bottom != False %}
    {% include "article-nav.html" %}
    <br>
  {%- endif %}
</div>

<footer class="container-fluid wm-page-content">
{%- block footer %}
  {%- block repo %}
    {%- if page and page.edit_url %}
      <p>
        <a href="{{ page.edit_url }}">{% include 'repo-icon.html' %}Edit on {{ config.repo_name }}</a>
      </p>
    {%- elif config.repo_url %}
      <p>
        <a href="{{ config.repo_url }}">{% include 'repo-icon.html' %}{{ config.repo_name }}</a>
      </p>
    {%- endif %}
  {%- endblock %}

  {%- if config.copyright %}<p>{{ config.copyright }}</p>{%- endif %}
  <p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a> using <a href="https://github.com/gristlabs/mkdocs-windmill">Windmill</a> theme by Grist Labs.</p>
{%- endblock %}
</footer>

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