@knight-lab/timelinejs 3.8.21 → 3.9.0

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 (213) hide show
  1. package/.nvmrc +1 -1
  2. package/API_TEST.html +0 -5
  3. package/CHANGELOG.md +6 -0
  4. package/dist/css/fonts/font.amatic-andika.css +1 -1
  5. package/dist/css/fonts/font.bitter-raleway.css +4 -4
  6. package/dist/css/fonts/font.clicker-garamond.css +1 -1
  7. package/dist/css/fonts/font.dancing-ledger.css +2 -2
  8. package/dist/css/fonts/font.oldstandard.css +2 -2
  9. package/dist/css/fonts/font.opensans-gentiumbook.css +2 -2
  10. package/dist/css/fonts/font.playfair-faunaone.css +2 -2
  11. package/dist/css/fonts/font.playfair.css +2 -2
  12. package/dist/css/fonts/font.roboto-megrim.css +2 -2
  13. package/dist/css/fonts/font.unicaone-vollkorn.css +2 -2
  14. package/dist/css/icons/tl-icons.eot +0 -0
  15. package/dist/css/icons/tl-icons.svg +58 -55
  16. package/dist/css/icons/tl-icons.ttf +0 -0
  17. package/dist/css/icons/tl-icons.woff +0 -0
  18. package/dist/css/icons/tl-icons.woff2 +0 -0
  19. package/dist/css/themes/timeline.theme.contrast.css +157 -319
  20. package/dist/css/themes/timeline.theme.dark.css +146 -308
  21. package/dist/css/timeline.css +155 -317
  22. package/dist/css/timeline.css.map +1 -1
  23. package/dist/embed/compare.html +4 -4
  24. package/dist/embed/index.html +3 -6
  25. package/dist/embed/old-index.html +2 -5
  26. package/dist/embed/popular_timelines.json +5989 -1
  27. package/dist/js/locale/af.json +54 -56
  28. package/dist/js/locale/ar.json +54 -56
  29. package/dist/js/locale/be.json +71 -73
  30. package/dist/js/locale/bg.json +54 -56
  31. package/dist/js/locale/ca.json +54 -56
  32. package/dist/js/locale/cz.json +56 -63
  33. package/dist/js/locale/da.json +54 -56
  34. package/dist/js/locale/de.json +1 -3
  35. package/dist/js/locale/el.json +54 -56
  36. package/dist/js/locale/en-24hr.json +51 -57
  37. package/dist/js/locale/en-week.json +51 -57
  38. package/dist/js/locale/en.json +3 -8
  39. package/dist/js/locale/eo.json +54 -56
  40. package/dist/js/locale/es.json +55 -57
  41. package/dist/js/locale/et.json +54 -56
  42. package/dist/js/locale/eu.json +54 -56
  43. package/dist/js/locale/fa.json +52 -54
  44. package/dist/js/locale/fi.json +73 -75
  45. package/dist/js/locale/fo.json +54 -56
  46. package/dist/js/locale/fr.json +1 -8
  47. package/dist/js/locale/fy.json +71 -73
  48. package/dist/js/locale/ga.json +54 -56
  49. package/dist/js/locale/gl.json +54 -56
  50. package/dist/js/locale/he.json +54 -56
  51. package/dist/js/locale/hi.json +72 -74
  52. package/dist/js/locale/hr.json +54 -56
  53. package/dist/js/locale/hu.json +91 -93
  54. package/dist/js/locale/hy.json +54 -56
  55. package/dist/js/locale/id.json +54 -56
  56. package/dist/js/locale/is.json +54 -56
  57. package/dist/js/locale/it.json +18 -20
  58. package/dist/js/locale/iw.json +54 -56
  59. package/dist/js/locale/ja.json +54 -56
  60. package/dist/js/locale/ka.json +54 -56
  61. package/dist/js/locale/ko.json +54 -56
  62. package/dist/js/locale/lb.json +54 -56
  63. package/dist/js/locale/lt.json +54 -56
  64. package/dist/js/locale/lv.json +54 -56
  65. package/dist/js/locale/ms.json +54 -56
  66. package/dist/js/locale/my.json +31 -38
  67. package/dist/js/locale/nb.json +54 -56
  68. package/dist/js/locale/ne.json +54 -56
  69. package/dist/js/locale/nl.json +54 -56
  70. package/dist/js/locale/nn.json +54 -56
  71. package/dist/js/locale/no.json +54 -56
  72. package/dist/js/locale/pl.json +54 -56
  73. package/dist/js/locale/pt-br.json +45 -47
  74. package/dist/js/locale/pt.json +57 -59
  75. package/dist/js/locale/rm.json +54 -56
  76. package/dist/js/locale/ro.json +54 -56
  77. package/dist/js/locale/ru.json +54 -56
  78. package/dist/js/locale/si.json +53 -55
  79. package/dist/js/locale/sk.json +54 -56
  80. package/dist/js/locale/sl.json +54 -56
  81. package/dist/js/locale/sr-cy.json +54 -56
  82. package/dist/js/locale/sr.json +54 -56
  83. package/dist/js/locale/sv.json +11 -13
  84. package/dist/js/locale/ta.json +54 -56
  85. package/dist/js/locale/te.json +53 -55
  86. package/dist/js/locale/th.json +55 -62
  87. package/dist/js/locale/tl.json +54 -56
  88. package/dist/js/locale/tr.json +54 -56
  89. package/dist/js/locale/uk.json +54 -56
  90. package/dist/js/locale/ur.json +2 -9
  91. package/dist/js/locale/vi.json +33 -35
  92. package/dist/js/locale/zh-cn.json +1 -3
  93. package/dist/js/locale/zh-tw.json +54 -56
  94. package/dist/js/timeline.js +2 -3
  95. package/dist/js/timeline.js.LICENSE.txt +1 -0
  96. package/dist/js/timeline.js.map +1 -1
  97. package/package.json +20 -18
  98. package/src/css/icons/icons.html +49 -1
  99. package/src/css/icons/tl-icons.eot +0 -0
  100. package/src/css/icons/tl-icons.svg +58 -55
  101. package/src/css/icons/tl-icons.ttf +0 -0
  102. package/src/css/icons/tl-icons.woff +0 -0
  103. package/src/css/icons/tl-icons.woff2 +0 -0
  104. package/src/embed/compare.html +4 -4
  105. package/src/embed/index.html +3 -6
  106. package/src/embed/old-index.html +2 -5
  107. package/src/embed/popular_timelines.json +5989 -1
  108. package/src/js/core/TimelineConfig.js +0 -1
  109. package/src/js/dom/DOMUtil.js +12 -12
  110. package/src/js/language/I18NMixins.js +13 -3
  111. package/src/js/language/Language.js +50 -23
  112. package/src/js/language/__tests__/Language.test.js +32 -0
  113. package/src/js/language/locale/af.json +54 -56
  114. package/src/js/language/locale/ar.json +54 -56
  115. package/src/js/language/locale/be.json +71 -73
  116. package/src/js/language/locale/bg.json +54 -56
  117. package/src/js/language/locale/ca.json +54 -56
  118. package/src/js/language/locale/cz.json +56 -63
  119. package/src/js/language/locale/da.json +54 -56
  120. package/src/js/language/locale/de.json +1 -3
  121. package/src/js/language/locale/el.json +54 -56
  122. package/src/js/language/locale/en-24hr.json +51 -57
  123. package/src/js/language/locale/en-week.json +51 -57
  124. package/src/js/language/locale/en.json +3 -8
  125. package/src/js/language/locale/eo.json +54 -56
  126. package/src/js/language/locale/es.json +55 -57
  127. package/src/js/language/locale/et.json +54 -56
  128. package/src/js/language/locale/eu.json +54 -56
  129. package/src/js/language/locale/fa.json +52 -54
  130. package/src/js/language/locale/fi.json +73 -75
  131. package/src/js/language/locale/fo.json +54 -56
  132. package/src/js/language/locale/fr.json +1 -8
  133. package/src/js/language/locale/fy.json +71 -73
  134. package/src/js/language/locale/ga.json +54 -56
  135. package/src/js/language/locale/gl.json +54 -56
  136. package/src/js/language/locale/he.json +54 -56
  137. package/src/js/language/locale/hi.json +72 -74
  138. package/src/js/language/locale/hr.json +54 -56
  139. package/src/js/language/locale/hu.json +91 -93
  140. package/src/js/language/locale/hy.json +54 -56
  141. package/src/js/language/locale/id.json +54 -56
  142. package/src/js/language/locale/is.json +54 -56
  143. package/src/js/language/locale/it.json +18 -20
  144. package/src/js/language/locale/iw.json +54 -56
  145. package/src/js/language/locale/ja.json +54 -56
  146. package/src/js/language/locale/ka.json +54 -56
  147. package/src/js/language/locale/ko.json +54 -56
  148. package/src/js/language/locale/lb.json +54 -56
  149. package/src/js/language/locale/lt.json +54 -56
  150. package/src/js/language/locale/lv.json +54 -56
  151. package/src/js/language/locale/ms.json +54 -56
  152. package/src/js/language/locale/my.json +31 -38
  153. package/src/js/language/locale/nb.json +54 -56
  154. package/src/js/language/locale/ne.json +54 -56
  155. package/src/js/language/locale/nl.json +54 -56
  156. package/src/js/language/locale/nn.json +54 -56
  157. package/src/js/language/locale/no.json +54 -56
  158. package/src/js/language/locale/pl.json +54 -56
  159. package/src/js/language/locale/pt-br.json +45 -47
  160. package/src/js/language/locale/pt.json +57 -59
  161. package/src/js/language/locale/rm.json +54 -56
  162. package/src/js/language/locale/ro.json +54 -56
  163. package/src/js/language/locale/ru.json +54 -56
  164. package/src/js/language/locale/si.json +53 -55
  165. package/src/js/language/locale/sk.json +54 -56
  166. package/src/js/language/locale/sl.json +54 -56
  167. package/src/js/language/locale/sr-cy.json +54 -56
  168. package/src/js/language/locale/sr.json +54 -56
  169. package/src/js/language/locale/sv.json +11 -13
  170. package/src/js/language/locale/ta.json +54 -56
  171. package/src/js/language/locale/te.json +53 -55
  172. package/src/js/language/locale/th.json +55 -62
  173. package/src/js/language/locale/tl.json +54 -56
  174. package/src/js/language/locale/tr.json +54 -56
  175. package/src/js/language/locale/uk.json +54 -56
  176. package/src/js/language/locale/ur.json +2 -9
  177. package/src/js/language/locale/vi.json +33 -35
  178. package/src/js/language/locale/zh-cn.json +1 -3
  179. package/src/js/language/locale/zh-tw.json +54 -56
  180. package/src/js/media/Media.js +6 -2
  181. package/src/js/media/MediaType.js +1 -1
  182. package/src/js/media/types/DailyMotion.js +9 -1
  183. package/src/js/media/types/Text.js +33 -31
  184. package/src/js/media/types/Vimeo.js +58 -57
  185. package/src/js/slider/Slide.js +17 -2
  186. package/src/js/slider/SlideNav.js +12 -7
  187. package/src/js/slider/StorySlider.js +8 -12
  188. package/src/js/timeline/Timeline.js +47 -13
  189. package/src/js/timenav/TimeAxis.js +20 -1
  190. package/src/js/timenav/TimeMarker.js +48 -3
  191. package/src/js/timenav/TimeNav.js +140 -15
  192. package/src/js/ui/MenuBar.js +206 -149
  193. package/src/js/ui/Swipable.js +1 -1
  194. package/src/less/TL.Timeline.Base.less +38 -1
  195. package/src/less/Typography.less +2 -3
  196. package/src/less/Variables.less +4 -1
  197. package/src/less/icons/Icons.less +9 -0
  198. package/src/less/media/types/TL.Media.Text.less +5 -0
  199. package/src/less/slider/TL.Slide.less +40 -45
  200. package/src/less/slider/TL.SlideNav.less +82 -55
  201. package/src/less/themes/contrast/Variables.less +7 -4
  202. package/src/less/themes/dark/TL.Theme.Dark.less +2 -2
  203. package/src/less/themes/dark/Variables.less +4 -1
  204. package/src/less/timenav/TL.TimeMarker.less +16 -10
  205. package/src/less/timenav/TL.TimeNav.less +2 -50
  206. package/src/less/ui/TL.MenuBar.Button.less +8 -6
  207. package/src/template/all-media-types.json +52 -2
  208. package/src/template/index.html +2 -1
  209. package/webpack.common.js +13 -10
  210. package/webpack.dev.js +16 -6
  211. package/dist/js/timeline-min.js +0 -4
  212. package/dist/timeline3.zip +0 -0
  213. package/src/less/core/Reset.less +0 -115
