-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathpage-template.html
130 lines (105 loc) · 4.43 KB
/
page-template.html
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
<!doctype html>
<html lang="en">
<head>
<title>{{page.page_title}} - {{ page.title }}</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta name="description" content="{{page.page_title}} - {{ page.title }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="og:title" content="{{page.page_title}}" />
<meta name="og:description" content="{{ page.title }}" />
<meta name="og:type" content="website" />
<meta name="og:site_name" content="manual.ardour.org" />
<meta name="og:url" content="https://manual.ardour.org/" />
<meta name="og:image" content="https://manual.ardour.org/images/logo.png" />
<link href="{{page.bootstrap_path}}/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/common.css" rel="stylesheet">
<link href="/css/screen.css" rel="stylesheet">
{% if page.style %}
<link href="/css/{{page.style}}.css" rel="stylesheet">
{% endif %}
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div id="tree">
<a href="/"><img class="img-responsive" src="/images/logo.png" alt="The Ardour Manual" /></a>
<form id="custom-search-form" class="navbar-form" method="post" action="https://duckduckgo.com">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search …" name="q">
<span class="input-group-btn">
<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
{{page.page_pdflink}}
</span>
</div>
<input type="hidden" name="sites" value="manual.ardour.org -site:www.manual.ardour.org"><!-- domain -->
<input type="hidden" name="kh" value="1"> <!--HTTPS on/off -->
<input type="hidden" name="kl" value="wt-wt"> <!--region wt-wt = no region/worldwide -->
<input type="hidden" name="kg" value="p"> <!--get [g] vs post [p] -->
<input type="hidden" name="k7" value="w"> <!-- background colour -->
<input type="hidden" name="kj" value="#212a30"> <!-- results page header colour -->
<input type="hidden" name="kx" value="#59acd4"> <!-- URLs colour -->
<input type="hidden" name="k1" value="-1"> <!-- adverts on/off -->
<input type="hidden" name="k9" value="#59acd4"> <!-- links colour -->
<input type="hidden" name="kaa" value="#2d586c"> <!-- visited links colour -->
<input type="hidden" name="kae" value="#cc0000"> <!-- theme [changes result titles] colour -->
<input type="hidden" name="ka" value="junge"> <!-- link font -->
<input type="hidden" name="kt" value="junge"> <!-- text font -->
</form>
{% tree %}
</div> <!-- tree -->
<div class="span12" id="content">
{% breadcrumbs %}
{% githubedit %}
{% themechanger %}
<h1 class="title">{{ page.title }}</h1>
{{ content }}
<div class="clear"></div>
{% prevnext %}
</div> <!-- content -->
</div> <!-- row-fluid -->
</div> <!-- container-fluid -->
<script type="text/javascript">
// I'll go to hell for this
var isA = function(regex) { return navigator.userAgent.match(regex) };
var isAbout = function(regex) { return document.getElementsByTagName('h1')[1].textContent.match(regex) };
if ( (isA(/Mac/) || isAbout(/OS X/)) && (!isAbout(/Linux/)) ) {
var e = document.getElementsByTagName('body')[0];
e.className += ' mac'; // class magic for Cmd vs. Ctrl keys.
}
function changetheme () {
if (document.body.classList.contains('dark-theme')) {
document.body.classList.remove('dark-theme');
} else {
document.body.classList.add('dark-theme');
}
localStorage.setItem('dark-theme', document.body.classList.contains('dark-theme'));
}
if (localStorage.getItem('dark-theme') === 'true') {
changetheme();
}
// go to next page and previous page using arrow keys
window.addEventListener('keydown', e => {
if (e.target.tagName !== 'INPUT') {
if (e.key === 'ArrowRight') {
document.querySelector('.next a').click()
} else if (e.key === 'ArrowLeft') {
document.querySelector('.previous a').click()
}
}
});
// Add links to headings automatically
window.onload = (e) => {
document.querySelectorAll('h2, h3, h4, h5, h6').forEach( el => {
let a = document.createElement('a');
let slug = el.id !== ''
? el.id
: el.innerText;
el.id = slug;
a.href = `#${slug}`;
a.innerText = ' 🔗';
el.appendChild( a );
});
};
</script>
</body>
</html>