@knight-lab/timelinejs 3.8.18 → 3.8.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/{CHANGELOG → CHANGELOG.md} +67 -8
  2. package/RELEASING.md +2 -2
  3. package/dist/css/fonts/font.abril-droidsans.css +3 -3
  4. package/dist/css/fonts/font.amatic-andika.css +3 -3
  5. package/dist/css/fonts/font.bevan-pontanosans.css +2 -2
  6. package/dist/css/fonts/font.bitter-raleway.css +4 -4
  7. package/dist/css/fonts/font.clicker-garamond.css +2 -2
  8. package/dist/css/fonts/font.dancing-ledger.css +3 -3
  9. package/dist/css/fonts/font.default.css +4 -4
  10. package/dist/css/fonts/font.fjalla-average.css +2 -2
  11. package/dist/css/fonts/font.georgia-helvetica.css +6 -6
  12. package/dist/css/fonts/font.lustria-lato.css +3 -3
  13. package/dist/css/fonts/font.medula-lato.css +4 -4
  14. package/dist/css/fonts/font.oldstandard.css +2 -2
  15. package/dist/css/fonts/font.opensans-gentiumbook.css +6 -4
  16. package/dist/css/fonts/font.playfair-faunaone.css +5 -5
  17. package/dist/css/fonts/font.playfair.css +3 -3
  18. package/dist/css/fonts/font.pt.css +4 -4
  19. package/dist/css/fonts/font.roboto-megrim.css +8 -8
  20. package/dist/css/fonts/font.rufina-sintony.css +4 -4
  21. package/dist/css/fonts/font.ubuntu.css +3 -3
  22. package/dist/css/fonts/font.unicaone-vollkorn.css +3 -3
  23. package/dist/embed/old-index.html +128 -18
  24. package/dist/js/locale/nb.json +76 -0
  25. package/dist/js/locale/nn.json +76 -0
  26. package/dist/js/timeline-min.js +2 -10
  27. package/dist/js/timeline.js +2 -10
  28. package/dist/js/timeline.js.map +1 -1
  29. package/dist/timeline3.zip +0 -0
  30. package/jest.config.js +2 -0
  31. package/package.json +4 -3
  32. package/src/embed/old-index.html +128 -18
  33. package/src/js/__tests__/Timeline.test.js +28 -8
  34. package/src/js/core/Util.js +1 -1
  35. package/src/js/date/__tests__/TLDate.test.js +2 -2
  36. package/src/js/index.js +1 -1
  37. package/src/js/language/locale/nb.json +76 -0
  38. package/src/js/language/locale/nn.json +76 -0
  39. package/src/js/media/types/Audio.js +7 -11
  40. package/src/js/media/types/Image.js +3 -12
  41. package/src/js/media/types/PDF.js +2 -2
  42. package/src/js/media/types/Video.js +7 -10
  43. package/src/js/timeline/Timeline.js +6 -7
  44. package/src/js/timenav/TimeEra.js +0 -1
  45. package/src/less/fonts/font.georgia-helvetica.less +2 -2
  46. package/src/less/fonts/font.roboto-megrim.less +2 -2
  47. package/src/template/all-media-types.json +68 -38
  48. package/src/template/index.html +4 -1
  49. package/src/template/my-own-timeline.csv +14 -0
@@ -25,31 +25,31 @@ https://www.google.com/fonts/specimen/Unica+One
25
25
  font-family: 'Playfair Display';
26
26
  font-style: normal;
27
27
  font-weight: 400;