@@ -8,9 +8,17 @@
8
8
  top: 45%;
9
9
  z-index:10;
10
10
  cursor:pointer;
11
-
12
- .tl-slidenav-content-container {
13
- height:200px;
11
+ padding: 0;
12
+ outline-offset:5px;
13
+ background-color: transparent;
14
+ border: none;
15
+ text-align: inherit;
16
+ text-transform: inherit;
17
+ font-family: inherit;
18
+ font-size: inherit;
19
+ font-weight: inherit;
20
+
21
+ .tl-slidenav-content-container {
14
22
  width:100px;
15
23
  position:absolute;
16
24
  }
@@ -121,23 +129,29 @@
121
129
 
122
130
  /* NAVIGATION HOVER
123
131
  ================================================== */
124
- .tl-slidenav-previous:hover, .tl-slidenav-next:hover {
125
- .tl-slidenav-title {
126
- .opacity(100);
127
- }
128
- .tl-slidenav-description {
129
- .opacity(@opacity-slide-nav-desc-hover);
130
- }
132
+ .tl-slidenav-previous, .tl-slidenav-next {
133
+ &:hover, &:focus-visible {
134
+ .tl-slidenav-title {
135
+ .opacity(100);
136
+ }
137
+ .tl-slidenav-description {
138
+ .opacity(@opacity-slide-nav-desc-hover);
139
+ }
140
+ }
131
141
  }
132
- .tl-slidenav-next:hover {
133
- .tl-slidenav-icon {
134
- margin-left: 100 - 20px;
135
- }
142
+ .tl-slidenav-next {
143
+ &:hover, &:focus-visible {
144
+ .tl-slidenav-icon {
145
+ margin-left: 100 - 20px;
146
+ }
147
+ }
136
148
  }
137
- .tl-slidenav-previous:hover {
138
- .tl-slidenav-icon {
139
- margin-left: -4px;
140
- }
149
+ .tl-slidenav-previous {
150
+ &:hover, &:focus-visible {
151
+ .tl-slidenav-icon {
152
+ margin-left: -4px;
153
+ }
154
+ }
141
155
  }
142
156
 
143
157
  // Mobile, iPhone and skinny
@@ -165,17 +179,21 @@
165
179
  .opacity(33);
166
180
  }
167
181
  }
168
- .tl-slidenav-next:hover {
169
- .tl-slidenav-icon {
170
- margin-left:32 - 20px;
171
- .opacity(100);
172
- }
182
+ .tl-slidenav-next {
183
+ &:hover, &:focus-visible {
184
+ .tl-slidenav-icon {
185
+ margin-left:32 - 20px;
186
+ .opacity(100);
187
+ }
188
+ }
173
189
  }
174
- .tl-slidenav-previous:hover {
175
- .tl-slidenav-icon {
176
- margin-left: -4px;
177
- .opacity(100);
178
- }
190
+ .tl-slidenav-previous {
191
+ &:hover, &:focus-visible {
192
+ .tl-slidenav-icon {
193
+ margin-left: -4px;
194
+ .opacity(100);
195
+ }
196
+ }
179
197
  }
180
198
 
181
199
  }
@@ -183,33 +201,42 @@
183
201
 
184
202
 
185
203
  .tl-layout-landscape.tl-mobile {
186
- .tl-slidenav-next:hover {
187
- right: 70px;
188
- .tl-slidenav-icon {
189
- margin-left:32 - 24px;
190
- .opacity(100);
191
- }
192
- }
193
- .tl-slidenav-next:active {
194
- .tl-slidenav-icon {
195
- margin-left: 0px;
196
- .opacity(100);
197
- }
198
- }
199
- .tl-slidenav-previous:hover {
200
- .tl-slidenav-icon {
201
- //margin-left: 0px;
202
- margin-left: 100 - 20px;
203
- .opacity(100);
204
- }
205
- }
206
- .tl-slidenav-previous:active {
207
- .tl-slidenav-icon {
208
- .opacity(100);
209
- margin-left: -4px;
210
- }
211
- }
204
+ .tl-slidenav-next {
205
+ &:hover {
206
+ /**
207
+ * On mobile the hover state stays on the button after the click
208
+ * Show the default margin as before the click
209
+ */
210
+ .tl-slidenav-icon {
211
+ margin-left: 100 - 24px;
212
+ .opacity(100);
213
+ }
214
+ }
212
215
 
216
+ &:active {
217
+ .tl-slidenav-icon {
218
+ margin-left: 100 - 20px;
219
+ }
220
+ }
221
+ }
222
+ .tl-slidenav-previous {
223
+ &:hover {
224
+ /**
225
+ * On mobile the hover state stays on the button after the click
226
+ * Show the default margin as before the click
227
+ */
228
+ .tl-slidenav-icon {
229
+ margin-left: 0px;
230
+ .opacity(100);
231
+ }
232
+ }
233
+
234
+ &:active {
235
+ .tl-slidenav-icon {
236
+ margin-left: -4px;
237
+ }
238
+ }
239
+ }
213
240
  }
214
241
 
215
242
  .tl-layout-portrait.tl-mobile {
@@ -240,4 +267,4 @@
240
267
  .tl-slidenav-previous, .tl-slidenav-next {
241
268
  display:none;
242
269
  }
243
- }
270
+ }
@@ -46,14 +46,14 @@
46
46
  @color-text-inverted: darken(@color-background,5);
47
47
  @color-header-text-inverted: @color-background;
48
48
 
49
- @color-text-credit: #757575;
49
+ @color-text-credit: #686868;
50
50
 
51
51
  /* UI COLOR
52
52
  ================================================== */
53
53
  @ui-background-color: darken(@color-background, 5);
54
54
  @ui-background-color-darker: darken(@color-background, 10);
55
55
  @marker-color: darken(@ui-background-color,5);
56
- @marker-outline-color: darken(@ui-background-color,10);
56
+ @marker-outline-color: darken(@ui-background-color,40);
57
57
  @marker-selected-text-color: @color-background;
58
58
  @marker-text-color: darken(@marker-color,50);
59
59
  @marker-dot-color: darken(@marker-color, 33);
@@ -81,6 +81,9 @@
81
81
  @base-spacing: 15px;
82
82
  @arrow-size: 20px;
83
83
 
84
+ // Note
85
+ @note-color-background: #fcf8e3;
86
+
84
87
  // Marker
85
88
  @time-marker-border-radius: 4px;
86
89
  @marker-icon-size: 24px;
@@ -108,5 +111,5 @@
108
111
  /* GFX
109
112
  ================================================== */
110
113
  .base-sprite() {
111
- background-image: url(storymap.png?v1.0);
112
- }
114
+ background-image: url(storymap.png?v1.0);
115
+ }
@@ -11,6 +11,6 @@
11
11
 
12
12
  /* Includes
13
13
  ================================================== */
14
- @import "Variables.less"; // Variables (easy way to make style changes)
14
+ @import "Variables.less"; // Variables (easy way to make style changes)
15
15
 
16
- @import "../../TL.Timeline.Base.less"; // Base Less File
16
+ @import "../../TL.Timeline.Base.less"; // Base Less File
@@ -81,6 +81,9 @@
81
81
  @base-spacing: 15px;
82
82
  @arrow-size: 20px;
83
83
 
84
+ // Note
85
+ @note-color-background: lighten(@color-background, 70);
86
+
84
87
  // Marker
85
88
  @time-marker-border-radius: 5px;
86
89
  @marker-icon-size: 24px;
@@ -109,4 +112,4 @@
109
112
  ================================================== */
110
113
  .base-sprite() {
111
114
  background-image: url(storymap.png?v1.0);
112
- }
115
+ }
@@ -232,14 +232,14 @@
232
232
 
