@knight-lab/timelinejs 3.8.16 → 3.8.20
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 → CHANGELOG.md} +71 -8
- package/README.md +21 -19
- package/RELEASING.md +4 -4
- package/dist/css/fonts/font.abril-droidsans.css +143 -0
- package/dist/css/fonts/font.amatic-andika.css +143 -0
- package/dist/css/fonts/font.bevan-pontanosans.css +141 -0
- package/dist/css/fonts/font.bitter-raleway.css +149 -0
- package/dist/css/fonts/font.clicker-garamond.css +141 -0
- package/dist/css/fonts/font.dancing-ledger.css +143 -0
- package/dist/css/fonts/font.default.css +155 -0
- package/dist/css/fonts/font.fjalla-average.css +141 -0
- package/dist/css/fonts/font.georgia-helvetica.css +123 -0
- package/dist/css/fonts/font.knightlab.css +125 -0
- package/dist/css/fonts/font.lustria-lato.css +147 -0
- package/dist/css/fonts/font.medula-lato.css +149 -0
- package/dist/css/fonts/font.oldstandard.css +135 -0
- package/dist/css/fonts/font.opensans-gentiumbook.css +155 -0
- package/dist/css/fonts/font.playfair-faunaone.css +156 -0
- package/dist/css/fonts/font.playfair.css +143 -0
- package/dist/css/fonts/font.pt.css +153 -0
- package/dist/css/fonts/font.roboto-megrim.css +143 -0
- package/dist/css/fonts/font.rufina-sintony.css +149 -0
- package/dist/css/fonts/font.ubuntu.css +145 -0
- package/dist/css/fonts/font.unicaone-vollkorn.css +143 -0
- package/dist/css/icons/tl-icons.eot +0 -0
- package/dist/css/icons/tl-icons.svg +63 -0
- package/dist/css/icons/tl-icons.ttf +0 -0
- package/dist/css/icons/tl-icons.woff +0 -0
- package/dist/css/icons/tl-icons.woff2 +0 -0
- package/dist/css/themes/timeline.theme.contrast.css +3125 -0
- package/dist/css/themes/timeline.theme.dark.css +3125 -0
- package/dist/css/timeline.css +3128 -0
- package/dist/css/timeline.css.map +1 -0
- package/dist/embed/compare.html +91 -0
- package/dist/embed/index.html +170 -0
- package/dist/embed/old-index.html +170 -0
- package/dist/embed/popular_timelines.json +1 -0
- package/dist/js/locale/af.json +75 -0
- package/dist/js/locale/ar.json +76 -0
- package/dist/js/locale/be.json +75 -0
- package/dist/js/locale/bg.json +75 -0
- package/dist/js/locale/ca.json +75 -0
- package/dist/js/locale/cz.json +108 -0
- package/dist/js/locale/da.json +75 -0
- package/dist/js/locale/de.json +76 -0
- package/dist/js/locale/el.json +75 -0
- package/dist/js/locale/en-24hr.json +75 -0
- package/dist/js/locale/en-week.json +75 -0
- package/dist/js/locale/en.json +152 -0
- package/dist/js/locale/eo.json +75 -0
- package/dist/js/locale/es.json +76 -0
- package/dist/js/locale/et.json +75 -0
- package/dist/js/locale/eu.json +75 -0
- package/dist/js/locale/fa.json +74 -0
- package/dist/js/locale/fi.json +95 -0
- package/dist/js/locale/fo.json +75 -0
- package/dist/js/locale/fr.json +119 -0
- package/dist/js/locale/fy.json +75 -0
- package/dist/js/locale/ga.json +75 -0
- package/dist/js/locale/gl.json +75 -0
- package/dist/js/locale/he.json +76 -0
- package/dist/js/locale/hi.json +76 -0
- package/dist/js/locale/hr.json +75 -0
- package/dist/js/locale/hu.json +114 -0
- package/dist/js/locale/hy.json +75 -0
- package/dist/js/locale/id.json +75 -0
- package/dist/js/locale/is.json +75 -0
- package/dist/js/locale/it.json +92 -0
- package/dist/js/locale/iw.json +76 -0
- package/dist/js/locale/ja.json +75 -0
- package/dist/js/locale/ka.json +75 -0
- package/dist/js/locale/ko.json +75 -0
- package/dist/js/locale/lb.json +75 -0
- package/dist/js/locale/lt.json +75 -0
- package/dist/js/locale/lv.json +75 -0
- package/dist/js/locale/ms.json +75 -0
- package/dist/js/locale/my.json +124 -0
- package/dist/js/locale/ne.json +75 -0
- package/dist/js/locale/nl.json +75 -0
- package/dist/js/locale/no.json +76 -0
- package/dist/js/locale/pl.json +75 -0
- package/dist/js/locale/pt-br.json +78 -0
- package/dist/js/locale/pt.json +78 -0
- package/dist/js/locale/rm.json +75 -0
- package/dist/js/locale/ro.json +75 -0
- package/dist/js/locale/ru.json +75 -0
- package/dist/js/locale/si.json +74 -0
- package/dist/js/locale/sk.json +75 -0
- package/dist/js/locale/sl.json +75 -0
- package/dist/js/locale/sr-cy.json +75 -0
- package/dist/js/locale/sr.json +75 -0
- package/dist/js/locale/sv.json +86 -0
- package/dist/js/locale/ta.json +75 -0
- package/dist/js/locale/te.json +74 -0
- package/dist/js/locale/th.json +108 -0
- package/dist/js/locale/tl.json +75 -0
- package/dist/js/locale/tr.json +75 -0
- package/dist/js/locale/uk.json +75 -0
- package/dist/js/locale/ur.json +123 -0
- package/dist/js/locale/vi.json +74 -0
- package/dist/js/locale/zh-cn.json +76 -0
- package/dist/js/locale/zh-tw.json +75 -0
- package/dist/js/timeline-min.js +12 -0
- package/dist/js/timeline.js +12 -0
- package/dist/js/timeline.js.map +1 -0
- package/dist/timeline3.zip +0 -0
- package/index.js +1 -0
- package/package.json +4 -4
- package/src/embed/old-index.html +128 -18
- package/src/js/__tests__/Timeline.test.js +18 -3
- package/src/js/core/Util.js +1 -1
- package/src/js/index.js +1 -1
- package/src/js/language/locale/zh-cn.json +1 -1
- package/src/js/media/MediaType.js +1 -1
- package/src/js/media/types/Audio.js +15 -1
- package/src/js/media/types/Image.js +2 -2
- package/src/js/media/types/PDF.js +2 -2
- package/src/js/media/types/Video.js +17 -1
- package/src/js/timeline/Timeline.js +7 -12
- package/src/less/fonts/font.georgia-helvetica.less +2 -2
- package/src/less/fonts/font.roboto-megrim.less +2 -2
- package/src/template/all-media-types.json +61 -24
- package/src/template/index.html +39 -19
- package/{contrib/women_in_computing.csv → src/template/my-own-timeline.csv} +5 -5
- package/contrib/README.md +0 -13
- package/contrib/csv_to_json.py +0 -106
- package/contrib/docs/ImageHosting.md +0 -120
- package/contrib/examples/autoload.html +0 -44
- package/contrib/examples/iBooksAuthor/README.md +0 -37
- package/contrib/examples/iBooksAuthor/TimelineJS.wdgt/Default.png +0 -0
- package/contrib/examples/iBooksAuthor/TimelineJS.wdgt/Info.plist +0 -27
- package/contrib/examples/iBooksAuthor/TimelineJS.wdgt/index.html +0 -13
- package/contrib/examples/react.html +0 -40
- package/contrib/examples/vue.html +0 -29
- package/contrib/fedorbeets/README.md +0 -3
- package/contrib/fedorbeets/timeline.py.txt +0 -56
- package/contrib/iamamoose/README.md +0 -3
- package/contrib/iamamoose/timeline.py.txt +0 -53
- package/contrib/women_in_computing.json +0 -263
- package/fabfile.py +0 -64
- package/requirements.txt +0 -29
- package/util/convert_json.py +0 -96
- package/website/__init__.py +0 -0
- package/website/app.py +0 -101
- package/website/core/__init__.py +0 -0
- package/website/core/settings/__init__.py +0 -0
- package/website/core/settings/base.py +0 -6
- package/website/core/settings/loc.py +0 -16
- package/website/examples.json +0 -114
- package/website/faq.json +0 -81
- package/website/static/css/desert.css +0 -34
- package/website/static/css/site.css +0 -74
- package/website/static/img/TimelineJSTags.jpg +0 -0
- package/website/static/img/examples/houston/eyesclosedftm_10001.jpg +0 -0
- package/website/static/img/examples/houston/family.jpg +0 -0
- package/website/static/img/examples/houston/family.png +0 -0
- package/website/static/img/examples/houston/wh1.jpg +0 -0
- package/website/static/img/examples/houston/wh2.jpg +0 -0
- package/website/static/img/examples/houston/wh3.jpg +0 -0
- package/website/static/img/examples/houston/whChild.jpg +0 -0
- package/website/static/img/examples/houston/whlead.jpg +0 -0
- package/website/static/img/examples/houston/young.jpg +0 -0
- package/website/static/img/examples/logos/Northwestern University.png +0 -0
- package/website/static/img/examples/logos/Social-Logos.png +0 -0
- package/website/static/img/examples/logos/knightlab-logo-background.png +0 -0
- package/website/static/img/examples/logos/knightlab-logo-small.png +0 -0
- package/website/static/img/examples/logos/knightlab-logo.png +0 -0
- package/website/static/img/examples/logos/less-small.png +0 -0
- package/website/static/img/examples/logos/logo_aljazeera.png +0 -0
- package/website/static/img/examples/logos/logo_arte.png +0 -0
- package/website/static/img/examples/logos/logo_beyondtheseal.png +0 -0
- package/website/static/img/examples/logos/logo_centerforpublicintegrity.png +0 -0
- package/website/static/img/examples/logos/logo_cnn.png +0 -0
- package/website/static/img/examples/logos/logo_denverpost.png +0 -0
- package/website/static/img/examples/logos/logo_engadget.png +0 -0
- package/website/static/img/examples/logos/logo_gigaom.png +0 -0
- package/website/static/img/examples/logos/logo_ibt.png +0 -0
- package/website/static/img/examples/logos/logo_knightlab.png +0 -0
- package/website/static/img/examples/logos/logo_ksat.png +0 -0
- package/website/static/img/examples/logos/logo_lemonde.png +0 -0
- package/website/static/img/examples/logos/logo_maneater.png +0 -0
- package/website/static/img/examples/logos/logo_mashable.png +0 -0
- package/website/static/img/examples/logos/logo_radiolab.png +0 -0
- package/website/static/img/examples/logos/logo_time.png +0 -0
- package/website/static/img/examples/logos/logo_vh1.png +0 -0
- package/website/static/img/examples/logos/logo_vinepair.png +0 -0
- package/website/static/img/examples/logos/logo_wbur.png +0 -0
- package/website/static/img/examples/thumbs/thumb_akira.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_aljazeera.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_artetv.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_banana.png +0 -0
- package/website/static/img/examples/thumbs/thumb_bulger.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_denver_shooting.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_houston.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_isis.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_lemonde.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_malaysia-airlines.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_mandela.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_mobile_device.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_northkorea.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_perpwalk.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_radiolab-colorwalking.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_republican.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_shtpeoplesay.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_supremecourt.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_univofmissouri.jpg +0 -0
- package/website/static/img/examples/thumbs/thumb_userinterface.png +0 -0
- package/website/static/img/examples/thumbs/thumb_wine.jpg +0 -0
- package/website/static/img/examples/user-interface/4s.jpg +0 -0
- package/website/static/img/examples/user-interface/apple.jpg +0 -0
- package/website/static/img/examples/user-interface/input.png +0 -0
- package/website/static/img/examples/user-interface/palm.png +0 -0
- package/website/static/img/examples/user-interface/pascaline.jpg +0 -0
- package/website/static/img/examples/user-interface/univac.JPG +0 -0
- package/website/static/img/font-options.png +0 -0
- package/website/static/img/kl-og.png +0 -0
- package/website/static/img/knightlab_logo.png +0 -0
- package/website/static/img/loading.gif +0 -0
- package/website/static/img/make/abril-droidsans.png +0 -0
- package/website/static/img/make/amatic-andika.png +0 -0
- package/website/static/img/make/bevan-pontanosans.png +0 -0
- package/website/static/img/make/bitter-raleway.png +0 -0
- package/website/static/img/make/clicker-garamond.png +0 -0
- package/website/static/img/make/dancing-ledger.png +0 -0
- package/website/static/img/make/default.png +0 -0
- package/website/static/img/make/fakedropdown.svg +0 -1
- package/website/static/img/make/fjalla-average.png +0 -0
- package/website/static/img/make/font-options.png +0 -0
- package/website/static/img/make/georgia-helvetica.png +0 -0
- package/website/static/img/make/lustria-lato.png +0 -0
- package/website/static/img/make/medula-lato.png +0 -0
- package/website/static/img/make/oldstandard.png +0 -0
- package/website/static/img/make/opensans-gentiumbook.png +0 -0
- package/website/static/img/make/playfair-faunaone.png +0 -0
- package/website/static/img/make/playfair.png +0 -0
- package/website/static/img/make/pt.png +0 -0
- package/website/static/img/make/publish_to_web_browser_url.png +0 -0
- package/website/static/img/make/publish_to_web_button_small-od1.png +0 -0
- package/website/static/img/make/publish_to_web_button_small.png +0 -0
- package/website/static/img/make/publish_to_web_small.png +0 -0
- package/website/static/img/make/publish_to_web_url_small.png +0 -0
- package/website/static/img/make/roboto-megrim.png +0 -0
- package/website/static/img/make/rufina-sintony.png +0 -0
- package/website/static/img/make/unicaone-vollkorn.png +0 -0
- package/website/static/img/make/v4_step_1.png +0 -0
- package/website/static/img/make/v4_step_2.png +0 -0
- package/website/static/img/timeline.png +0 -0
- package/website/static/img/timeline3_intro_image.png +0 -0
- package/website/static/js/faq-generator.js +0 -20
- package/website/static/js/main.js +0 -240
- package/website/static/welcome/step3.png +0 -0
- package/website/static/welcome/welcome.json +0 -266
- package/website/templates/_about.html +0 -23
- package/website/templates/_analytics.html +0 -10
- package/website/templates/_banner.html +0 -26
- package/website/templates/_demo.html +0 -5
- package/website/templates/_developers.html +0 -19
- package/website/templates/_examples.html +0 -156
- package/website/templates/_faq.html +0 -117
- package/website/templates/_footer.html +0 -54
- package/website/templates/_head.html +0 -38
- package/website/templates/_header.html +0 -18
- package/website/templates/_help.html +0 -50
- package/website/templates/_make.html +0 -291
- package/website/templates/_nav.html +0 -24
- package/website/templates/_overview.html +0 -32
- package/website/templates/_roadmap.html +0 -27
- package/website/templates/_storytelling_tools.html +0 -35
- package/website/templates/base.html +0 -37
- package/website/templates/docs/faq.html +0 -223
- package/website/templates/docs/index.html +0 -57
- package/website/templates/docs/instantiate-a-timeline.html +0 -207
- package/website/templates/docs/json-format.html +0 -477
- package/website/templates/docs/license.html +0 -29
- package/website/templates/docs/media-types.html +0 -82
- package/website/templates/docs/options.html +0 -503
- package/website/templates/docs/overriding-styles.html +0 -357
- package/website/templates/docs/using-spreadsheets.html +0 -94
- package/website/templates/error.html +0 -28
- package/website/templates/examples/_common_example_embed.html +0 -27
- package/website/templates/examples/embed-test/index.html +0 -41
- package/website/templates/examples/example.json +0 -328
- package/website/templates/examples/houston/index.html +0 -40
- package/website/templates/examples/houston/timeline2.json +0 -218
- package/website/templates/examples/houston/timeline3.json +0 -271
- package/website/templates/examples/mediatypes/index.html +0 -61
- package/website/templates/examples/mediatypes/timeline3.json +0 -421
- package/website/templates/examples/republican/index.html +0 -49
- package/website/templates/examples/republican/timeline2.json +0 -0
- package/website/templates/examples/republican/timeline3.json +0 -238
- package/website/templates/examples/shit-people-say/index.html +0 -39
- package/website/templates/examples/shit-people-say/timeline2.json +0 -243
- package/website/templates/examples/shit-people-say/timeline3.json +0 -336
- package/website/templates/examples/soundcite/index.html +0 -42
- package/website/templates/examples/soundcite/timeline3.json +0 -271
- package/website/templates/examples/timeline3.json +0 -271
- package/website/templates/examples/twain/index.html +0 -85
- package/website/templates/examples/twain/marktwain.json +0 -502
- package/website/templates/examples/user-interface/index.html +0 -40
- package/website/templates/examples/user-interface/timeline2.json +0 -260
- package/website/templates/examples/user-interface/timeline3.json +0 -327
- package/website/templates/index.html +0 -17
- package/website/templates/mediatype-tests.html +0 -121
- package/website/templates/test/GoogleSpreadsheetFeedLegacyFormat.json +0 -1
- package/website/templates/test/GoogleSpreadsheetFeedTJS3Format.json +0 -1
- package/website/templates/test/maps.html +0 -4
- package/website/templates/unit-tests.html +0 -775
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>TimelineJS Embed</title>
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="description" content="TimelineJS Embed">
|
|
8
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-touch-fullscreen" content="yes">
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
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="../js/timeline.js"></script>
|
|
23
|
+
<link rel="stylesheet" href="../css/timeline.css">
|
|
24
|
+
<!-- Google Analytics should be handled by Timeline -->
|
|
25
|
+
|
|
26
|
+
<base target="_blank">
|
|
27
|
+
|
|
28
|
+
<!-- Style-->
|
|
29
|
+
<style>
|
|
30
|
+
html,
|
|
31
|
+
body {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
padding: 0px;
|
|
35
|
+
margin: 0px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#timeline-embed {
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
42
|
+
<!-- HTML5 shim, for IE6-8 support of HTML elements-->
|
|
43
|
+
<!--[if lt IE 9]>
|
|
44
|
+
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
|
45
|
+
</head>
|
|
46
|
+
|
|
47
|
+
<body>
|
|
48
|
+
<!-- BEGIN Timeline Embed -->
|
|
49
|
+
<div id="timeline-embed"></div>
|
|
50
|
+
<!-- Override -->
|
|
51
|
+
<script type="text/javascript">
|
|
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
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
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
|
+
}
|
|
122
|
+
}
|
|
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
|
+
})
|
|
167
|
+
</script>
|
|
168
|
+
</body>
|
|
169
|
+
|
|
170
|
+
</html>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>TimelineJS Embed</title>
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="description" content="TimelineJS Embed">
|
|
8
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-touch-fullscreen" content="yes">
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
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
|
+
|
|
26
|
+
<base target="_blank">
|
|
27
|
+
|
|
28
|
+
<!-- Style-->
|
|
29
|
+
<style>
|
|
30
|
+
html,
|
|
31
|
+
body {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
padding: 0px;
|
|
35
|
+
margin: 0px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#timeline-embed {
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
42
|
+
<!-- HTML5 shim, for IE6-8 support of HTML elements-->
|
|
43
|
+
<!--[if lt IE 9]>
|
|
44
|
+
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
|
45
|
+
</head>
|
|
46
|
+
|
|
47
|
+
<body>
|
|
48
|
+
<!-- BEGIN Timeline Embed -->
|
|
49
|
+
<div id="timeline-embed"></div>
|
|
50
|
+
<!-- Override -->
|
|
51
|
+
<script type="text/javascript">
|
|
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
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
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
|
+
}
|
|
122
|
+
}
|
|
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
|
+
})
|
|
167
|
+
</script>
|
|
168
|
+
</body>
|
|
169
|
+
|
|
170
|
+
</html>
|