@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
@@ -21,7 +21,8 @@
21
21
  "text": {
22
22
  "headline": "YouTube Videos",
23
23
  "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
- }
24
+ },
25
+ "group": "Video"
25
26
  },
26
27
  {
27
28
  "media": {
@@ -35,7 +36,8 @@
35
36
  "text": {
36
37
  "headline": "Vimeo",
37
38
  "text": "To embed a Vimeo video, just copy the URL of the Vimeo.com page which shows the video."
38
- }
39
+ },
40
+ "group": "Video"
39
41
  },
40
42
  {
41
43
  "media": {
@@ -49,7 +51,8 @@
49
51
  "text": {
50
52
  "headline": "DailyMotion",
51
53
  "text": "To embed a DailyMotion video, just copy the URL of the page which shows the video."
52
- }
54
+ },
55
+ "group": "Video"
53
56
  },
54
57
  {
55
58
  "media": {
@@ -63,7 +66,8 @@
63
66
  "text": {
64
67
  "headline": "Vine",
65
68
  "text": "To embed a Vine, just copy the URL of the page which shows the vine."
66
- }
69
+ },
70
+ "group": "Video"
67
71
  },
68
72
  {
69
73
  "media": {
@@ -77,7 +81,8 @@
77
81
  "text": {
78
82
  "headline": "SoundCloud",
79
83
  "text": "To embed a SoundCloud clip, just copy the URL of the clip's page."
80
- }
84
+ },
85
+ "group": "Audio"
81
86
  },
82
87
  {
83
88
  "media": {
@@ -106,7 +111,8 @@
106
111
  "text": {
107
112
  "headline": "Twitter Embed",
108
113
  "text": "Or you can copy the embed code if you want."
109
- }
114
+ },
115
+ "group": "HTML"
110
116
  },
111
117
  {
112
118
  "media": {
@@ -190,7 +196,8 @@
190
196
  "text": {
191
197
  "headline": "Instagram",
192
198
  "text": "To embed an Instagram, just copy the URL of the photo's page."
193
- }
199
+ },
200
+ "group": "Image"
194
201
  },
195
202
  {
196
203
  "media": {
@@ -218,7 +225,8 @@
218
225
  "text": {
219
226
  "headline": "Flickr",
220
227
  "text": "To embed a Flickr photo, just copy the URL in the browser bar."
221
- }
228
+ },
229
+ "group": "Image"
222
230
  },
223
231
  {
224
232
  "media": {
@@ -232,7 +240,8 @@
232
240
  "text": {
233
241
  "headline": "Flickr (alt)",
234
242
  "text": "You can also use the embed code URL (with flic.kr)."
235
- }
243
+ },
244
+ "group": "Image"
236
245
  },
237
246
  {
238
247
  "media": {
@@ -250,31 +259,37 @@
250
259
  },
251
260
  {
252
261
  "media": {
253
- "url": "http://www.kidzone.ws/images-changed/sharks/head.jpg",
254
- "caption": "Sharks!",
255
- "credit": "Kid Zone"
262
+ "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Moraine_Lake_17092005.jpg/960px-Moraine_Lake_17092005.jpg",
263
+ "caption": "Valley of the Ten Peaks and Moraine Lake, Banff National Park, Canada.",
264
+ "credit": "Wikipedia Commons",
265
+ "link": "https://en.wikipedia.org/wiki/Rocky_Mountains#/media/File:Moraine_Lake_17092005.jpg",
266
+ "link_target": "images"
256
267
  },
257
268
  "start_date": {
258
269
  "year": "1915"
259
270
  },
260
271
  "text": {
261
272
  "headline": "Image, JPG",
262
- "text": "To embed a JPG, just copy the URL endig in '.jpg'."
263
- }
273
+ "text": "To embed a JPG, just copy the URL ending in '.jpg'."
274
+ },
275
+ "group": "Image"
264
276
  },
265
277
  {
266
278
  "media": {
267
- "url": "https://media.giphy.com/media/nEZkc87t9u68U/source.gif",
279
+ "url": "https://media.giphy.com/media/Bzxeif0cR11ny/giphy.gif",
268
280
  "caption": "Groundhog Day clip",
269
- "credit": "USA Today"
281
+ "credit": "USA Today",
282
+ "link": "https://giphy.com/gifs/bored-bill-murray-groundhog-day-Bzxeif0cR11ny",
283
+ "link_target": "images"
270
284
  },
271
285
  "start_date": {
272
286
  "year": "1916"
273
287
  },
274
288
  "text": {
275
289
  "headline": "Image, GIF",
276
- "text": "To embed a GIF, just copy the URL endig in '.gif'."
277
- }
290
+ "text": "To embed a GIF, just copy the URL ending in '.gif'."
291
+ },
292
+ "group": "Image"
278
293
  },
