-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (39 loc) · 1.63 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ukraine - Russie - Timeline - Pour comprendre et se forger SON opinion</title>
</head>
<body>
<link title="timeline-styles" rel="stylesheet" href="https://cdn.knightlab.com/libs/timeline3/latest/css/timeline.css">
<!-- 2 -->
<script src="https://cdn.knightlab.com/libs/timeline3/latest/js/timeline.js"></script>
<div id='timeline-embed' style="width: 100%; height: 600px"></div>
<!-- 3 -->
<script type="text/javascript">
// The TL.Timeline constructor takes at least two arguments:
// the id of the Timeline container (no '#'), and
// the URL to your JSON data file or Google spreadsheet.
// the id must refer to an element "above" this code,
// and the element must have CSS styling to give it width and height
// optionally, a third argument with configuration options can be passed.
// See below for more about options.
timeline = new TL.Timeline('timeline-embed',
'https://docs.google.com/spreadsheets/d/134w9am9v5TyC0Wx9EpWybexSWBevgz9kBKKZ-3BfOY4/edit#gid=0');
// make_the_json() is some javascript function you've written
// which creates the appropriate JSON configuration
/*
fetch('https://drive.google.com/file/d/1H6a-aBucHSFmULe0I5pf2SaIiuz4w1Vp/view?usp=sharing').then(async resp => {
if (resp.status === 200) {
const b = await resp.text()
console.log(b)
json = JSON.parse(b)
window.timeline = new TL.Timeline('timeline-embed', json);
return
}
throw new Error("Pas de json")
}).catch(console.log);
*/
</script>
</body>
</html>