28
- src: url(https://fonts.gstatic.com/s/playfairdisplay/v22/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtY.ttf) format('truetype');
28
+ src: url(https://fonts.gstatic.com/s/playfairdisplay/v29/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtY.ttf) format('truetype');
29
29
  }
30
30
  @font-face {
31
31
  font-family: 'Playfair Display';
32
32
  font-style: normal;
33
33
  font-weight: 700;
34
- src: url(https://fonts.gstatic.com/s/playfairdisplay/v22/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKeiunDXbtY.ttf) format('truetype');
34
+ src: url(https://fonts.gstatic.com/s/playfairdisplay/v29/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKeiunDXbtY.ttf) format('truetype');
35
35
  }
36
36
  @font-face {
37
37
  font-family: 'Playfair Display SC';
38
38
  font-style: normal;
39
39
  font-weight: 400;
40
- src: url(https://fonts.gstatic.com/s/playfairdisplaysc/v10/ke85OhoaMkR6-hSn7kbHVoFf7ZfgMPr_lbkMFQ.ttf) format('truetype');
40
+ src: url(https://fonts.gstatic.com/s/playfairdisplaysc/v15/ke85OhoaMkR6-hSn7kbHVoFf7ZfgMPr_lbkMFQ.ttf) format('truetype');
41
41
  }
42
42
  @font-face {
43
43
  font-family: 'Fauna One';
44
44
  font-style: normal;
45
45
  font-weight: 400;
46
- src: url(https://fonts.gstatic.com/s/faunaone/v8/wlpzgwTPBVpjpCuwkuEB3kZP.ttf) format('truetype');
46
+ src: url(https://fonts.gstatic.com/s/faunaone/v13/wlpzgwTPBVpjpCuwkuEB3kZP.ttf) format('truetype');
47
47
  }
48
48
  @font-face {
49
49
  font-family: 'Unica One';
50
50
  font-style: normal;
51
51
  font-weight: 400;
52
- src: url(https://fonts.gstatic.com/s/unicaone/v8/DPEuYwWHyAYGVTSmalsRcd3b.ttf) format('truetype');
52
+ src: url(https://fonts.gstatic.com/s/unicaone/v13/DPEuYwWHyAYGVTSmalsRcd3b.ttf) format('truetype');
53
53
  }
54
54
  /* Font Base
55
55
  ----------------------------------------------------- */
@@ -24,19 +24,19 @@ https://www.google.com/fonts/specimen/Playfair+Display+SC
24
24
  font-family: 'Playfair Display';
25
25
  font-style: normal;
26
26
  font-weight: 400;
27
- src: url(https://fonts.gstatic.com/s/playfairdisplay/v22/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtY.ttf) format('truetype');
27
+ src: url(https://fonts.gstatic.com/s/playfairdisplay/v29/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtY.ttf) format('truetype');
28
28
  }
29
29
  @font-face {
30
30
  font-family: 'Playfair Display';
31
31
  font-style: normal;
32
32
  font-weight: 700;
33
- src: url(https://fonts.gstatic.com/s/playfairdisplay/v22/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKeiunDXbtY.ttf) format('truetype');
33
+ src: url(https://fonts.gstatic.com/s/playfairdisplay/v29/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKeiunDXbtY.ttf) format('truetype');
34
34
  }
35
35
  @font-face {
36
36
  font-family: 'Playfair Display SC';
37
37
  font-style: normal;
38
38
  font-weight: 400;
39
- src: url(https://fonts.gstatic.com/s/playfairdisplaysc/v10/ke85OhoaMkR6-hSn7kbHVoFf7ZfgMPr_lbkMFQ.ttf) format('truetype');
39
+ src: url(https://fonts.gstatic.com/s/playfairdisplaysc/v15/ke85OhoaMkR6-hSn7kbHVoFf7ZfgMPr_lbkMFQ.ttf) format('truetype');
40
40
  }
41
41
  /* Font Base
42
42
  ----------------------------------------------------- */
@@ -25,25 +25,25 @@ http://www.google.com/webfonts/specimen/PT+Serif
25
25
  font-family: 'PT Sans';
26
26
  font-style: normal;
27
27
  font-weight: 400;
28
- src: url(https://fonts.gstatic.com/s/ptsans/v12/jizaRExUiTo99u79D0KEwA.ttf) format('truetype');
28
+ src: url(https://fonts.gstatic.com/s/ptsans/v17/jizaRExUiTo99u79D0KEwA.ttf) format('truetype');
29
29
  }
30
30
  @font-face {
31
31
  font-family: 'PT Sans Narrow';
32
32
  font-style: normal;
33
33
  font-weight: 700;
34
- src: url(https://fonts.gstatic.com/s/ptsansnarrow/v12/BngSUXNadjH0qYEzV7ab-oWlsbg95AiFW_g.ttf) format('truetype');
34
+ src: url(https://fonts.gstatic.com/s/ptsansnarrow/v17/BngSUXNadjH0qYEzV7ab-oWlsbg95AiFW_g.ttf) format('truetype');
35
35
  }
36
36
  @font-face {
37
37
  font-family: 'PT Serif';
38
38
  font-style: italic;
39
39
  font-weight: 400;
40
- src: url(https://fonts.gstatic.com/s/ptserif/v12/EJRTQgYoZZY2vCFuvAFT_r21dw.ttf) format('truetype');
40
+ src: url(https://fonts.gstatic.com/s/ptserif/v17/EJRTQgYoZZY2vCFuvAFT_r21dw.ttf) format('truetype');
41
41
  }
42
42
  @font-face {
43
43
  font-family: 'PT Serif';
44
44
  font-style: normal;
45
45
  font-weight: 400;
46
- src: url(https://fonts.gstatic.com/s/ptserif/v12/EJRVQgYoZZY2vCFuvAFWzro.ttf) format('truetype');
46
+ src: url(https://fonts.gstatic.com/s/ptserif/v17/EJRVQgYoZZY2vCFuvAFWzro.ttf) format('truetype');
47
47
  }
48
48
  /* Font Base
49
49
  ----------------------------------------------------- */
@@ -24,19 +24,19 @@ https://www.google.com/fonts/specimen/Megrim
24
24
  font-family: 'Megrim';
25
25
  font-style: normal;
26
26
  font-weight: 400;
27
- src: url(https://fonts.gstatic.com/s/megrim/v11/46kulbz5WjvLqJZVam_k.ttf) format('truetype');
27
+ src: url(https://fonts.gstatic.com/s/megrim/v16/46kulbz5WjvLqJZVam_k.ttf) format('truetype');
28
28
  }
29
29
  @font-face {
30
30
  font-family: 'Roboto Slab';
31
31
  font-style: normal;
32
32
  font-weight: 300;
33
- src: url(https://fonts.gstatic.com/s/robotoslab/v13/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjo0oSmb2Rm.ttf) format('truetype');
33
+ src: url(https://fonts.gstatic.com/s/robotoslab/v23/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjo0oSmb2Rm.ttf) format('truetype');
34
34
  }
35
35
  @font-face {
36
36
  font-family: 'Roboto Slab';
37
37
  font-style: normal;
38
38
  font-weight: 400;
39
- src: url(https://fonts.gstatic.com/s/robotoslab/v13/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rm.ttf) format('truetype');
39
+ src: url(https://fonts.gstatic.com/s/robotoslab/v23/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rm.ttf) format('truetype');
40
40
  }
41
41
  /* Font Base
42
42
  ----------------------------------------------------- */
@@ -53,7 +53,7 @@ https://www.google.com/fonts/specimen/Megrim
53
53
  .tl-timeline h5,
54
54
  .tl-timeline h6 {
55
55
  font-family: 'Megrim', 'Helvetica Neue', Helvetica, Arial, "MS Trebuchet", sans-serif;
56
- text-transform: normal;
56
+ text-transform: none;
57
57
  font-weight: 400;
58
58
  font-size: 46px;
59
59
  line-height: 46px;
@@ -92,7 +92,7 @@ https://www.google.com/fonts/specimen/Megrim
92
92
  .tl-timeline .tl-timegroup-message {
93
93
  font-family: 'Megrim', 'Helvetica Neue', Helvetica, Arial, "MS Trebuchet", sans-serif;
94
94
  font-weight: 400;
95
- text-transform: normal;
95
+ text-transform: none;
96
96
  }
97
97
  .tl-timeline .tl-slidenav-next .tl-slidenav-title,
98
98
  .tl-timeline .tl-slidenav-previous .tl-slidenav-title,
@@ -104,7 +104,7 @@ https://www.google.com/fonts/specimen/Megrim
104
104
  .tl-timeline h3.tl-headline-date {
105
105
  font-family: 'Roboto Slab', Georgia, serif !important;
106
106
  font-weight: normal !important;
107
- text-transform: normal !important;
107
+ text-transform: none !important;
108
108
  }
109
109
  .tl-timeline .tl-headline-date small,
110
110
  .tl-timeline h3.tl-headline-date small {
@@ -122,7 +122,7 @@ https://www.google.com/fonts/specimen/Megrim
122
122
  .tl-timeline .tl-timenav-slider .tl-timeaxis {
123
123
  font-family: 'Megrim', 'Helvetica Neue', Helvetica, Arial, "MS Trebuchet", sans-serif;
124
124
  font-weight: 400;
125
- text-transform: normal;
125
+ text-transform: none;
126
126
  }
127
127
  .tl-timeline .tl-menubar {
128
128
  font-family: 'Megrim', 'Helvetica Neue', Helvetica, Arial, "MS Trebuchet", sans-serif;
@@ -136,7 +136,7 @@ https://www.google.com/fonts/specimen/Megrim
136
136
  }
137
137
  input[type="text"].editor-headline {
138
138
  font-family: 'Megrim', 'Helvetica Neue', Helvetica, Arial, "MS Trebuchet", sans-serif;
139
- text-transform: normal;
139
+ text-transform: none;
140
140
  font-weight: 400;
141
141
  font-size: 46px;
142
142
  line-height: 46px;
@@ -24,25 +24,25 @@ https://www.google.com/fonts/specimen/Sintony
24
24
  font-family: 'Rufina';
25
25
  font-style: normal;
26
26
  font-weight: 400;
27
- src: url(https://fonts.gstatic.com/s/rufina/v8/Yq6V-LyURyLy-aKCpB5g.ttf) format('truetype');
27
+ src: url(https://fonts.gstatic.com/s/rufina/v13/Yq6V-LyURyLy-aKCpB5g.ttf) format('truetype');
28
28
  }
29
29
  @font-face {
30
30
  font-family: 'Rufina';
31
31
  font-style: normal;
32
32
  font-weight: 700;
33
- src: url(https://fonts.gstatic.com/s/rufina/v8/Yq6W-LyURyLy-aKKHztwu8Za.ttf) format('truetype');
33
+ src: url(https://fonts.gstatic.com/s/rufina/v13/Yq6W-LyURyLy-aKKHztwu8Za.ttf) format('truetype');
34
34
  }
35
35
  @font-face {
36
36
  font-family: 'Sintony';
37
37
  font-style: normal;
38
38
  font-weight: 400;
39
- src: url(https://fonts.gstatic.com/s/sintony/v8/XoHm2YDqR7-98cVUETMtvw.ttf) format('truetype');
39
+ src: url(https://fonts.gstatic.com/s/sintony/v13/XoHm2YDqR7-98cVUETMtvw.ttf) format('truetype');
40
40
  }
41
41
  @font-face {
42
42
  font-family: 'Sintony';
43
43
  font-style: normal;
44
44
  font-weight: 700;
45
- src: url(https://fonts.gstatic.com/s/sintony/v8/XoHj2YDqR7-98cVUGYgIr9AJlg.ttf) format('truetype');
45
+ src: url(https://fonts.gstatic.com/s/sintony/v13/XoHj2YDqR7-98cVUGYgIr9AJlg.ttf) format('truetype');
46
46
  }
47
47
  /* Font Base
48
48
  ----------------------------------------------------- */
@@ -22,19 +22,19 @@
22
22
  font-family: 'Ubuntu';
23
23
  font-style: italic;
24
24
  font-weight: 300;
25
- src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCp6KVjbNBYlgoKejZftVyPN4Q.ttf) format('truetype');
25
+ src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyPN4Q.ttf) format('truetype');
26
26
  }
27
27
  @font-face {
28
28
  font-family: 'Ubuntu';
29
29
  font-style: normal;
30
30
  font-weight: 300;
31
- src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoC1CzjsGyI.ttf) format('truetype');
31
+ src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzjsGyI.ttf) format('truetype');
32
32
  }
33
33
  @font-face {
34
34
  font-family: 'Ubuntu';
35
35
  font-style: normal;
36
36
  font-weight: 500;
37
- src: url(https://fonts.gstatic.com/s/ubuntu/v15/4iCv6KVjbNBYlgoCjC3jsGyI.ttf) format('truetype');
37
+ src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCjC3jsGyI.ttf) format('truetype');
38
38
  }
39
39
  /* Font Base
40
40
  ----------------------------------------------------- */
@@ -24,19 +24,19 @@ https://www.google.com/fonts/specimen/Unica+One
24
24
  font-family: 'Vollkorn';
25
25
  font-style: italic;
26
26
  font-weight: 400;
27
- src: url(https://fonts.gstatic.com/s/vollkorn/v13/0ybuGDoxxrvAnPhYGxksckM2WMCpRjDj-DJGWlmeObE.ttf) format('truetype');
27
+ src: url(https://fonts.gstatic.com/s/vollkorn/v20/0ybuGDoxxrvAnPhYGxksckM2WMCpRjDj-DJGWlmeObE.ttf) format('truetype');
28
28
  }
29
29
  @font-face {
30
30
  font-family: 'Vollkorn';
31
31
  font-style: normal;
32
32
  font-weight: 400;
33
- src: url(https://fonts.gstatic.com/s/vollkorn/v13/0ybgGDoxxrvAnPhYGzMlQLzuMasz6Df2MHGeHmmZ.ttf) format('truetype');
33
+ src: url(https://fonts.gstatic.com/s/vollkorn/v20/0ybgGDoxxrvAnPhYGzMlQLzuMasz6Df2MHGeHmmZ.ttf) format('truetype');
34
34
  }
35
35
  @font-face {
36
36
  font-family: 'Unica One';
37
37
  font-style: normal;
38
38
  font-weight: 400;
39
- src: url(https://fonts.gstatic.com/s/unicaone/v8/DPEuYwWHyAYGVTSmalsRcd3b.ttf) format('truetype');
39
+ src: url(https://fonts.gstatic.com/s/unicaone/v13/DPEuYwWHyAYGVTSmalsRcd3b.ttf) format('truetype');
40
40
  }
41
41
  /* Font Base
42
42
  ----------------------------------------------------- */
@@ -8,8 +8,21 @@
8
8
  <meta name="apple-mobile-web-app-capable" content="yes">
9
9
  <meta name="apple-touch-fullscreen" content="yes">
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
11
- <link rel="icon" type="image/png" href="https://cdn.knightlab.com/libs/purpleline/latest/img/favicon.png">
12
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
11
+ <!-- FAVICONS -->
12
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.knightlab.com/libs/orangeline/latest/assets/favicons/apple-touch-icon.png">
13
+ <link rel="icon" type="image/png" href="https://cdn.knightlab.com/libs/orangeline/latest/assets/favicons/favicon-32x32.png" sizes="32x32">
14
+ <link rel="icon" type="image/png" href="https://cdn.knightlab.com/libs/orangeline/latest/assets/favicons/favicon-16x16.png" sizes="16x16">
15
+ <link rel="manifest" href="https://cdn.knightlab.com/libs/orangeline/latest/assets/favicons/manifest.json">
16
+ <link rel="mask-icon" href="https://cdn.knightlab.com/libs/orangeline/latest/assets/favicons/safari-pinned-tab.svg" color="#5bbad5">
17
+ <!--
18
+ If we want to support loading different versions of timeline like we used to,
19
+ this isn't good enough. We used that to get the non-minimized version, for debugging,
20
+ but now maybe sourcemaps are a better alternative?
21
+ -->
22
+ <script id='timeline-script-tag' type="text/javascript" src="https://cdn.knightlab.com/libs/timeline3/3.8.1/js/timeline.js"></script>
23
+ <link rel="stylesheet" href="https://cdn.knightlab.com/libs/timeline3/3.8.1/css/timeline.css">
24
+ <!-- Google Analytics should be handled by Timeline -->
25
+
13
26
  <base target="_blank">
14
27
 
15
28
  <!-- Style-->
@@ -36,25 +49,122 @@
36
49
  <div id="timeline-embed"></div>
37
50
  <!-- Override -->
38
51
  <script type="text/javascript">
39
- var lang = window.location.href.match(/&lang=([a-zA-Z]*)&?/);
52
+ function ready(fn) {
53
+ if (document.readyState != 'loading') {
54
+ fn();
55
+ } else {
56
+ document.addEventListener('DOMContentLoaded', fn);
57
+ }
58
+ }
59
+
60
+ function setPageLanguage() {
61
+ var lang = window.location.href.match(/&lang=([a-zA-Z]*?)&?/);
62
+
63
+ if (lang) {
64
+ document.getElementsByTagName('html')[0].setAttribute('lang', lang[1]);
65
+ }
40
66
 
41
- if (lang) {
42
- document.getElementsByTagName('html')[0].setAttribute('lang', lang[1]);
43
67
  }
44
- var trim_point = window.location.href.indexOf('embed/index.html');
45
- if (trim_point > 0) {
46
- var embed_path = window.location.href.substring(0, trim_point); // supports https access via https://s3.amazonaws.com/cdn.knightlab.com/libs/timeline/latest/embed/index.html
47
- } else {
48
- var embed_path = "https://cdn.knightlab.com/libs/timeline3/3.6.6/";
68
+
69
+ function computeEmbedPath() {
70
+ var trim_point = window.location.href.indexOf('embed/index.html');
71
+ if (trim_point > 0) {
72
+ return window.location.href.substring(0, trim_point); // supports https access via https://s3.amazonaws.com/cdn.knightlab.com/libs/timeline/latest/embed/index.html
73
+ }
74
+ return "https://cdn.knightlab.com/libs/timeline3/latest/";
75
+ }
76
+
77
+ function addOembedTag() {
78
+ // it's not clear that any tools execute this JS to get the URL, but maybe?
79
+ var oembed_link = document.createElement('link');
80
+ oembed_link['rel'] = 'alternate';
81
+ oembed_link['type'] = 'application/json+oembed';
82
+ oembed_link['href'] = 'https://oembed.knightlab.com/timeline/?url=' + encodeURIComponent(window.location.href);
83
+ document.head.appendChild(oembed_link);
84
+ }
85
+
86
+ function createEmbedDiv(containerId, width, height) {
87
+
88
+ if (typeof(width) != 'string' && typeof(width) != 'number') {
89
+ width = '100%'
90
+ }
91
+
92
+ if (typeof(height) != 'string' && typeof(height) != 'number') {
93
+ height = '100%'
94
+ }
95
+
96
+ // default containerId would be 'timeline-embed'
97
+ t = document.createElement('div');
98
+ t.style.position = 'relative';
99
+
100
+ te = document.getElementById(containerId);
101
+ te.appendChild(t);
102
+ te.classList.add("tl-timeline-embed");
103
+
104
+ if (width.toString().match("%")) {
105
+ te.style.width = width.split("%")[0] + "%";
106
+ } else {
107
+ width = Number(width) - 2;
108
+ te.style.width = (width) + 'px';
109
+ }
110
+
111
+ if (height.toString().match("%")) {
112
+ te.style.height = height;
113
+ te.classList.add("tl-timeline-full-embed");
114
+ } else if (width.toString().match("%")) {
115
+ te.classList.add("tl-timeline-full-embed");
116
+ height = Number(height) - 16;
117
+ te.style.height = (height) + 'px';
118
+ } else {
119
+ height = height - 16;
120
+ te.style.height = (height) + 'px';
121
+ }
49
122
  }
50
- var oembed_link = document.createElement('link');
51
- oembed_link['rel'] = 'alternate';
52
- oembed_link['type'] = 'application/json+oembed';
53
- oembed_link['href'] = 'https://oembed.knightlab.com/timeline/?url=' + encodeURIComponent(window.location.href);
54
- document.head.appendChild(oembed_link);
123
+
124
+ /**
125
+ * Parse all URL parameters as possible Timeline options.
126
+ * Timeline itself will use or ignore these based on actual
127
+ * supported options.
128
+ */
129
+ function optionsFromUrlParams() {
130
+ var param_str = window.location.href.slice(window.location.href.indexOf('?') + 1);
131
+
132
+ if (param_str.match('#')) {
133
+ param_str = param_str.split('#')[0];
134
+ }
135
+
136
+ param_str = param_str.split('&');
137
+
138
+ var url_vars = {}
139
+
140
+ for (var i = 0; i < param_str.length; i++) {
141
+ var uv = param_str[i].split('=');
142
+ url_vars[uv[0]] = uv[1];
143
+ }
144
+
145
+ return url_vars;
146
+ };
147
+
148
+ ready(function() {
149
+ setPageLanguage();
150
+ var embed_path = computeEmbedPath();
151
+ addOembedTag();
152
+
153
+ var options = optionsFromUrlParams();
154
+ createEmbedDiv('timeline-embed', options.width, options.height);
155
+ // ga_property_id is not something we let users override
156
+ options.ga_property_id = 'UA-27829802-4';
157
+ if (typeof(options.source) == 'undefined') {
158
+ options.source = '1xuY4upIooEeszZ_lCmeNx24eSFWe0rHe9ZdqH2xqVNk' // women in computing
159
+ }
160
+
161
+ options.soundcite = true;
162
+
163
+ window.options = options
164
+ window.timeline = new TL.Timeline('timeline-embed', options.source, options)
165
+
166
+ })
55
167
  </script>
56
- <script type="text/javascript" src="https://cdn.knightlab.com/libs/timeline3/3.6.6/js/timeline-embed-cdn.js"></script>
57
- <!-- END Timeline Embed-->
58
168
  </body>
59
169
 
60
- </html>
170
+ </html>
@@ -0,0 +1,76 @@
1
+ {
2
+ "lang": "nb",
3
+ "date": {
4
+ "month_abbr": [
5
+ "Jan.",
6
+ "Feb.",
7
+ "Mars",
8
+ "Apr.",
9
+ "Mai",
10
+ "Juni",
11
+ "Juli",
12
+ "Aug.",
13
+ "Sep.",
14
+ "Okt.",
15
+ "Nov.",
16
+ "Des."
17
+ ],
18
+ "day_abbr": [
19
+ "Søn.",
20
+ "Man.",
21
+ "Tir.",
22
+ "Ons.",
23
+ "Tor.",
24
+ "Fre.",
25
+ "Lør."
26
+ ],
27
+ "day": [
28
+ "Søndag",
29
+ "Mandag",
30
+ "Tirsdag",
31
+ "Onsdag",
32
+ "Torsdag",
33
+ "Fredag",
34
+ "Lørdag"
35
+ ],
36
+ "month": [
37
+ "Januar",
38
+ "Februar",
39
+ "Mars",
40
+ "April",
41
+ "Mai",
42
+ "Juni",
43
+ "Juli",
44
+ "August",
45
+ "September",
46
+ "Oktober",
47
+ "November",
48
+ "Desember"
49
+ ]
50
+ },
51
+ "api": {
52
+ "wikipedia": "no"
53
+ },
54
+ "messages": {
55
+ "loading": "Laster",
56
+ "contract_timeline": "Krymp tidslinje",
57
+ "return_to_title": "Tilbake til tittel",
58
+ "wikipedia": "Fra Wikipedia, den frie encyklopedi",
59
+ "loading_content": "Laster innhold",
60
+ "expand_timeline": "Utvid tidslinje",
61
+ "loading_timeline": "Laster tidslinje... ",
62
+ "swipe_to_navigate": "Sveip for å navigere<br><span class='tl-button'>OK</span>"
63
+ },
64
+ "dateformats": {
65
+ "full_long": "dddd',' d. mmm',' yyyy 'kl.' HH:MM",
66
+ "full_short": "d. mmm",
67
+ "full": "d. mmmm',' yyyy",
68
+ "month_short": "mmm",
69
+ "time_no_seconds_small_date": "HH:MM'<br/><small>'d. mmmm',' yyyy'</small>'",
70
+ "month": "mmmm yyyy",
71
+ "time_no_seconds_short": "HH:MM",
72
+ "time_short": "HH:MM:ss",
73
+ "year": "yyyy",
74
+ "full_long_small_date": "HH:MM'<br/><small>'dddd',' d. mmm',' yyyy'</small>'"
75
+ }
76
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "lang": "nn",
3
+ "date": {
4
+ "month_abbr": [
5
+ "Jan.",
6
+ "Feb.",
7
+ "Mars",
8
+ "Apr.",
9
+ "Mai",
10
+ "Juni",
11
+ "Juli",
12
+ "Aug.",
13
+ "Sep.",
14
+ "Okt.",
15
+ "Nov.",
16
+ "Des."
17
+ ],
18
+ "day_abbr": [
19
+ "Søn.",
20
+ "Mån.",
21
+ "Tys.",
22
+ "Ons.",
23
+ "Tor.",
24
+ "Fre.",
25
+ "Lau."
26
+ ],
27
+ "day": [
28
+ "Søndag",
29
+ "Måndag",
30
+ "Tysdag",
31
+ "Onsdag",
32
+ "Torsdag",
33
+ "Fredag",
34
+ "Laurdag"
35
+ ],
36
+ "month": [
37
+ "Januar",
38
+ "Februar",
39
+ "Mars",
40
+ "April",
41
+ "Mai",
42
+ "Juni",
43
+ "Juli",
44
+ "August",
45
+ "September",
46
+ "Oktober",
47
+ "November",
48
+ "Desember"
49
+ ]
50
+ },
51
+ "api": {
52
+ "wikipedia": "nn"
53
+ },
54
+ "messages": {
55
+ "loading": "Lastar",
56
+ "contract_timeline": "Krymp tidslinje",
57
+ "return_to_title": "Tilbake til tittel",
58
+ "wikipedia": "Frå Wikipedia, det frie oppslagsverket",
59
+ "loading_content": "Lastar innhold",
60
+ "expand_timeline": "Utvid tidslinje",
61
+ "loading_timeline": "Lastar tidslinje... ",
62
+ "swipe_to_navigate": "Sveip for å navigere<br><span class='tl-button'>OK</span>"
63
+ },
64
+ "dateformats": {
65
+ "full_long": "dddd',' d. mmm',' yyyy 'kl.' HH:MM",
66
+ "full_short": "d. mmm",
67
+ "full": "d. mmmm',' yyyy",
68
+ "month_short": "mmm",
69
+ "time_no_seconds_small_date": "HH:MM'<br/><small>'d. mmmm',' yyyy'</small>'",
70
+ "month": "mmmm yyyy",
71
+ "time_no_seconds_short": "HH:MM",
72
+ "time_short": "HH:MM:ss",
73
+ "year": "yyyy",
74
+ "full_long_small_date": "HH:MM'<br/><small>'dddd',' d. mmm',' yyyy'</small>'"
75
+ }
76
+ }