233
233
 
234
234
  }
235
-
236
- /* Hover State
235
+
236
+ /* Hover | Focus State
237
237
  ================================================== */
238
- &:hover {
238
+ &:hover, &:focus {
239
239
 
240
240
  .tl-timemarker-timespan {
241
- background-color: fadeout(@marker-text-color, 85%);
242
-
241
+ background-color: fadeout(@marker-text-color, 75%);
242
+
243
243
  .tl-timemarker-timespan-content {
244
244
  background-color: @marker-text-color;
245
245
  }
@@ -256,7 +256,7 @@
256
256
  }
257
257
 
258
258
  .tl-timemarker-content-container {
259
- background-color: darken(@marker-color,15);
259
+ background-color: darken(@marker-color,45);
260
260
  border-color: darken(@marker-color,25);
261
261
  .property-animation(height, @animation-duration-fast/2, @animation-ease);
262
262
  .property-animation(width, @animation-duration-fast/2, @animation-ease);
@@ -283,7 +283,7 @@
283
283
  color:@marker-selected-text-color;
284
284
  &.tl-headline-fadeout {
285
285
  &:after {
286
- .marker-text-fade(darken(@marker-color,15),80%);
286
+ .marker-text-fade(darken(@marker-color,45),80%);
287
287
  }
288
288
  }
289
289
 
@@ -303,9 +303,9 @@
303
303
 
304
304
  }
305
305
 
306
- /* Hover Active State
306
+ /* Hover | Focus Active State
307
307
  ================================================== */
308
- &:hover {
308
+ &:hover, &:focus {
309
309
  &.tl-timemarker-active {
310
310
  .tl-timemarker-content-container {
311
311
  .tl-timemarker-content {
@@ -334,6 +334,12 @@
334
334
  }
335
335
  }
336
336
  }
337
+
338
+ /* Focus-visible State
339
+ ================================================== */
340
+ &:focus-visible {
341
+ outline: none;
342
+ }
337
343
 
338
344
  /* Active Markers
339
345
  ================================================== */
@@ -463,7 +469,7 @@
463
469
 
464
470
  .tl-timemarker-timespan {
465
471
  &:after {
466
- background-color: fadeout(darken(@ui-background-color,100),75%);
472
+ background-color: fadeout(darken(@ui-background-color,100),65%);
467
473
  }
468
474
  }
469
475
  .tl-timemarker-line-left, .tl-timemarker-line-right {
@@ -12,55 +12,7 @@
12
12
  //border-top: 1px solid #e3e3e3;
13
13
  //box-shadow: inset 10px 10px 5px 0px rgba(0,0,0,0.75);
14
14
  //.box-shadow(inset -7px 0px 7px rgba(0,0,0,.30));
15
-
16
- .tl-attribution {
17
- cursor: pointer;
18
- z-index:9;
19
- position:absolute;
20
- bottom:2px;
21
- left:0px;
22
- font-size:10px;
23
- line-height:10px;
24
- font-family:@font-sanserif !important;
25
- //height:100%;
26
- //background-color: @color-background;
27
- background-color: fadeout(@color-background, 15%);
28
- padding:3px;
29
-
30
- /*
31
- right:-26px;
32
- top:30px;
33
- transform: rotate(90deg);
34
- -ms-transform: rotate(90deg);
35
- -webkit-transform: rotate(90deg);
36
- background-color: fadeout(@ui-background-color, 15%);
37
- */
38
- a {
39
-
40
- color:@brand-color;
41
- //margin-left:10px;
42
- &:hover {
43
- color:@color-dark;
44
- text-decoration: none;
45
- .tl-knightlab-logo {
46
- background-color: #c34528;
47
- }
48
- }
49
- }
50
- .tl-knightlab-logo {
51
- display: inline-block;
52
- vertical-align: middle;
53
- height: 8px;
54
- width: 8px;
55
- margin-right:3px;
56
- background-color: #c34528;
57
- background-color:@brand-color;
58
- transform: rotate(45deg);
59
- -ms-transform: rotate(45deg);
60
- -webkit-transform: rotate(45deg);
61
- }
62
-
63
- }
15
+
64
16
  .tl-timenav-line {
65
17
  position: absolute;
66
18
  top: 0;
@@ -162,4 +114,4 @@
162
114
  .tl-timenav {
163
115
 
164
116
  }
165
- }
117
+ }
@@ -3,28 +3,30 @@
3
3
 
4
4
  .tl-menubar-button {
5
5
  //border-left: 1px solid darken(@color-background,10);
6
+ border:none;
6
7
  font-size: 18px;
7
8
  line-height:18px;
8
9
  //padding: 6px 12px 6px 12px;
9
10
  //padding:12px;
10
11
  background-color:fadeout(@ui-background-color, 10%);
11
12
  cursor:pointer;
12
- padding: 6px 12px 6px 12px;
13
+ padding: 5px 10px 5px 10px;
13
14
  display:inline-block;
14
15
  display:block;
15
16
  //color:@color-text;
16
17
  color:@marker-color-menubar-button;
17
18
  [class^="tl-icon-"], [class*=" tl-icon-"] {
18
-
19
+
19
20
  }
20
-
21
- &.tl-menubar-button-inactive {
21
+
22
+ &:disabled {
22
23
  opacity:0.33;
24
+ cursor:default;
23
25
  }
24
- &:hover {
26
+ &:hover, &:focus-visible {
25
27
  background:@color-foreground;
26
28
  color:@color-background;
27
- &.tl-menubar-button-inactive {
29
+ &:disabled {
28
30
  color:darken(@marker-color,15);
29
31
  background-color:fadeout(@ui-background-color, 10%);
30
32
  }
@@ -8,6 +8,9 @@
8
8
  "text": {
9
9
  "headline": "TimelineJS Media Types",
10
10
  "text": "<p>TimelineJS supports many media types. This provides a simple way to test them all. This page tests a simple image on a remote server. Also, if the Timeline was created with the <code>soundcite</code> option set to <code>true</code> then <span class='soundcite' data-url='https://soundcite.knightlab.com/media/bach-cello-suite.mp3' data-start='0' data-end='164000' data-plays='1'>this should be an active SoundCite player.</span></p>"
11
+ },
12
+ "background": {
13
+ "color": "papayawhip"
11
14
  }
12
15
  },
13
16
  "events": [{
@@ -22,6 +25,9 @@
22
25
  "headline": "YouTube Videos",
23
26
  "text": "<p>if Timeline finds a URL that starts with 'youtube.com' or 'youtu.be', it will try to use it to embed a YouTube video. The <em>protocol</em> part of the URL (e.g. <em>https://</em>) is technically optional.</p><p>You can start at a specific point in the video using the <code>t=#m#s</code> parameter: see <a href='http://youtubetime.com/'>http://youtubetime.com/</a></p>"
24
27
  },
28
+ "background": {
29
+ "color": "#F45B69"
30
+ },
25
31
  "group": "Video"
26
32
  },
27
33
  {
@@ -37,6 +43,9 @@
37
43
  "headline": "Vimeo",
38
44
  "text": "To embed a Vimeo video, just copy the URL of the Vimeo.com page which shows the video."
39
45
  },
46
+ "background": {
47
+ "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Morsk%C3%A9_oko_%28v_m%C3%A1ji%29_004.jpg/1280px-Morsk%C3%A9_oko_%28v_m%C3%A1ji%29_004.jpg"
48
+ },
40
49
  "group": "Video"
41
50
  },
42
51
  {
@@ -52,6 +61,9 @@
52
61
  "headline": "DailyMotion",
53
62
  "text": "To embed a DailyMotion video, just copy the URL of the page which shows the video."
54
63
  },
64
+ "background": {
65
+ "color": "#8B94A3"
66
+ },
55
67
  "group": "Video"
56
68
  },
57
69
  {
@@ -67,6 +79,9 @@
67
79
  "headline": "Vine",
68
80
  "text": "To embed a Vine, just copy the URL of the page which shows the vine."
69
81
  },
82
+ "background": {
83
+ "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Crescent_Moon_-_Valencia%2C_CA_%2850727236562%29.jpg/1280px-Crescent_Moon_-_Valencia%2C_CA_%2850727236562%29.jpg"
84
+ },
70
85
  "group": "Video"
71
86
  },
72
87
  {
@@ -82,6 +97,9 @@
82
97
  "headline": "SoundCloud",
83
98
  "text": "To embed a SoundCloud clip, just copy the URL of the clip's page."
84
99
  },
100
+ "background": {
101
+ "color": "#9567E0"
102
+ },
85
103
  "group": "Audio"
86
104
  },
87
105
  {
@@ -302,7 +320,7 @@
302
320
  },
303
321
  "text": {
304
322
  "headline": "Image, PNG",
305
- "text": "To embed a PNG, just copy the URL endig in '.png'."
323
+ "text": "To embed a PNG, just copy the URL ending in '.png'."
306
324
  },
307
325
  "group": "Image"
308
326
  },
@@ -319,7 +337,7 @@
319
337
  },
320
338
  "text": {
321
339
  "headline": "Image, JPEG",
322
- "text": "To embed a JPEG, just copy the URL endig in '.jpeg'."
340
+ "text": "To embed a JPEG, just copy the URL ending in '.jpeg'."
323
341
  },
324
342
  "group": "Image"
325
343
  },
@@ -337,6 +355,38 @@
337
355
  "text": "To embed a Google Doc, just copy the Shareable link."
338
356
  }
