aboutsummaryrefslogtreecommitdiffstats
path: root/_better_theme/layout.html
blob: 31c6675447b8c89b26baaa03600968b5eb0a2689 (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
{%- extends "basic/layout.html" %}
{%- from "relbar.html" import relbar_top with context %}
{%- from "relbar.html" import relbar_bottom with context %}

{#- ### head ### -#}

{%- block extrahead %}

  {#- make mobile reasonable #}
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  {%- for css_file in theme_cssfiles %}
    {%- if css_file.startswith('http') %}
      <link rel="stylesheet" href="{{ css_file }}" type="text/css" />
    {%- else %}
      <link rel="stylesheet" href="{{ pathto(css_file, 1) }}" type="text/css" />
    {%- endif %}
  {%- endfor %}

  {%- for js_file in theme_scriptfiles %}
    <script src="{{ pathto(js_file, 1) }}" type="text/javascript"></script>
  {%- endfor %}

  {%- if theme_inlinecss %}
    <style type="text/css">{{ theme_inlinecss|safe }}</style>
  {%- endif %}

  {%- block userhead %}
  {%- endblock %}
{%- endblock %}

{#- ### content ### -#}

{%- block header %}
  {%- if theme_showheader|tobool %}
    <header id="pageheader"><h1><a href="{{ pathto(master_doc) }} ">
        {{ docstitle }}
    </a></h1></header>
  {%- endif %}
{%- endblock %}

{%- block relbar1 -%}{{ relbar_top() }}{%- endblock -%}
{%- block relbar2 -%}{{ relbar_bottom() }}{%- endblock -%}

{%- block footer %}
  <footer id="pagefooter">

    {%- if show_copyright %}
      {%- if hasdoc('copyright') %}
        {% trans path=pathto('copyright'), copyright=copyright|e %}
          <a href="{{ path }}">&copy; {{ copyright }} </a>.
        {% endtrans %}
      {%- else %}
        {%- trans copyright=copyright|e -%}
          &copy; {{ copyright }}.
        {%- endtrans %}
      {%- endif %}
    {%- endif %}

    {%- if last_updated %}
      {%- trans last_updated=last_updated|e -%}
        Last updated on {{ last_updated }}.
      {%- endtrans %}
    {%- endif %}

    {%- if show_sphinx %}
      Created using <a href="http://sphinx-doc.org/">Sphinx</a>
      {{ sphinx_version }}
      {%- if theme_linktotheme|tobool %}
        with the <a href="http://github.com/irskep/sphinx-better-theme">
          better</a> theme
      {%- endif %}.
    {%- else %}
      {%- if theme_linktotheme %}
        This site uses the
        <a href="http://github.com/irskep/sphinx-better-theme">
        &ldquo;better&rdquo;</a>
        theme for Sphinx.
      {%- endif %}
    {%- endif %}

  </footer>

  {% if theme_ga_ua %}
    <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', '{{ theme_ga_ua }}', '{{ theme_ga_domain }}');
      ga('send', 'pageview');
    </script>
  {% endif %}
{%- endblock %}