-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
348 lines (306 loc) · 8.4 KB
/
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
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Honouring the Truth, Reconciling for the Future, Summary of the Final Report of the Truth and Reconciliation Commission of Canada | Unofficial web version</title>
<style>
html {
font-size: 18pt;
line-height: 1.618em;
font-family: Utopia, Cambria, 'Hoefler Text', 'Liberation Serif', 'Nimbus Roman No9 L Regular', Times, 'Times New Roman', serif;
}
@media screen and (max-width: 58em) {
html { line-height: 1.5em; }
}
html,
body {
margin: 0;
padding: 0 0 3em;
}
.wrap {
display: flex;
justify-content: center;
margin: 0 0 0 5%;
}
.doc {
max-width: 36em;
}
.toc ul ul ul {
display: none;
}
.headerlink {
color: #7ac;
padding: 0 0.5em;
opacity: 0;
transition: opacity 0.5s;
}
h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink,
h5:hover .headerlink,
h6:hover .headerlink {
opacity: 1;
transition: opacity 0.1s;
}
h1 {
font-size: 2.4em;
line-height: 1.2em;
font-weight: normal;
}
.section1 {
margin-top: 2.5em;
padding-top: 8em;
border-top: 1px solid #aaa;
}
header h1 {
padding-top: 3em;
}
header h2 {
margin-bottom: 4em;
}
h2,
h3,
h4,
h5,
h6 {
margin-top: 2em;
line-height: 1.2em;
}
h4,
.section4 ol,
figcaption,
.tools,
.control {
font-family: 'Segoe UI', Candara, 'Bitstream Vera Sans', 'DejaVu Sans', 'Bitstream Vera Sans', 'Trebuchet MS', Verdana, 'Verdana Ref', sans-serif;
}
section > p {
margin: 0;
text-indent: 2em;
text-align: justify;
}
section > p > img {
margin: 2em 0 2em -2em;
}
img {
width: 100%;
}
ul {
padding-left: 3em; /* 2em * 1.5 */
}
ol {
padding-left: 3em;
}
ol ol {
list-style-type: lower-roman;
padding-left: 1em;
}
.section4 ol {
padding-left: 3.375em; /* 18pt / 16pt * 2em * 1.5 */
font-size: 16pt;
line-height: 1.4em;
}
.section4 ol ol {
padding-left: 1.125em; /* 18pt / 16pt * 1em */
}
blockquote {
font-size: 16pt;
margin-left: 4.5em; /* 18pt / 16pt * 2em * 2 */
margin-right: 4.5em;
line-height: 1.4em
}
@media screen and (max-width: 58em) {
blockquote { line-height: 1.333em; }
}
figure {
margin: 2em 0;
}
figure > img {
display: block;
margin: 0 auto;
}
figcaption {
font-size: 14pt;
line-height: 1.2em;
}
a {
color: #133952;
}
abbr {
cursor: help;
}
.control-col {
position: relative;
min-width: 4em;
margin-left: 10pt;
}
.control {
display: none; /* gets set to 'block' via JS */
position: relative;
margin-top: 0.4em;
line-height: 1.5em;
color: #999;
transition: top 0.25s ease-in-out;
}
.control ul,
.control li {
list-style-type: none;
margin: 0;
padding: 0;
}
.control li:first-child a {
border-radius: 0 8px 0 0;
}
.control li:last-child a {
border-radius: 0 0 8px 0;
}
.control a {
display: inline-block;
margin: 1px 4px 0 0;
width: 1.5em;
text-align: center;
color: #fff;
font-weight: bold;
text-decoration: none;
background: #ddd;
}
.control a:hover {
background: #7ac;
}
.control .page {
font-size: 12pt;
font-style: italic;
}
.interact {
display: flex;
}
.interact iframe {
width: 100%;
}
</style>
</head>
<body>
<script>
var PDF_PAGE_OFFSET = -6,
REPORT_BASE = 'https://docs.google.com/forms/d/1b3BHh2tI85uf0q36lrm1iIXO7Y2sYr8opusXHOjYLOc/viewform',
YT_BASE = 'https://www.youtube-nocookie.com/embed/',
YT_OPTS = '?showinfo=0&autoplay=1';
var control = {},
controlOffset,
currentId;
window.addEventListener('load', function() {
initTools();
updateGeom();
window.addEventListener('resize', updateGeom);
document.body.addEventListener('mouseover', hoverSomething);
document.body.addEventListener('click', hoverSomething); // for mobile
document.body.addEventListener('mouseout', leaveSomething);
control.watch.addEventListener('click', playVideo);
});
function offsetTop(el) {
for (var y=el.offsetTop; el=el.offsetParent; y += el.offsetTop);
return y;
}
function updateGeom() {
controlOffset = -offsetTop(control.col);
}
function initTools() {
control.col = document.querySelector('.control-col')
control.box = document.querySelector('.control');
control.p = control.box.querySelector('.pageno');
control.share = control.box.querySelector('.sharelink');
control.watch = control.box.querySelector('.watchlink');
control.report = control.box.querySelector('.reportlink');
control.video = control.box.querySelector('.video');
}
function hoverSomething(e) {
var dataP = null,
t = e.target;
while (!(dataP = t.getAttribute('data-p'))) {
if ((t = t.parentNode) === document) { return; }
}
currentId = t.id;
var pages = t.getAttribute('data-p').split(' ')
.map(function(p) { return parseInt(p) + PDF_PAGE_OFFSET; });
control.box.style.display = 'block';
control.box.style.top = offsetTop(t) + controlOffset + 'px';
control.share.href = '#' + currentId;
control.report.href = [
REPORT_BASE,
[
['entry.545447823', pages.join(',')].join('='),
['entry.1968688779', currentId].join('='),
].join('&'),
].join('?');
control.p.innerHTML = pages.join(', ');
}
function minsToSeconds(s) {
var z = s.split(':').map(function(n) { return parseInt(n); });
return z[0] * 60 + z[1];
}
function playVideo(e) {
e.preventDefault();
var target = document.getElementById(currentId),
candidates = Array.prototype.slice.apply(document.querySelectorAll('[data-p]')),
candidate_i = candidates.indexOf(target),
vid;
while (!(vid = V_BY_ID[candidates[candidate_i].id]) && candidate_i--);
var marker = null;
vid.markers.forEach(function(m, i) {
if (m.id === candidates[candidate_i].id) {
marker = m.end ? m.t ? m : vid.markers[i-1] : m;
}
});
var tParam = '&start=' + minsToSeconds(marker.t),
embedURL = [YT_BASE, vid.yt, YT_OPTS, tParam].join('');
var embed = document.createElement('iframe');
embed.setAttribute('width', 560);
embed.setAttribute('height', 315);
embed.setAttribute('frameborder', 0);
embed.setAttribute('allowfullscreen', true);
embed.setAttribute('src', embedURL);
control.video.innerHTML = '';
control.video.appendChild(embed);
}
function leaveSomething(e) {
}
</script>
<div class="wrap">
<div class="doc">
<header>
<h1>Honouring the Truth, Reconciling for the Future</h1>
<h2>Summary of the Final Report of the Truth and Reconciliation Commission of Canada</h2>
<p>This web version of the Report is an <a href="https://github.com/uniphil/trc-plaintext">unofficial plain-text extract</a> of the <a href="http://www.trc.ca/websites/trcinstitution/File/2015/Findings/Exec_Summary_2015_05_31_web_o.pdf">original</a>(PDF, 14MB) published by the <a href="http://trc.ca">The Truth and Reconciliation Commission of Canada</a>.</p>
<p>It is aimed at making the Report more accessible.</p>
</header>
<h1>Contents</h1>
{contents}
</div>
<div class="control-col">
<div class="control">
<div class="interact">
<ul class="buttons">
<li><a class="sharelink" title="Permanent link">¶</a></li>
<li><a class="watchlink" title="Watch and listen to this section via #ReadTheTRCReport" href="#">▶</a></li>
<li><a class="reportlink" title="Report formatting issue" target="_blank">!</a></li>
</ul>
<div class="video">
</div>
</div>
<p class="page">p. <span class="pageno"></span></p>
</div>
</div>
<div class="video"></div>
</div>
<script>
var VIDEOS = {videos},
V_BY_ID = {};
VIDEOS.forEach(function(vidStuff) {
if (!vidStuff.markers) { return; }
vidStuff.markers.forEach(function(marker) {
V_BY_ID[marker.id] = vidStuff;
});
});
</script>
</body>
</html>