forked from readthedocs/sphinx_rtd_theme
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdefault.twig
104 lines (87 loc) · 4.49 KB
/
default.twig
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ baseUrl }}/css/theme.css" type="text/css"/>
<link rel="stylesheet" href="{{ baseUrl }}/css/theme-fixes.css" type="text/css"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="{{ baseUrl }}/" class="fa fa-home"> {{ title|default('The title') }}</a>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
{% for itemId, item in menu.items %}
{% set activeMenu = (itemId == currentMenu) %}
<li class="toctree-l1 {{ activeMenu ? 'current' }}">
<a class="reference internal {{ activeMenu ? 'current' }}"
href="{{ item.absoluteUrl|default(baseUrl ~ '/' ~ item.relativeUrl) }}">
{% if not activeMenu and item.items is defined %}
<span class="toctree-expand"></span>
{% endif %}
{{ item.text|raw }}
</a>
{% if activeMenu and item.items is defined %}
<ul>
{% for subItemId,subItem in item.items %}
{% set activeSubMenu = (subItemId == currentSubMenu) %}
<li class="toctree-l2 {{ activeSubMenu ? 'current' }}">
<a class="reference internal {{ activeSubMenu ? 'current' }}" href="{{ subItem.absoluteUrl|default(baseUrl ~ '/' ~ subItem.relativeUrl) }}">
{{ subItem.text|raw }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</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="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ baseUrl }}/">{{ title|default('The title') }}</a>
</nav>
{# PAGE CONTENT #}
<div class="wy-nav-content">
<div class="rst-content">
<div role="main" class="document">
{{ content|raw }}
</div>
<footer>
<hr/>
{% if not github is empty %}
<div role="contentinfo">
<p>
Find {{ title }} on <a href="https://github.com/{{ github.user }}/{{ github.repo }}">GitHub</a>.
</p>
</div>
{% endif %}
Built with <a href="http://couscous.io/">Couscous</a> using a <a href="https://github.com/CouscousPHP/Template-ReadTheDocs">theme</a> based on <a href="https://readthedocs.org/">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<script src="{{ baseUrl }}/js/theme.js"></script>
<script>
$(function() {
// Syntax highlighting
hljs.initHighlightingOnLoad();
});
</script>
</body>
</html>