aboutsummaryrefslogtreecommitdiff
path: root/docs/_templates/layout.html
blob: 236f5446db8f5ca2cf7a494eaea14a15cdff869a (plain) (blame)
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
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
  {%- block extrahead %} {% endblock %}
  <!-- end extra head -->
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  <link rel="stylesheet" href="{{ pathto('_static/style.css', 1)|e }}" type="text/css" />
  <link rel="stylesheet" href="{{ pathto('_static/codeblocks.css', 1) }}" type="text/css" />
  {%- block css %}
  {%- for css in css_files %}
    {%- if css|attr("filename") %}
  {{ css_tag(css) }}
    {%- else %}
  <link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
    {%- endif %}
  {%- endfor %}
  {%- endblock %}
  {%- block scripts %}
  <script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
  {%- for js in script_files %}
  {{ js_tag(js) }}
  {%- endfor %}
  {%- endblock %}
  {%- if pageurl %}
  <link rel="canonical" href="{{ pageurl|e }}" />
  {%- endif %}
  {%- if favicon %}
  <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1)|e }}"/>
  {%- endif %}
  {%- block linktags %}
  {%- if hasdoc('about') %}
  <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
  {%- endif %}
  {%- if hasdoc('genindex') %}
  <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
  {%- endif %}
  {%- if hasdoc('search') %}
  <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
  {%- endif %}
  {%- if hasdoc('copyright') %}
  <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
  {%- endif %}
  {%- if next %}
  <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
  {%- endif %}
  {%- if prev %}
  <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
  {%- endif %}
  {%- endblock %}
</head>
<body>
{%- block header %}{% endblock %}
  <div class="main-grid">
    {#- The main navigation header #}
    <header class="grid-item">
      <nav>
        <a href="{{ pathto(master_doc)|e }}" class="main-heading">discord.py</a>
        <a href="https://github.com/Rapptz/discord.py">GitHub</a>
        <a href="{{ discord_invite }}">{{ _('Discord') }}</a>
        <a href="{{ pathto('faq') }}">FAQ</a>
        {#- If we have more links we can put them here #}
      </nav>
    </header>
    {#- The sub-header with search and extension related selection #}
    <div class="sub-header grid-item">
      <label for="documentation_select">{{ _('View Documentation For') }}</label>
      <select id="documentation_select" onchange="changeDocumentation(this)">
        {%- if pagename is prefixedwith 'ext/' %}
        <option value="{{ pathto(master_doc)|e }}">discord</option>
        {%- else %}
        <option value="{{ pathto(pagename) }}" selected>discord</option>
        {%- endif %}
        {%- for ext, p in discord_extensions %}
        <option value="{{ pathto(p + '/index')|e }}" {% if pagename is prefixedwith p %}selected{% endif %}>{{ ext }}</option>
        {%- endfor %}
      </select>
      <form role="search" class="search" action="search.html" method="get">
        <div class="searchwrapper">
          <input type="search" name="q" placeholder="{{ _('Search documentation') }}" />
          <button type="submit">
            <i class="fas fa-search"></i>
          </button>
        </div>
      </form>
      <a accesskey="S" class="settings" onclick="openModal(settingsModal);"><i class='fas fa-cog'></i></a>
    </div>
    {#- The sidebar component #}
    <aside class="grid-item">
      <span id="hamburger-toggle">
        <i class="fa fa-bars"></i>
      </span>
      <span id="settings-toggle" class="settings" onclick="openModal(settingsModal);">
        <i class='fas fa-cog'></i>
      </span>
      <div id="sidebar">
        {%- include "localtoc.html" %}
      </div>
    </aside>
    {#- The actual body of the contents #}
    <main class="grid-item">
      {% block body %} {% endblock %}
    </main>
{%- block footer %}
    <footer class="grid-item">
    {%- if show_copyright %}
      {%- if hasdoc('copyright') %}
        {% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
      {%- else %}
        {% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
      {%- endif %}
    {%- endif %}
    {%- if last_updated %}
      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
    {%- endif %}
    {%- if show_sphinx %}
      {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
    {%- endif %}
    </footer>
{%- endblock %}
  </div>
  {%- if READTHEDOCS %}
  <script>
    if (typeof READTHEDOCS_DATA !== 'undefined') {
        if (!READTHEDOCS_DATA.features) {
          READTHEDOCS_DATA.features = {};
        }
        READTHEDOCS_DATA.features.docsearch_disabled = true;
      }
  </script>
  {%- endif %}

  <div id="settings" class="modal" onclick="if (event.target == this){ closeModal(settingsModal); }" hidden>
    <div class="modal-content">
      <span class="close" onclick="closeModal(settingsModal);" title="Close"><i class='fas fa-times'></i></span>
      <h1>Settings</h1>

      <div class='setting'>
        <h3>Use a sans-serif font:
          <label class="toggle"
            title="Use a sans serif font? Your system font will be used, falling back to `sans-serif`.">
            <input type="checkbox" name="useSansFont" onclick="updateSetting(this);">
            <span class="toggle-slider"></span>
          </label>
        </h3>
      </div>

      <div class='setting'>
        <h3>Enable dark theme:
          <label class="toggle" title="Enable the dark theme.">
            <input type="checkbox" name="useDarkTheme" onclick="updateSetting(this);">
            <span class="toggle-slider"></span>
          </label>
        </h3>
      </div>

    </div>
  </div>

</body>
</html>