339
357
  },
358
+ {
359
+ "media": {
360
+ "url": "https://drive.google.com/file/d/10YmjqDEEThebdRQ1Ws2J5PRpDXbFDjTL/view?usp=sharing",
361
+ "caption": "Knight Lab Logo",
362
+ "credit": "Zach Wise"
363
+ },
364
+ "start_date": {
365
+ "year": "1919",
366
+ "month": "6"
367
+ },
368
+ "text": {
369
+ "headline": "PNG image on Google Drive",
370
+ "text": "To embed an image from Google Drive, just copy the Shareable link. Note that images embedded this way will appear within a Google Drive 'viewer', and so will look quite different from normally embedded images."
371
+ }
372
+ },
373
+ {
374
+ "media": {
375
+ "url": "https://drive.google.com/uc?id=10YmjqDEEThebdRQ1Ws2J5PRpDXbFDjTL",
376
+ "caption": "Knight Lab Logo",
377
+ "credit": "Zach Wise"
378
+ },
379
+ "start_date": {
380
+ "year": "1919",
381
+ "month": "7"
382
+ },
383
+ "text": {
384
+ "headline": "PNG image on Google Drive",
385
+ "text": "This hack may make a Google Drive image work more like an image"
386
+ }
387
+ },
388
+
389
+
340
390
  {
341
391
  "media": {
342
392
  "url": "https://en.wikipedia.org/wiki/1997_International_Tennis_Championships_%E2%80%93_Doubles",
@@ -10,7 +10,8 @@
10
10
  height: 650,
11
11
  soundcite: true,
12
12
  hash_bookmark: true,
13
- start_at_end: true,
13
+ start_at_end: false,
14
+ autolink: false,
14
15
  sheets_proxy: 'https://sheets-proxy.knightlab.com/proxy/'
15
16
  }
16
17
 
package/webpack.common.js CHANGED
@@ -14,16 +14,19 @@ module.exports = {
14
14
  library: "TL" // https://webpack.js.org/configuration/output/#outputlibrary
15
15
  },
16
16
  plugins: [
17
- new CopyPlugin([{
18
- from: "./src/js/language/locale/*.json",
19
- to: path.join(output_path, "js/locale"),
20
- flatten: true
21
- }]),
22
- new CopyPlugin([{
23
- from: './src/embed/*',
24
- to: path.join(output_path, "embed"),
25
- flatten: true
26
- }]),
17
+ new CopyPlugin({
18
+ patterns: [{
19
+ from: "./src/js/language/locale/*.json",
20
+ to: path.join(output_path, "js/locale"),
21
+ flatten: true
22
+ },
23
+ {
24
+ from: './src/embed/*',
25
+ to: path.join(output_path, "embed"),
26
+ flatten: true
27
+ }
28
+ ]
29
+ }),
27
30
  new CleanWebpackPlugin({
28
31
  cleanStaleWebpackAssets: true
29
32
  }),
package/webpack.dev.js CHANGED
@@ -1,16 +1,26 @@
1
1
  const merge = require('webpack-merge')
2
2
  const common = require('./webpack.common.js')
3
3
  const HtmlWebpackPlugin = require('html-webpack-plugin');
4
+ const path = require('path');
4
5
 
5
6
  module.exports = merge.smart({
6
7
  mode: 'development',
7
8
  devtool: 'inline-source-map',
8
9
  devServer: {
9
- contentBase: ['./src/template', './src/css'],
10
- contentBasePublicPath: ['/', '/css'],
11
- stats: 'verbose',
12
- openPage: "/index.html",
13
- disableHostCheck: true
10
+ open: true,
11
+ allowedHosts: 'all',
12
+ devMiddleware: {
13
+ stats: 'normal'
14
+ },
15
+ static: [{
16
+ directory: path.join(__dirname, "src/template"),
17
+ publicPath: "/"
18
+ },
19
+ {
20
+ directory: path.join(__dirname, "src/css"),
21
+ publicPath: "/css"
22
+ }
23
+ ]
14
24
  },
15
25
  module: {
16
26
  rules: [{
@@ -23,4 +33,4 @@ module.exports = merge.smart({
23
33
  template: 'src/template/index.html'
24
34
  })
25
35
  ]
26
- }, common)
36
+ }, common)