@knight-lab/timelinejs 3.9.1 → 3.9.2
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.
- package/CHANGELOG.md +6 -0
- package/CONTRIBUTING.md +5 -0
- package/dist/css/fonts/font.bitter-raleway.css +1 -1
- package/dist/js/locale/en-gb.json +69 -0
- package/dist/js/locale/es.json +1 -1
- package/dist/js/locale/hi.json +0 -1
- package/dist/js/timeline.js +1 -1
- package/dist/js/timeline.js.map +1 -1
- package/package.json +4 -3
- package/src/js/dom/DOM.js +7 -1
- package/src/js/language/Language.js +1 -0
- package/src/js/language/locale/en-gb.json +69 -0
- package/src/js/language/locale/es.json +1 -1
- package/src/js/language/locale/hi.json +0 -1
- package/src/js/media/MediaType.js +19 -6
- package/src/js/media/__tests__/MediaType.test.js +47 -0
- package/src/js/media/types/WikipediaImage.js +159 -0
- package/src/js/media/types/__tests__/WikipediaImage.test.js +48 -0
- package/src/js/net/Net.js +1 -1
- package/src/js/slider/SlideNav.js +1 -1
- package/src/js/ui/MenuBar.js +4 -4
- package/src/template/all-media-types.json +28 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
3.9.2 (2023-02-07)
|
|
2
|
+
-------------------------
|
|
3
|
+
* #796 support Wikipedia image page URLs
|
|
4
|
+
* #808 Add support for en-GB locale (UK-style date formatting, eg 2 Dec 2022)
|
|
5
|
+
* #814 Ensure that buttons are created with type="button"
|
|
6
|
+
|
|
1
7
|
3.9.1 (2022-11-29)
|
|
2
8
|
-------------------------
|
|
3
9
|
* Adapted to a change in Google Drive sharing links which caused TimelineJS to no longer select the correct media type.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -26,6 +26,11 @@ Once you've cloned the repository, run `npm install`. Assuming there are no erro
|
|
|
26
26
|
|
|
27
27
|
Timeline uses `webpack` for bundling, and uses the `webpack-dev-server` as part of the `start` script. This means that you should be able to make edits to the source javascript and less files and they will automatically compile, and the browser should reload.
|
|
28
28
|
|
|
29
|
+
### Building
|
|
30
|
+
|
|
31
|
+
In order to "compile" TimelineJS for use in other contexts, after following the instructions above, run the command `npm run dist`. This will populate a directory, `dist/` in the rool of your checked-out repository, with the javascript and CSS necessary to self-host TimelineJS.
|
|
32
|
+
|
|
33
|
+
|
|
29
34
|
### Testing
|
|
30
35
|
|
|
31
36
|
Timeline has a modest suite of tests implemented using `jest`. You can run them using `npm test`. We'd love to have more tests, but have not yet determined a good way to run unit tests against the visual details of timelines. (Let us know if you have suggestions!) It's a good idea to occasionally run `npm test` to make sure you haven't messed anything up.
|
|
@@ -24,7 +24,7 @@ https://www.google.com/fonts/specimen/Raleway
|
|
|
24
24
|
font-family: 'Bitter';
|
|
25
25
|
font-style: normal;
|
|
26
26
|
font-weight: 700;
|
|
27
|
-
src: url(https://fonts.gstatic.com/s/bitter/
|
|
27
|
+
src: url(https://fonts.gstatic.com/s/bitter/v32/raxhHiqOu8IVPmnRc6SY1KXhnF_Y8RHYOLjOWA.ttf) format('truetype');
|
|
28
28
|
}
|
|
29
29
|
@font-face {
|
|
30
30
|
font-family: 'Raleway';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lang": "en-gb",
|
|
3
|
+
"date": {
|
|
4
|
+
"month_abbr": [
|
|
5
|
+
"Jan",
|
|
6
|
+
"Feb",
|
|
7
|
+
"Mar",
|
|
8
|
+
"Apr",
|
|
9
|
+
"May",
|
|
10
|
+
"Jun",
|
|
11
|
+
"Jul",
|
|
12
|
+
"Aug",
|
|
13
|
+
"Sep",
|
|
14
|
+
"Oct",
|
|
15
|
+
"Nov",
|
|
16
|
+
"Dec"
|
|
17
|
+
],
|
|
18
|
+
"day_abbr": [
|
|
19
|
+
"Sun",
|
|
20
|
+
"Mon",
|
|
21
|
+
"Tue",
|
|
22
|
+
"Wed",
|
|
23
|
+
"Thu",
|
|
24
|
+
"Fri",
|
|
25
|
+
"Sat"
|
|
26
|
+
],
|
|
27
|
+
"day": [
|
|
28
|
+
"Sunday",
|
|
29
|
+
"Monday",
|
|
30
|
+
"Tuesday",
|
|
31
|
+
"Wednesday",
|
|
32
|
+
"Thursday",
|
|
33
|
+
"Friday",
|
|
34
|
+
"Saturday"
|
|
35
|
+
],
|
|
36
|
+
"month": [
|
|
37
|
+
"January",
|
|
38
|
+
"February",
|
|
39
|
+
"March",
|
|
40
|
+
"April",
|
|
41
|
+
"May",
|
|
42
|
+
"June",
|
|
43
|
+
"July",
|
|
44
|
+
"August",
|
|
45
|
+
"September",
|
|
46
|
+
"October",
|
|
47
|
+
"November",
|
|
48
|
+
"December"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"api": {
|
|
52
|
+
"wikipedia": "en"
|
|
53
|
+
},
|
|
54
|
+
"messages": {
|
|
55
|
+
"comment": "There is no need to repeat message keys because the fallback is English and this file only exists to control date formatting."
|
|
56
|
+
},
|
|
57
|
+
"dateformats": {
|
|
58
|
+
"full_long": "d mmm yyyy 'at' HH:MM TT",
|
|
59
|
+
"full_short": "d mmm",
|
|
60
|
+
"full": "d mmmm yyyy",
|
|
61
|
+
"month_short": "mmm",
|
|
62
|
+
"time_no_seconds_small_date": "HH:MM TT'<br/><small>'d mmmm yyyy'</small>'",
|
|
63
|
+
"month": "mmmm yyyy",
|
|
64
|
+
"time_no_seconds_short": "HH:MM TT",
|
|
65
|
+
"time_short": "HH:MM:ss",
|
|
66
|
+
"year": "yyyy",
|
|
67
|
+
"full_long_small_date": "HH:MM TT'<br/><small>d mmm yyyy'</small>'"
|
|
68
|
+
}
|
|
69
|
+
}
|
package/dist/js/locale/es.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"messages": {
|
|
55
55
|
"loading": "cargando",
|
|
56
56
|
"return_to_title": "Volver al título",
|
|
57
|
-
"
|
|
57
|
+
"swipe_to_navigate": "Desliza para ver<br><span class='tl-button'>OK</span>",
|
|
58
58
|
"wikipedia": "Desde Wikipedia, la enciclopedia libre",
|
|
59
59
|
"loading_content": "cargando",
|
|
60
60
|
"loading_timeline": "La cronología esta cargando"
|
package/dist/js/locale/hi.json
CHANGED