279
294
  {
280
295
  "media": {
@@ -288,13 +303,16 @@
288
303
  "text": {
289
304
  "headline": "Image, PNG",
290
305
  "text": "To embed a PNG, just copy the URL endig in '.png'."
291
- }
306
+ },
307
+ "group": "Image"
292
308
  },
293
309
  {
294
310
  "media": {
295
- "url": "http://upload.wikimedia.org/wikipedia/commons/c/c2/Rocky_Mountains.jpeg",
296
- "caption": "Rocky Mountains",
297
- "credit": "Wikipedia Commons"
311
+ "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Moraine_Lake_17092005.jpg/960px-Moraine_Lake_17092005.jpg",
312
+ "caption": "Valley of the Ten Peaks and Moraine Lake, Banff National Park, Canada.",
313
+ "credit": "Wikipedia Commons",
314
+ "link": "https://en.wikipedia.org/wiki/Rocky_Mountains#/media/File:Moraine_Lake_17092005.jpg",
315
+ "link_target": "images"
298
316
  },
299
317
  "start_date": {
300
318
  "year": "1918"
@@ -302,7 +320,8 @@
302
320
  "text": {
303
321
  "headline": "Image, JPEG",
304
322
  "text": "To embed a JPEG, just copy the URL endig in '.jpeg'."
305
- }
323
+ },
324
+ "group": "Image"
306
325
  },
307
326
  {
308
327
  "media": {
@@ -321,8 +340,9 @@
321
340
  {
322
341
  "media": {
323
342
  "url": "https://en.wikipedia.org/wiki/1997_International_Tennis_Championships_%E2%80%93_Doubles",
324
- "caption": "1997 Inrternational Tennis Championships - Doubles",
325
- "credit": "Wikipedia"
343
+ "caption": "1997 International Tennis Championships - Doubles",
344
+ "credit": "Wikipedia",
345
+ "link": "https://en.wikipedia.org/wiki/1997_International_Tennis_Championships_%E2%80%93_Doubles"
326
346
  },
327
347
  "start_date": {
328
348
  "year": "1920"
@@ -344,7 +364,8 @@
344
364
  "text": {
345
365
  "headline": "Spotify, Artist",
346
366
  "text": "To embed an artist on Spotify, just copy the 'Spotify URL'."
347
- }
367
+ },
368
+ "group": "Audio"
348
369
  },
349
370
  {
350
371
  "media": {
@@ -358,7 +379,8 @@
358
379
  "text": {
359
380
  "headline": "Spotify, Playlist",
360
381
  "text": "To embed a Spotify playlist, just copy the 'Spotify URL'."
361
- }
382
+ },
383
+ "group": "Audio"
362
384
  },
363
385
  {
364
386
  "media": {
@@ -372,7 +394,8 @@
372
394
  "text": {
373
395
  "headline": "Spotify, Track",
374
396
  "text": "To embed a Spotify track, just copy the 'Spotify URL'."
375
- }
397
+ },
398
+ "group": "Audio"
376
399
  },
377
400
  {
378
401
  "media": {
@@ -386,7 +409,8 @@
386
409
  "text": {
387
410
  "headline": "iFrame",
388
411
  "text": "To embed an iFrame, just copy the iFrame code."
389
- }
412
+ },
413
+ "group": "HTML"
390
414
  },
391
415
  {
392
416
  "media": {
@@ -400,7 +424,8 @@
400
424
  "text": {
401
425
  "headline": "Blockquote",
402
426
  "text": "To display a block quote, input text in HTML blockquote tags."
403
- }
427
+ },
428
+ "group": "HTML"
404
429
  },
405
430
  {
406
431
  "media": {
@@ -413,11 +438,12 @@
413
438
  "text": {
414
439
  "headline": "Imgur",
415
440
  "text": "Just include the URL of an image or gallery page"
416
- }
441
+ },
442
+ "group": "Image"
417
443
  },
418
444
  {
419
445
  "media": {
420
- "url": "https://file-examples.com/wp-content/uploads/2017/10/file-sample_150kB.pdf",
446
+ "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
421
447
  "credit": "file-examples.com"
422
448
  },
423
449
  "start_date": {
@@ -439,11 +465,12 @@
439
465
  "text": {
440
466
  "headline": "Audio",
441
467
  "text": "A URL to an audio file (mp3|wav|m4a) will be rendered using the browser's native audio player."
442
- }
468
+ },
469
+ "group": "Audio"
443
470
  },
444
471
  {
445
472
  "media": {
446
- "url": "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4",
473
+ "url": "https://file-examples.com/storage/fef12739526267ac9a2b543/2017/04/file_example_MP4_480_1_5MG.mp4",
447
474
  "credit": "file-examples.com"
448
475
  },
449
476
  "start_date": {
@@ -453,11 +480,12 @@
453
480
  "text": {
454
481
  "headline": "Video (mp4)",
455
482
  "text": "A URL to a video file (mp4) will be rendered using the browser's native video player."
456
- }
483
+ },
484
+ "group": "Video"
457
485
  },
458
486
  {
459
487
  "media": {
460
- "url": "https://file-examples-com.github.io/uploads/2020/03/file_example_WEBM_480_900KB.webm",
488
+ "url": "https://file-examples.com/storage/fef12739526267ac9a2b543/2020/03/file_example_WEBM_480_900KB.webm",
461
489
  "credit": "file-examples.com"
462
490
  },
463
491
  "start_date": {
@@ -467,7 +495,8 @@
467
495
  "text": {
468
496
  "headline": "Video (webm)",
469
497
  "text": "The Video media type also supports webm files."
470
- }
498
+ },
499
+ "group": "Video"
471
500
  },
472
501
  {
473
502
  "media": {
@@ -480,7 +509,8 @@
480
509
  "text": {
481
510
  "headline": "Wistia",
482
511
  "text": "Wistia is a commercial video hosting service. I don't even remember who requested that TimelineJS support it, and it's hard to find a suitable test URL, but ... "
483
- }
512
+ },
513
+ "group": "Video"
484
514
  }
485
515
 
486
516
  ]
@@ -9,6 +9,8 @@
9
9
  debug: true,
10
10
  height: 650,
11
11
  soundcite: true,
12
+ hash_bookmark: true,
13
+ start_at_end: true,
12
14
  sheets_proxy: 'https://sheets-proxy.knightlab.com/proxy/'
13
15
  }
