This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.twig
108 lines (85 loc) · 4.48 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
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title }}</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
<link rel="stylesheet" href="{{ baseUrl }}/css/main.css">
</head>
<body>
<header class="navbar navbar-default navbar-fixed-top">
<a class="navbar-brand" href="{{ baseUrl }}/">
{{ title|default('The title') }}
<small class="hidden-xs hidden-sm">
{{ subTitle|default('This is the default subtitle!')|raw }}
</small>
</a>
{% if github is defined %}
<a href="https://github.com/{{ github.user }}/{{ github.repo }}">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
</a>
{% endif %}
</header>
<main class="{{ menu ? 'container-fluid' : 'container' }}">
<div class="row">
{% if menu is defined %}
<nav id="sidebar" class="col-sm-3 col-lg-2" role="navigation">
{% for section in menu.sections %}
{%if section.name is defined %}
<p class="text-muted">
{{ section.name }}
</p>
{% endif %}
<ul class="nav nav-pills nav-stacked">
{% for itemId, item in section.items %}
<li class="{{ itemId == currentMenu ? 'active' }}">
<a href="{{ item.absoluteUrl|default(baseUrl ~ item.relativeUrl) }}">
{{ item.text|raw }}
</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</nav>
{% endif %}
<section class="{{ menu ? 'col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10' : 'col-sm-12' }}">
{{ content|raw }}
<div id="go-top">
<hr />
<p>
<a class="btn btn-primary btn-sm" href="#" role="button">
<span class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>
</a>
</p>
</div>
</section>
</div>
</main>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<script>
$(function() {
hljs.initHighlightingOnLoad();
var top = $('#go-top');
$(window).scroll(function() {
if($(window).scrollTop() + $(window).height() <= $(document).height() - 100) {
return;
}
top.fadeIn();
});
});
{% if gaTrackingId is defined %}
(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', '{{gaTrackingId}}', 'auto');
ga('send', 'pageview');
{% endif %}
</script>
</body>
</html>