14
16
 
@@ -55,6 +57,7 @@
55
57
 
56
58
  document.querySelectorAll('nav a').forEach(el => {
57
59
  el.addEventListener('click', e => {
60
+ window.location.hash = ''
58
61
  e.preventDefault()
59
62
  let url = e.target.attributes['href'].value
60
63
  document.getElementById('timeline-src').value = url
@@ -91,7 +94,7 @@
91
94
  <body>
92
95
  <h1>Timeline Development</h1>
93
96
  <div>
94
- <label for="timeline-src">data source URL:</label><input type="text" size="120" name="timeline-src" id="timeline-src">
97
+ <label for="timeline-src">data source URL:</label><input type="text" size="120" name="timeline-src" id="timeline-src" />
95
98
  </div>
96
99
  <nav>
97
100
  <a href='https://docs.google.com/spreadsheets/u/1/d/1xuY4upIooEeszZ_lCmeNx24eSFWe0rHe9ZdqH2xqVNk/pubhtml'>Women in Computing</a>
@@ -0,0 +1,14 @@
1
+ Year,Month,Day,Time,End Year,End Month,End Day,End Time,Display Date,Headline,Text,Media,Media Credit,Media Caption,Media Thumbnail,Type,Group,Background
2
+ ,,,,,,,,,MY OWN CSV,"<p class=""lead"">In this sample timeline, we'll walk you through what TimelineJS can do by looking at some of the more important contributions women have made to computer science.</p>",,,,,title,,https://upload.wikimedia.org/wikipedia/commons/1/17/World%27s_First_Computer%2C_the_Electronic_Numerical_Integrator_and_Calculator_%28ENIAC%29.gif
3
+ 1815,12,10,,1852,11,27,,,Ada Lovelace,"<p>Women have been programming since before it was a thing. Take <a href=""https://en.wikipedia.org/wiki/Ada_Lovelace"">Ada Lovelace</a>: Daughter of Lord Byron, she's often credited as the first computer programmer. Her work on <a href=""https://en.wikipedia.org/wiki/Analytical_Engine"">Charles Babbage's Analytical Engine</a> contains notes of the first machine-implemented algorithm.</p><span class=""tl-note"">This slide demonstrates a simple ""image"" media type.</span>",https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Ada_Lovelace_portrait.jpg/713px-Ada_Lovelace_portrait.jpg,Wikimedia Commons,"<a href=""https://en.wikipedia.org/wiki/Ada_Lovelace#/media/File:Ada_Lovelace_portrait.jpg"" title="""">Portrait by Alfred Edward Chalon</a>",,,,
4
+ 1948,3,14,,,,,,,Edith Clarke: Bucking the Trend,,"<blockquote>There is no demand for women engineers, as such, as there are for women doctors; but there's always a demand for anyone who can do a good piece of work. <cite>Edith Clarke, first female professor of electrical engineering in the United States</cite></blockquote>",,,,,,
5
+ 1943,7,,,1946,,,,,...And the women who made it work,"<p>The ENIAC programmers included a number of women: Jean Bartik, Marlyn Wescoff Meltzer, Ruth Lichterman Teitelbaum, Kay McNulty Mauchly Antonelli, Frances Spence, and Frances Elizabeth ""Betty"" Holberton. Despite their groundbreaking work, the Army never released the names of the women who worked on the ENIAC, and they were largely forgotten until Kathy Kleiman discovered their story in 1985.</p> <span class=""tl-note"">You can add a YouTube URL like this video on the ENIAC Women.
6
+ .</span>",https://www.youtube.com/watch?v=aPweFhhXFvY,"<a href=""https://www.youtube.com/channel/UCHDr4RtxwA1KqKGwxgdK4Vg"">Computer History Museum</a>",Jean Bartik talks about the ENIAC women,,,,https://upload.wikimedia.org/wikipedia/commons/c/cd/ARL_ENIAC_02.png
7
+ 1943,6,5,,,,,,,The First Computer,"Code named ""Project PX"" and funded by the United States Army, the first general-purpose computer was the Electronic Numerical Integrator And Computer (ENIAC). It was developed at the University of Pennsylvania's Moore School of Electrical Engineering.
8
+ <p><span class=""tl-note"">Timeline can easily embed Google Maps</span>","https://www.google.com/maps/place/University+of+Pennsylvania/@39.9522188,-75.1932137,17z/data=!3m1!4b1!4m2!3m1!1s0x89c6c65a7f3bccc1:0x9eaa6a2b2d6fe94",,,,,,
9
+ 1951,,,,,,,,,Rózsa Péter writes recursion,"<p>Hungarian-born Rózsa Péter studied number theory and poetry before becoming interested in the idea that would become recursion theory. She published her paper ""Recursive Functions"" in 1951, but it wasn't until the mid-50's that she began to apply her work to the realm of computers. </p><span class=""tl-note"">This excerpt is embedded from Wikipedia. Just include the URL to the Wikipedia article.</span>",https://en.wikipedia.org/wiki/Reduction_(recursion_theory),Wikipedia,,,,,
10
+ 1952,,,,,,,,,Grace Hopper invents the compiler,"<p>In her career with the Navy, Rear Admiral Grace Hopper worked on the first commercial computer (UNIVAC) and laid the groundwork for the programming language COBOL. But her most notable invention was the compiler, which can transform a source language into binary code. (In other words, it can translate the code you and I write into 0s and 1s.) She developed it in 1952, but she said ""Nobody would touch it. They told me computers could only do arithmetic.""</p><span class=""tl-note"">Embed sound clips from Soundcloud.</span>",https://soundcloud.com/innovationhub/grace-hopper-the-life-of-a-coding-pioneer,"<a href=""http://blogs.wgbh.org/innovation-hub/2017/12/8/life-legacy-grace-hopper/"">Innovation Hub</a>","An audio biography of Grace Hopper produced by Innovation Hub, originally published December 08, 2017.",,,,
11
+ 1956,,,,1962,,,,,Contributions to space exploration,"One of the first African-American women to earn a Ph.D in mathematics, Evelyn Boyd Granville focused on aeronautics and space during her career. In 1956, she worked with NASA and IBM on Project Mercury, the first manned space flight. She worked with NASA again a few years later on the Apollo Project.<span class=""tl-note"">Videos from Vimeo are also easy to embed.</span>",https://vimeo.com/304869290,National Archives (posted by Ira Gallen),Project Mercury training footage,,,,
12
+ 1958,,,,,,,,,The First PhD in Computer Science,"One of the first women (if not the first woman) to earn a Ph.D in computer science, Sister Mary Kenneth Keller also contributed to the development of the BASIC language during her time at Dartmouth College. She then founded the computer science department at Clarke College and directed it for the next 20 years.",https://www.women.cs.cmu.edu/ada/Resources/Women/pictures/mary_keller.png,The Ada Project,,,,,
13
+ 1972,,,,,,,,,Karen Spärck Jones makes search possible,"A professor at Cambridge Computer Laboratory, Spärck Jones was interested in natural language processing and information retrieval. In 1972, she introduced the concept of inverse document frequency, which most search engines still rely on.",https://www.youtube.com/watch?v=4-DyVzj-f3c,BCS Karen Sparck Jones Lecture,"""How to enjoy a career in computing: the power of networks,"" Professor Dame Wendy Hall",,,,
14
+ 1985,,,,,,,,,"""The Mother of the Internet""","Often called ""the Mother of the Internet,"" Radia Perlman's work on spanning tree protocol enabled the development of modern networking. She holds more than 100 patents, which is what mothers do best.",https://www.youtube.com/watch?v=I7FYG-XVgk4,Imagining the Internet,Radia Perlman's acceptance speech at being inducted into the Internet Hall of Fame.,,,,