Browse Source

merged with master, updated embed functionality to work with i18n stuff, added example in examples/i18n_example/index.html

pull/12/head
Martin Widmann 13 years ago
parent
commit
49b1346783
  1. 13
      .gitignore
  2. 13
      LICENSE
  3. 1
      README.html
  4. 1
      date.format.min.js
  5. BIN
      examples/.DS_Store
  6. 46
      examples/embed.html
  7. 75
      examples/i18n_example/index.html
  8. 26
      examples/kitchen-sink/index.html
  9. BIN
      examples/template_googlespreadsheet/.DS_Store
  10. 52
      examples/template_googlespreadsheet/index.html
  11. BIN
      examples/template_html/.DS_Store
  12. 11
      examples/template_html/index.html
  13. 50
      examples/template_json/index.html
  14. BIN
      source/.DS_Store
  15. 1
      source/css/mixins.css
  16. 20
      source/css/reset.css
  17. 119
      source/css/structure-slider.css
  18. 1
      source/css/structure.css
  19. 1
      source/css/variables.css
  20. BIN
      source/gfx/.DS_Store
  21. BIN
      source/gfx/Sprites/.DS_Store
  22. BIN
      source/gfx/timeline-dark.png
  23. BIN
      source/gfx/timeline-dark.psd
  24. BIN
      source/gfx/timeline.psd
  25. BIN
      source/js/.DS_Store
  26. 463
      source/js/AES.js
  27. 137
      source/js/VMM.Core.js
  28. 247
      source/js/VMM.LoadLib.js
  29. 98
      source/js/VMM.Util.js
  30. 754
      source/js/VMM.js
  31. 125
      source/js/date-format.js
  32. 391
      source/js/lazyload.js
  33. 195
      source/js/timeline-embed.js
  34. 186
      source/js/timeline.js
  35. 105
      source/less/gfx-dark.less
  36. 36
      source/less/gfx.less
  37. 47
      source/less/slider.less
  38. 5
      source/less/structure-navigation.less
  39. 29
      source/less/structure.less
  40. 26
      source/less/timeline-dark.less
  41. 6
      source/less/timeline.less
  42. 100
      source/less/variables-dark.less
  43. 50
      source/less/variables.less
  44. 1466
      timeline-dark.css
  45. BIN
      timeline-dark.png
  46. 36
      timeline-embed.js
  47. 28
      timeline-min.js
  48. 23
      timeline.css
  49. 6579
      timeline.js

13
.gitignore vendored

@ -1,2 +1,15 @@
.DS_Store
source/.DS_Store
source/js/.DS_Store
dev_examples/
*.tmproj
*.tmproject
tmtags
source/gfx/.DS_Store

13
LICENSE

@ -0,0 +1,13 @@
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
http://www.gnu.org/licenses/
Map tiles by [Stamen Design](http://stamen.com "Stamen Design"), under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0 "CC BY 3.0"). Data by [OpenStreetMap](http://openstreetmap.org "OpenStreetMap"), under [CC BY SA](http://creativecommons.org/licenses/by-sa/3.0 "CC BY SA").

1
README.html

File diff suppressed because one or more lines are too long

1
date.format.min.js vendored

@ -1 +0,0 @@
var dateFormat=function(){var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,d=function(a,b){a=String(a);b=b||2;while(a.length<b)a="0"+a;return a};return function(e,f,g){var h=dateFormat;if(arguments.length==1&&Object.prototype.toString.call(e)=="[object String]"&&!/\d/.test(e)){f=e;e=undefined}e=e?new Date(e):new Date;if(isNaN(e))throw SyntaxError("invalid date");f=String(h.masks[f]||f||h.masks["default"]);if(f.slice(0,4)=="UTC:"){f=f.slice(4);g=true}var i=g?"getUTC":"get",j=e[i+"Date"](),k=e[i+"Day"](),l=e[i+"Month"](),m=e[i+"FullYear"](),n=e[i+"Hours"](),o=e[i+"Minutes"](),p=e[i+"Seconds"](),q=e[i+"Milliseconds"](),r=g?0:e.getTimezoneOffset(),s={d:j,dd:d(j),ddd:h.i18n.dayNames[k],dddd:h.i18n.dayNames[k+7],m:l+1,mm:d(l+1),mmm:h.i18n.monthNames[l],mmmm:h.i18n.monthNames[l+12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:d(n%12||12),H:n,HH:d(n),M:o,MM:d(o),s:p,ss:d(p),l:d(q,3),L:d(q>99?Math.round(q/10):q),t:n<12?"a":"p",tt:n<12?"am":"pm",T:n<12?"A":"P",TT:n<12?"AM":"PM",Z:g?"UTC":(String(e).match(b)||[""]).pop().replace(c,""),o:(r>0?"-":"+")+d(Math.floor(Math.abs(r)/60)*100+Math.abs(r)%60,4),S:["th","st","nd","rd"][j%10>3?0:(j%100-j%10!=10)*j%10]};return f.replace(a,function(a){return a in s?s[a]:a.slice(1,a.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};Date.prototype.format=function(a,b){return dateFormat(this,a,b)}

BIN
examples/.DS_Store vendored

Binary file not shown.

46
examples/embed.html

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Embed Timeline</title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
html, body {
height:100%;
padding: 0px;
margin: 0px;
}
#timeline-embed{
margin:0px !important;
border:0px solid #CCC !important;
padding:0px !important;
-webkit-border-radius:0px !important;
-moz-border-radius:0px !important;
border-radius:0px !important;
-moz-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
-webkit-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
box-shadow:0px 0px 0px rgba(0, 0, 0, 0.25) !important;
}
</style>
</head>
<body>
<!-- BEGIN Timeline Embed -->
<div id="timeline-embed"></div>
<script type="text/javascript">
var timeline_config = {
width: "100%",
height: "100%",
source: 'https://docs.google.com/spreadsheet/pub?key=0Agl_Dv6iEbDadHdKcHlHcTB5bzhvbF9iTWwyMmJHdkE&output=html'
}
</script>
<script type="text/javascript" src="../timeline-embed.js"></script>
<!-- END Timeline Embed -->
</body>
</html>

75
examples/i18n_example/index.html

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Timeline Google Spreadsheet Template</title>
<meta name="description" content="Template Description">
<style>
html, body {
height:100%;
padding: 0px;
margin: 0px;
}
#timeline-embed{
margin:0px !important;
border:0px solid #CCC !important;
padding:0px !important;
-webkit-border-radius:0px !important;
-moz-border-radius:0px !important;
border-radius:0px !important;
-moz-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
-webkit-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
box-shadow:0px 0px 0px rgba(0, 0, 0, 0.25) !important;
}
</style>
</head>
<body>
<!-- BEGIN Timeline Embed -->
<div id="timeline-embed"></div>
<script type="text/javascript">
var config = {
width: "100%",
height: "100%",
source: 'https://docs.google.com/spreadsheet/pub?key=0AsTYTZtQh7kpdFhXamZFMEcxaXp0aGY5UE5PcUliU2c&output=html',
js: '../../timeline-min.js'
// uncomment next line for debugging
//js: ['../../source/js/date-format.js', '../../source/js/VMM.js', '../../source/js/VMM.Core.js', '../../source/js/VMM.Util.js', '../../source/js/VMM.LoadLib.js', '../../source/js/bootstrap-tooltip.js', '../../source/js/AES.js', '../../source/js/timeline.js']
}
config.i18n = {
date: {
month: ["Jänner", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
month_abbr: ["Jän.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sept.", "Okt.", "Nov.", "Dez."],
day: ["Sonntag","Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
day_abbr: ["So.","Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."]
},
dateformats: {
year: "yyyy",
month_short: "mmm",
month: "mmmm yyyy",
full_short: "d. mmm",
full: "d. mmmm yyyy",
time_no_seconds_short: "HH:MM",
time_no_seconds_small_date: "HH:MM'<br/><small>'d. mmmm yyyy'</small>'",
full_long: "dddd',' d. mmm yyyy 'um' HH:MM",
full_long_small_date: "HH:MM'<br/><small>'dddd',' d. mmm yyyy'</small>'"
},
messages: {
loading_timeline: "Chronologie wird geladen...",
return_to_title: "ZurĂĽck zum Anfang",
expand_timeline: "Chronologie vergrößern",
contract_timeline: "Chronologie verkleinern" ,
unsupported_ie7: "Internet Explorer 7 wird von Timeline nicht unterstĂĽtzt."
}
};
</script>
<script type="text/javascript" src="../../timeline-embed.js"></script>
<!-- END Timeline Embed -->
</body>
</html>

26
examples/kitchen-sink/index.html

@ -6,10 +6,6 @@
<meta name="description" content="Template Description">
<meta name="author" content="Zach Wise">
<!-- Set the viewport for mobile devices -->
<!-- <meta name="viewport" content="width=device-width,maximum-scale=1.0" /> -->
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@ -17,6 +13,13 @@
<!-- CSS -->
<link href="../../timeline.css" rel="stylesheet">
<style>
html, body {
height:100%;
padding: 0px;
margin: 0px;
}
</style>
<!-- JavaScript -->
<script type="text/javascript" src="../../jquery-min.js"></script>
@ -24,7 +27,7 @@
<script type="text/javascript" src="../../timeline-min.js"></script>
<script>
$(document).ready(function() {
timeline = new VMM.Timeline();
var timeline = new VMM.Timeline();
timeline.init("data.json");
});
</script>
@ -34,20 +37,7 @@
<link rel="apple-touch-icon" href="../../gfx/favicons/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../../gfx/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../../gfx/favicons/apple-touch-icon-114x114.png">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-537357-18']);
_gaq.push(['_setDomainName', 'verite.co']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>

BIN
examples/template_googlespreadsheet/.DS_Store vendored

Binary file not shown.

52
examples/template_googlespreadsheet/index.html

@ -4,32 +4,40 @@
<meta charset="utf-8">
<title>Timeline Google Spreadsheet Template</title>
<meta name="description" content="Template Description">
<meta name="author" content="Zach Wise">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- CSS -->
<link href="../../timeline.css" rel="stylesheet">
<!-- JavaScript -->
<script type="text/javascript" src="../../jquery-min.js"></script>
<!-- <script type="text/javascript" src="jquery.mobile-1.0.min.js"></script> -->
<script type="text/javascript" src="../../timeline-min.js"></script>
<script>
$(document).ready(function() {
var timeline = new VMM.Timeline();
timeline.init("https://docs.google.com/a/digitalartwork.net/spreadsheet/ccc?hl=en_US&key=0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE&rm=full#gid=0");
});
</script>
<style>
html, body {
height:100%;
padding: 0px;
margin: 0px;
}
#timeline-embed{
margin:0px !important;
border:0px solid #CCC !important;
padding:0px !important;
-webkit-border-radius:0px !important;
-moz-border-radius:0px !important;
border-radius:0px !important;
-moz-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
-webkit-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
box-shadow:0px 0px 0px rgba(0, 0, 0, 0.25) !important;
}
</style>
</head>
<body>
<div id="timeline"></div>
<!-- BEGIN Timeline Embed -->
<div id="timeline-embed"></div>
<script type="text/javascript">
var config = {
width: "100%",
height: "100%",
source: 'https://docs.google.com/spreadsheet/pub?key=0Agl_Dv6iEbDadHdKcHlHcTB5bzhvbF9iTWwyMmJHdkE&output=html'
}
</script>
<script type="text/javascript" src="http://veritetimeline.appspot.com/latest/timeline-embed.js"></script>
<!-- END Timeline Embed -->
</body>
</html>

BIN
examples/template_html/.DS_Store vendored

Binary file not shown.

11
examples/template_html/index.html

@ -4,10 +4,7 @@
<meta charset="utf-8">
<title>Timeline</title>
<meta name="description" content="Template Description">
<meta name="author" content="Zach Wise">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@ -15,7 +12,13 @@
<!-- CSS -->
<link href="../../timeline.css" rel="stylesheet">
<style>
html, body {
height:100%;
padding: 0px;
margin: 0px;
}
</style>
<!-- JavaScript -->
<script type="text/javascript" src="../../jquery-min.js"></script>
<!-- <script type="text/javascript" src="jquery.mobile-1.0.min.js"></script> -->

50
examples/template_json/index.html

@ -4,35 +4,45 @@
<meta charset="utf-8">
<title>Timeline JSON Template</title>
<meta name="description" content="Template Description">
<meta name="author" content="Zach Wise">
<!-- Set the viewport for mobile devices -->
<!-- <meta name="viewport" content="width=device-width,maximum-scale=1.0" /> -->
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- CSS -->
<link href="../../timeline.css" rel="stylesheet">
<style>
html, body {
height:100%;
padding: 0px;
margin: 0px;
}
#timeline-embed{
margin:0px !important;
border:0px solid #CCC !important;
padding:0px !important;
-webkit-border-radius:0px !important;
-moz-border-radius:0px !important;
border-radius:0px !important;
-moz-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
-webkit-box-shadow:0 0px 0px rgba(0, 0, 0, 0.25) !important;
box-shadow:0px 0px 0px rgba(0, 0, 0, 0.25) !important;
}
</style>
<!-- JavaScript -->
<script type="text/javascript" src="../../jquery-min.js"></script>
<!-- <script type="text/javascript" src="jquery.mobile-1.0.min.js"></script> -->
<script type="text/javascript" src="../../timeline-min.js"></script>
<script>
$(document).ready(function() {
var timeline = new VMM.Timeline();
timeline.init("data.json");
});
</script>
</head>
<body>
<div id="timeline"></div>
<!-- BEGIN Timeline Embed -->
<div id="timeline-embed"></div>
<script type="text/javascript">
var config = {
width: "100%",
height: "100%",
source: 'data.json'
}
</script>
<script type="text/javascript" src="http://veritetimeline.appspot.com/latest/timeline-embed.js"></script>
<!-- END Timeline Embed -->
</body>
</html>

BIN
source/.DS_Store vendored

Binary file not shown.

1
source/css/mixins.css

@ -1 +0,0 @@

20
source/css/reset.css

@ -1,20 +0,0 @@
#timeline h1,#timeline h2,#timeline h3,#timeline h4,#timeline h5,#timeline h6,#timeline p,#timeline blockquote,#timeline pre,#timeline a,#timeline abbr,#timeline acronym,#timeline address,#timeline cite,#timeline code,#timeline del,#timeline dfn,#timeline em,#timeline img,#timeline q,#timeline s,#timeline samp,#timeline small,#timeline strike,#timeline strong,#timeline sub,#timeline sup,#timeline tt,#timeline var,#timeline dd,#timeline dl,#timeline dt,#timeline li,#timeline ol,#timeline ul,#timeline fieldset,#timeline form,#timeline label,#timeline legend,#timeline button,#timeline table,#timeline caption,#timeline tbody,#timeline tfoot,#timeline thead,#timeline tr,#timeline th,#timeline td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
#timeline table{border-collapse:collapse;border-spacing:0;}
#timeline ol,#timeline ul{list-style:none;}
#timeline q:before,#timeline q:after,#timeline blockquote:before,#timeline blockquote:after{content:"";}
#timeline a:focus{outline:thin dotted;}
#timeline a:hover,#timeline a:active{outline:0;}
#timeline article,#timeline aside,#timeline details,#timeline figcaption,#timeline figure,#timeline footer,#timeline header,#timeline hgroup,#timeline nav,#timeline section{display:block;}
#timeline audio,#timeline canvas,#timeline video{display:inline-block;*display:inline;*zoom:1;}
#timeline audio:not([controls]){display:none;}
#timeline sub,#timeline sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
#timeline sup{top:-0.5em;}
#timeline sub{bottom:-0.25em;}
#timeline img{border:0;-ms-interpolation-mode:bicubic;}
#timeline button,#timeline input,#timeline select,#timeline textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
#timeline button,#timeline input{line-height:normal;*overflow:visible;}
#timeline button::-moz-focus-inner,#timeline input::-moz-focus-inner{border:0;padding:0;}
#timeline button,#timeline input[type="button"],#timeline input[type="reset"],#timeline input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
#timeline input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
#timeline input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
#timeline textarea{overflow:auto;vertical-align:top;}

119
source/css/structure-slider.css

@ -1,119 +0,0 @@
#timeline h1,#timeline h2,#timeline h3,#timeline h4,#timeline h5,#timeline h6,#timeline p,#timeline blockquote,#timeline pre,#timeline a,#timeline abbr,#timeline acronym,#timeline address,#timeline cite,#timeline code,#timeline del,#timeline dfn,#timeline em,#timeline img,#timeline q,#timeline s,#timeline samp,#timeline small,#timeline strike,#timeline strong,#timeline sub,#timeline sup,#timeline tt,#timeline var,#timeline dd,#timeline dl,#timeline dt,#timeline li,#timeline ol,#timeline ul,#timeline fieldset,#timeline form,#timeline label,#timeline legend,#timeline button,#timeline table,#timeline caption,#timeline tbody,#timeline tfoot,#timeline thead,#timeline tr,#timeline th,#timeline td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
#timeline table{border-collapse:collapse;border-spacing:0;}
#timeline ol,#timeline ul{list-style:none;}
#timeline q:before,#timeline q:after,#timeline blockquote:before,#timeline blockquote:after{content:"";}
#timeline a:focus{outline:thin dotted;}
#timeline a:hover,#timeline a:active{outline:0;}
#timeline article,#timeline aside,#timeline details,#timeline figcaption,#timeline figure,#timeline footer,#timeline header,#timeline hgroup,#timeline nav,#timeline section{display:block;}
#timeline audio,#timeline canvas,#timeline video{display:inline-block;*display:inline;*zoom:1;}
#timeline audio:not([controls]){display:none;}
#timeline sub,#timeline sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
#timeline sup{top:-0.5em;}
#timeline sub{bottom:-0.25em;}
#timeline img{border:0;-ms-interpolation-mode:bicubic;}
#timeline button,#timeline input,#timeline select,#timeline textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
#timeline button,#timeline input{line-height:normal;*overflow:visible;}
#timeline button::-moz-focus-inner,#timeline input::-moz-focus-inner{border:0;padding:0;}
#timeline button,#timeline input[type="button"],#timeline input[type="reset"],#timeline input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
#timeline input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
#timeline input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
#timeline textarea{overflow:auto;vertical-align:top;}
#timeline{font-family:"Georgia",Times New Roman,Times,serif;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;font-size:14px;font-weight:normal;line-height:20px;}#timeline p{font-size:14px;font-weight:normal;line-height:20px;margin-bottom:20px;color:#666666;}#timeline p small{font-size:12px;}
#timeline p:first-child{margin-top:20px;}
#timeline .navigation p{color:#999999;}
#timeline .feature h3,#timeline .feature h4,#timeline .feature h5,#timeline .feature h6{margin-bottom:15px;}
#timeline .feature p{color:#666666;}
#timeline h1,#timeline h2,#timeline h3,#timeline h4,#timeline h5,#timeline h6{font-weight:normal;color:#000000;}#timeline h1 small,#timeline h2 small,#timeline h3 small,#timeline h4 small,#timeline h5 small,#timeline h6 small{color:#999999;}
#timeline h1.date,#timeline h2.date,#timeline h3.date,#timeline h4.date,#timeline h5.date,#timeline h6.date{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;}
#timeline h1{margin-bottom:15px;font-size:28px;line-height:30px;}#timeline h1 small{font-size:18px;}
#timeline h2{margin-bottom:15px;font-size:24px;line-height:28px;}#timeline h2 small{font-size:14px;}
#timeline h3,#timeline h4,#timeline h5,#timeline h6{line-height:40px;}#timeline h3 .active,#timeline h4 .active,#timeline h5 .active,#timeline h6 .active{color:#ff0000;}
#timeline h3{font-size:18px;line-height:22px;}#timeline h3 small{font-size:14px;}
#timeline h4{font-size:16px;line-height:18px;}#timeline h4 small{font-size:12px;}
#timeline h5{font-size:14px;line-height:16px;}
#timeline h6{font-size:13px;line-height:14px;text-transform:uppercase;}
#timeline .credit,#timeline .caption{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
#timeline .credit{color:#999999;text-align:right;font-size:10px;line-height:5px;display:block;margin:0 auto;}
#timeline .caption{text-align:left;margin-top:10px;color:#666666;font-size:11px;line-height:14px;}
html,body{height:100%;padding:0px;margin:0px;}
#timeline{width:100%;height:100%;padding:0px;margin:0px;background-color:#ffffff;position:absolute;overflow:hidden;}#timeline .feedback{position:absolute;display:table;overflow:hidden;top:0px;left:0px;z-index:2000;width:100%;height:100%;background-color:#e9e9e9;border:1px solid #cccccc;}#timeline .feedback .messege{display:table-cell;vertical-align:middle;font-size:28px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;text-transform:uppercase;line-height:36px;width:75%;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;text-align:center;}
#timeline .container.main{position:absolute;top:0px: left:0px;padding-bottom:3px;padding-top:15px;width:auto;height:auto;margin:0px;clear:both;}
#timeline img,#timeline embed,#timeline object,#timeline video,#timeline iframe{max-width:100%;}
#timeline img{max-height:100%;}
#timeline a{color:#0069d6;text-decoration:none;}
#timeline a:hover{color:#00438a;text-decoration:underline;}
#timeline .twitter{max-width:500px;background-color:#ffffff;margin-left:auto;margin-right:auto;}#timeline .twitter blockquote{font-size:14px;line-height:20px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#666666;}#timeline .twitter blockquote p{font-size:28px;line-height:36px;margin-bottom:6px;padding-top:10px;background-color:#ffffff;font-family:"Georgia",Times New Roman,Times,serif;color:#000000;}
#timeline .twitter a{color:#0084b4;text-decoration:none;}
#timeline .twitter a:hover{color:#004c68;text-decoration:underline;}
#timeline .thumbnail{width:24px;height:24px;overflow:hidden;float:left;margin-right:5px;border:1px solid #cccccc;}
#timeline .thumbnail.twitter{background-image:url(gfx/icons/twitter.png);background-repeat:no-repeat;}
#timeline .thumbnail.vimeo{background-image:url(gfx/icons/vimeo.png);background-repeat:no-repeat;}
#timeline .thumbnail.youtube{background-image:url(gfx/icons/youtube.png);background-repeat:no-repeat;}
#timeline .zFront{z-index:500;}
#timeline{}#timeline .slider .slider-container-mask{width:720px;height:400px;overflow:hidden;position:relative;margin-right:100px;margin-left:100px;display:block;margin-left:auto;margin-right:auto;}#timeline .slider .slider-container-mask .slider-container{position:absolute;top:0px;left:-2160px;background-color:#ffffff;}#timeline .slider .slider-container-mask .slider-container .slider-item-container .slider-item{width:720px;top:0px;position:absolute;}
#timeline .slider .nav-previous,#timeline .slider .nav-next{position:absolute;top:0px;width:100px;color:#cccccc;font-size:11px;}#timeline .slider .nav-previous .nav-container,#timeline .slider .nav-next .nav-container{height:100px;position:absolute;}
#timeline .slider .nav-previous .icon,#timeline .slider .nav-next .icon{margin-bottom:15px;}
#timeline .slider .nav-previous .date,#timeline .slider .nav-next .date{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:bold;line-height:20px;text-transform:uppercase;margin-bottom:5px;}
#timeline .slider .nav-previous .date,#timeline .slider .nav-next .date,#timeline .slider .nav-previous .title,#timeline .slider .nav-next .title{line-height:14px;}
#timeline .slider .nav-previous:hover,#timeline .slider .nav-next:hover{color:#333333;cursor:pointer;}
#timeline .slider .nav-previous{float:left;text-align:left;}#timeline .slider .nav-previous .icon{margin-left:10px;padding-left:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAAB1SURBVHjafNFXDsAgDAPQAKWDUd//tq2EnS6p+eNJECcYWLmzklFq2Ud1iAKlVNFG2c/zoCiJIJlkA6lOlFBFXU+vIM26lkHypxvzmCnjgg91J6TPRaDJktMVwvATFc+ur7Gb02MCrfA2py/6amGe2b/jEGAA5cYUouw7P64AAAAASUVORK5CYII=) no-repeat scroll 0% 50%;}
#timeline .slider .nav-previous .date,#timeline .slider .nav-previous .title{text-align:left;padding-left:10px;}
#timeline .slider .nav-previous:hover .icon{margin-left:5px;padding-left:20px;}
#timeline .slider .nav-next{float:right;text-align:right;}#timeline .slider .nav-next .icon{margin-right:10px;padding-right:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAABySURBVHjabNFLEoAgDAPQAiJ/ev/buqCJONjlm5GkVcKwEbWR5uaaq4E0V7NB0mg0b5J2mCdpMqpC+kasaNkjrE3Ac530RgSSDkaQ0kFbN6N9g0X5KPFTteAzLuSPtQVScJyGpx1PyNo8NH9HxB6PAAMAzkAUorcBvvAAAAAASUVORK5CYII=) no-repeat scroll 100% 50%;}
#timeline .slider .nav-next .date,#timeline .slider .nav-next .title{text-align:right;padding-right:10px;}
#timeline .slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
#timeline .slider .slider-item{padding:0px;overflow:hidden;}#timeline .slider .slider-item .content{background-color:#ffffff;padding:0px;zoom:1;width:720px;margin-left:auto;margin-right:auto;}#timeline .slider .slider-item .content:before,#timeline .slider .slider-item .content:after{display:table;content:"";zoom:1;}
#timeline .slider .slider-item .content:after{clear:both;}
#timeline .slider .slider-item .content .layout-text .text{width:100%;height:100%;}#timeline .slider .slider-item .content .layout-text .text .container{width:75%;margin-left:auto;margin-right:auto;}
#timeline .slider .slider-item .content .layout-media .text{width:100%;height:100%;}#timeline .slider .slider-item .content .layout-media .text .container{width:100%;margin-left:auto;margin-right:auto;}
#timeline .slider .slider-item .content .layout-media .media{width:100%;}#timeline .slider .slider-item .content .layout-media .media .container{width:auto;}
#timeline .slider .slider-item .content .layout-text-media{height:100%;zoom:1;display:table;}#timeline .slider .slider-item .content .layout-text-media:before,#timeline .slider .slider-item .content .layout-text-media:after{display:table;content:"";zoom:1;}
#timeline .slider .slider-item .content .layout-text-media:after{clear:both;}
#timeline .slider .slider-item .content .layout-text-media .text{width:33%;min-width:150px;display:table-cell;vertical-align:middle;}#timeline .slider .slider-item .content .layout-text-media .text .container{display:table-cell;vertical-align:middle;float:right;padding-right:15px;}
#timeline .slider .slider-item .content .layout-text-media .media{width:100%;display:inline-block;}#timeline .slider .slider-item .content .layout-text-media .media .media-wrapper{margin-left:auto;margin-right:auto;display:table;vertical-align:middle;}#timeline .slider .slider-item .content .layout-text-media .media .media-wrapper .media-container{overflow:hidden;line-height:0px;padding:0px;border:1px solid #cccccc;margin-left:auto;margin-right:auto;background-color:#cccccc;}
#timeline .slider .slider-item .content .layout-text-media .media.text-media .media-wrapper .media-container{border:none;background-color:#ffffff;}
#timeline .feature{width:100%;}#timeline .feature .slider{width:100%;float:left;position:relative;}
#timeline .navigation{clear:both;width:100%;height:200px;overflow:hidden;border-top:1px solid #cccccc;position:relative;}#timeline .navigation .timenav-background{position:absolute;top:0px;left:0px;height:150px;width:100%;background-color:#e9e9e9;}#timeline .navigation .timenav-background .timenav-line{position:absolute;top:0px;left:50%;width:2px;height:150px;background:#ff0000;z-index:500;}
#timeline .navigation .timenav{position:absolute;top:0px;left:-250px;z-index:1;}#timeline .navigation .timenav .content{position:relative;}#timeline .navigation .timenav .content .marker.active .dot{background:#ff0000;}
#timeline .navigation .timenav .content .marker.active .line .event-line{background:#ff0000;}
#timeline .navigation .timenav .content .marker.active .flag{z-index:200;}#timeline .navigation .timenav .content .marker.active .flag .flag-content h3{color:#ff0000;}
#timeline .navigation .timenav .content .marker.active:hover{cursor:default;}#timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h3{color:#ff0000;}
#timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h4{color:#999999;}
#timeline .navigation .timenav .content .marker{position:absolute;top:0px;left:150px;display:block;}#timeline .navigation .timenav .content .marker .dot{position:absolute;top:150px;left:0px;display:block;width:6px;height:6px;background:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;z-index:21;}
#timeline .navigation .timenav .content .marker .line{position:absolute;top:0px;left:3px;width:1px;height:150px;background:#cccccc;z-index:22;}#timeline .navigation .timenav .content .marker .line .event-line{position:absolute;z-index:22;left:0px;height:1px;width:1px;background:#666666;filter:alpha(opacity=10);-khtml-opacity:0.1;-moz-opacity:0.1;opacity:0.1;}
#timeline .navigation .timenav .content .marker .flag{position:absolute;top:15px;left:3px;padding:0px;display:block;z-index:23;width:153px;height:56px;overflow:hidden;background-image:url(gfx/TimeFlag.png);background-repeat:no-repeat;}#timeline .navigation .timenav .content .marker .flag .flag-content{padding:5px 7px 17px 5px;overflow:hidden;}#timeline .navigation .timenav .content .marker .flag .flag-content h3{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:bold;line-height:20px;font-size:11px;line-height:12px;color:#666666;margin-bottom:2px;}
#timeline .navigation .timenav .content .marker .flag .flag-content h4{font-size:10px;line-height:11px;color:#999999;}
#timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;}
#timeline .navigation .timenav .content .marker .flag:hover{cursor:pointer;}#timeline .navigation .timenav .content .marker .flag:hover .flag-content h3{color:#333333;}
#timeline .navigation .timenav .content .marker .flag:hover .flag-content h4{color:#666666;}
#timeline .navigation .timenav .content .marker .flag.row1{z-index:25;top:48px;}
#timeline .navigation .timenav .content .marker .flag.row2{z-index:24;top:96px;}
#timeline .navigation .timenav .content .marker .flag.row3{z-index:23;top:1px;}
#timeline .navigation .timenav .content .marker .flag.zFront{z-index:100;}
#timeline .navigation .timenav .time{position:absolute;left:0px;top:150px;height:50px;background-color:#ffffff;}#timeline .navigation .timenav .time .time-interval-minor{height:6px;white-space:nowrap;position:absolute;top:-9px;left:8px;z-index:10;}#timeline .navigation .timenav .time .time-interval-minor .minor{position:relative;top:0px;display:inline-block;background:#ffffff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);width:15px;height:6px;background-position:center top;white-space:nowrap;color:#333333;margin-top:0px;padding-top:0px;}
#timeline .navigation .timenav .time .time-interval{white-space:nowrap;position:absolute;top:5px;left:0px;}#timeline .navigation .timenav .time .time-interval h5{background:#ffffff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);background-position:center top;background-repeat:no-repeat;padding-top:15px;display:inline-block;width:150px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:normal;line-height:20px;text-transform:uppercase;text-align:center;white-space:nowrap;color:#333333;margin-left:0px;margin-right:0px;margin-top:1px;}
.slider{width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask{text-align:center;width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask .slider-container{position:absolute;top:0px;left:80px;overflow:hidden;text-align:center;width:100%;height:100%;width:800px;height:600px;text-align:center;display:table;}.slider .slider-container-mask .slider-container .slider-item-container{overflow:hidden;display:table-cell;vertical-align:middle;}
.slider img,.slider embed,.slider object,.slider video,.slider iframe{max-width:100%;}
.slider a{color:#0069d6;text-decoration:none;}
.slider a:hover{color:#00438a;text-decoration:underline;}
.slider .nav-previous,.slider .nav-next{position:absolute;top:0px;width:100px;color:#cccccc;font-size:11px;}.slider .nav-previous .nav-container,.slider .nav-next .nav-container{height:100px;position:absolute;}
.slider .nav-previous .icon,.slider .nav-next .icon{margin-bottom:15px;}
.slider .nav-previous .date,.slider .nav-next .date{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:bold;line-height:20px;text-transform:uppercase;margin-bottom:5px;}
.slider .nav-previous .date,.slider .nav-next .date,.slider .nav-previous .title,.slider .nav-next .title{line-height:14px;}
.slider .nav-previous:hover,.slider .nav-next:hover{color:#333333;cursor:pointer;}
.slider .nav-previous{float:left;text-align:left;}.slider .nav-previous .icon{margin-left:10px;padding-left:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAAB1SURBVHjafNFXDsAgDAPQAKWDUd//tq2EnS6p+eNJECcYWLmzklFq2Ud1iAKlVNFG2c/zoCiJIJlkA6lOlFBFXU+vIM26lkHypxvzmCnjgg91J6TPRaDJktMVwvATFc+ur7Gb02MCrfA2py/6amGe2b/jEGAA5cYUouw7P64AAAAASUVORK5CYII=) no-repeat scroll 0% 50%;}
.slider .nav-previous .date,.slider .nav-previous .title{text-align:left;padding-left:10px;}
.slider .nav-previous:hover .icon{margin-left:5px;padding-left:20px;}
.slider .nav-next{float:right;text-align:right;}.slider .nav-next .icon{margin-right:10px;padding-right:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAABySURBVHjabNFLEoAgDAPQAiJ/ev/buqCJONjlm5GkVcKwEbWR5uaaq4E0V7NB0mg0b5J2mCdpMqpC+kasaNkjrE3Ac530RgSSDkaQ0kFbN6N9g0X5KPFTteAzLuSPtQVScJyGpx1PyNo8NH9HxB6PAAMAzkAUorcBvvAAAAAASUVORK5CYII=) no-repeat scroll 100% 50%;}
.slider .nav-next .date,.slider .nav-next .title{text-align:right;padding-right:10px;}
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
.slider .slider-item{width:700px;border:1px solid #CCC;padding:0px;margin:0px;overflow:hidden;display:table;margin-left:auto;margin-right:auto;}.slider .slider-item .content{}
.slider .slider-item .content .layout-text .text{width:100%;height:100%;}.slider .slider-item .content .layout-text .text .container{width:75%;margin-left:auto;margin-right:auto;}
.slider .slider-item .content .layout-media .text{width:100%;height:100%;}.slider .slider-item .content .layout-media .text .container{width:100%;margin-left:auto;margin-right:auto;}
.slider .slider-item .content .layout-media .media{width:100%;}.slider .slider-item .content .layout-media .media .container{width:auto;}
.slider .slider-item .content .layout-text-media{display:table;vertical-align:middle;}.slider .slider-item .content .layout-text-media .text{width:25%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .layout-text-media .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;}
.slider .slider-item .content .layout-text-media .media{width:100%;float:left;}.slider .slider-item .content .layout-text-media .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .layout-text-media .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .layout-text-media .media .media-wrapper .media-container img{border:1px solid #cccccc;max-height:350px;}
.slider .slider-item .content .layout-text-media .media .media-wrapper .media-container .credit,.slider .slider-item .content .layout-text-media .media .media-wrapper .media-container .caption{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
.slider .slider-item .content .layout-text-media .media .media-wrapper .media-container .credit{color:#999999;text-align:right;font-size:10px;line-height:5px;display:block;margin:0 auto;margin-top:2px;}
.slider .slider-item .content .layout-text-media .media .media-wrapper .media-container .caption{text-align:left;margin-top:10px;color:#666666;font-size:11px;line-height:14px;}
.slider .slider-item .content .layout-text-media .media.text-media .media-wrapper .media-container{border:none;background-color:#ffffff;}

1
source/css/structure.css

@ -1 +0,0 @@
#timeline{}

1
source/css/variables.css

@ -1 +0,0 @@

BIN
source/gfx/.DS_Store vendored

Binary file not shown.

BIN
source/gfx/Sprites/.DS_Store vendored

Binary file not shown.

BIN
source/gfx/timeline-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
source/gfx/timeline-dark.psd

Binary file not shown.

BIN
source/gfx/timeline.psd

Binary file not shown.

BIN
source/js/.DS_Store vendored

Binary file not shown.

463
source/js/AES.js

@ -0,0 +1,463 @@
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* AES implementation in JavaScript (c) Chris Veness 2005-2011 */
/* - see http://csrc.nist.gov/publications/PubsFIPS.html#197 */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var Aes = {}; // Aes namespace
/**
* AES Cipher function: encrypt 'input' state with Rijndael algorithm
* applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage
*
* @param {Number[]} input 16-byte (128-bit) input state array
* @param {Number[][]} w Key schedule as 2D byte-array (Nr+1 x Nb bytes)
* @returns {Number[]} Encrypted output state array
*/
Aes.cipher = function(input, w) { // main Cipher function [§5.1]
var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys
var state = [[],[],[],[]]; // initialise 4xNb byte-array 'state' with input [§3.4]
for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i];
state = Aes.addRoundKey(state, w, 0, Nb);
for (var round=1; round<Nr; round++) {
state = Aes.subBytes(state, Nb);
state = Aes.shiftRows(state, Nb);
state = Aes.mixColumns(state, Nb);
state = Aes.addRoundKey(state, w, round, Nb);
}
state = Aes.subBytes(state, Nb);
state = Aes.shiftRows(state, Nb);
state = Aes.addRoundKey(state, w, Nr, Nb);
var output = new Array(4*Nb); // convert state to 1-d array before returning [§3.4]
for (var i=0; i<4*Nb; i++) output[i] = state[i%4][Math.floor(i/4)];
return output;
}
/**
* Perform Key Expansion to generate a Key Schedule
*
* @param {Number[]} key Key as 16/24/32-byte array
* @returns {Number[][]} Expanded key schedule as 2D byte-array (Nr+1 x Nb bytes)
*/
Aes.keyExpansion = function(key) { // generate Key Schedule (byte-array Nr+1 x Nb) from Key [§5.2]
var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
var Nk = key.length/4 // key length (in words): 4/6/8 for 128/192/256-bit keys
var Nr = Nk + 6; // no of rounds: 10/12/14 for 128/192/256-bit keys
var w = new Array(Nb*(Nr+1));
var temp = new Array(4);
for (var i=0; i<Nk; i++) {
var r = [key[4*i], key[4*i+1], key[4*i+2], key[4*i+3]];
w[i] = r;
}
for (var i=Nk; i<(Nb*(Nr+1)); i++) {
w[i] = new Array(4);
for (var t=0; t<4; t++) temp[t] = w[i-1][t];
if (i % Nk == 0) {
temp = Aes.subWord(Aes.rotWord(temp));
for (var t=0; t<4; t++) temp[t] ^= Aes.rCon[i/Nk][t];
} else if (Nk > 6 && i%Nk == 4) {
temp = Aes.subWord(temp);
}
for (var t=0; t<4; t++) w[i][t] = w[i-Nk][t] ^ temp[t];
}
return w;
}
/*
* ---- remaining routines are private, not called externally ----
*/
Aes.subBytes = function(s, Nb) { // apply SBox to state S [§5.1.1]
for (var r=0; r<4; r++) {
for (var c=0; c<Nb; c++) s[r][c] = Aes.sBox[s[r][c]];
}
return s;
}
Aes.shiftRows = function(s, Nb) { // shift row r of state S left by r bytes [§5.1.2]
var t = new Array(4);
for (var r=1; r<4; r++) {
for (var c=0; c<4; c++) t[c] = s[r][(c+r)%Nb]; // shift into temp copy
for (var c=0; c<4; c++) s[r][c] = t[c]; // and copy back
} // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES):
return s; // see asmaes.sourceforge.net/rijndael/rijndaelImplementation.pdf
}
Aes.mixColumns = function(s, Nb) { // combine bytes of each col of state S [§5.1.3]
for (var c=0; c<4; c++) {
var a = new Array(4); // 'a' is a copy of the current column from 's'
var b = new Array(4); // 'b' is a•{02} in GF(2^8)
for (var i=0; i<4; i++) {
a[i] = s[i][c];
b[i] = s[i][c]&0x80 ? s[i][c]<<1 ^ 0x011b : s[i][c]<<1;
}
// a[n] ^ b[n] is a•{03} in GF(2^8)
s[0][c] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; // 2*a0 + 3*a1 + a2 + a3
s[1][c] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; // a0 * 2*a1 + 3*a2 + a3
s[2][c] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; // a0 + a1 + 2*a2 + 3*a3
s[3][c] = a[0] ^ b[0] ^ a[1] ^ a[2] ^ b[3]; // 3*a0 + a1 + a2 + 2*a3
}
return s;
}
Aes.addRoundKey = function(state, w, rnd, Nb) { // xor Round Key into state S [§5.1.4]
for (var r=0; r<4; r++) {
for (var c=0; c<Nb; c++) state[r][c] ^= w[rnd*4+c][r];
}
return state;
}
Aes.subWord = function(w) { // apply SBox to 4-byte word w
for (var i=0; i<4; i++) w[i] = Aes.sBox[w[i]];
return w;
}
Aes.rotWord = function(w) { // rotate 4-byte word w left by one byte
var tmp = w[0];
for (var i=0; i<3; i++) w[i] = w[i+1];
w[3] = tmp;
return w;
}
// sBox is pre-computed multiplicative inverse in GF(2^8) used in subBytes and keyExpansion [§5.1.1]
Aes.sBox = [0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,
0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,
0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,
0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,
0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,
0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,
0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,
0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,
0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,
0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,
0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,
0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,
0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,
0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,
0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16];
// rCon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [§5.2]
Aes.rCon = [ [0x00, 0x00, 0x00, 0x00],
[0x01, 0x00, 0x00, 0x00],
[0x02, 0x00, 0x00, 0x00],
[0x04, 0x00, 0x00, 0x00],
[0x08, 0x00, 0x00, 0x00],
[0x10, 0x00, 0x00, 0x00],
[0x20, 0x00, 0x00, 0x00],
[0x40, 0x00, 0x00, 0x00],
[0x80, 0x00, 0x00, 0x00],
[0x1b, 0x00, 0x00, 0x00],
[0x36, 0x00, 0x00, 0x00] ];
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* AES Counter-mode implementation in JavaScript (c) Chris Veness 2005-2011 */
/* - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Aes.Ctr = {}; // Aes.Ctr namespace: a subclass or extension of Aes
/**
* Encrypt a text using AES encryption in Counter mode of operation
*
* Unicode multi-byte character safe
*
* @param {String} plaintext Source text to be encrypted
* @param {String} password The password to use to generate a key
* @param {Number} nBits Number of bits to be used in the key (128, 192, or 256)
* @returns {string} Encrypted text
*/
Aes.Ctr.encrypt = function(plaintext, password, nBits) {
var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys
plaintext = Utf8.encode(plaintext);
password = Utf8.encode(password);
//var t = new Date(); // timer
// use AES itself to encrypt password to get cipher key (using plain password as source for key
// expansion) - gives us well encrypted key (though hashed key might be preferred for prod'n use)
var nBytes = nBits/8; // no bytes in key (16/24/32)
var pwBytes = new Array(nBytes);
for (var i=0; i<nBytes; i++) { // use 1st 16/24/32 chars of password for key
pwBytes[i] = isNaN(password.charCodeAt(i)) ? 0 : password.charCodeAt(i);
}
var key = Aes.cipher(pwBytes, Aes.keyExpansion(pwBytes)); // gives us 16-byte key
key = key.concat(key.slice(0, nBytes-16)); // expand key to 16/24/32 bytes long
// initialise 1st 8 bytes of counter block with nonce (NIST SP800-38A §B.2): [0-1] = millisec,
// [2-3] = random, [4-7] = seconds, together giving full sub-millisec uniqueness up to Feb 2106
var counterBlock = new Array(blockSize);
var nonce = (new Date()).getTime(); // timestamp: milliseconds since 1-Jan-1970
var nonceMs = nonce%1000;
var nonceSec = Math.floor(nonce/1000);
var nonceRnd = Math.floor(Math.random()*0xffff);
for (var i=0; i<2; i++) counterBlock[i] = (nonceMs >>> i*8) & 0xff;
for (var i=0; i<2; i++) counterBlock[i+2] = (nonceRnd >>> i*8) & 0xff;
for (var i=0; i<4; i++) counterBlock[i+4] = (nonceSec >>> i*8) & 0xff;
// and convert it to a string to go on the front of the ciphertext
var ctrTxt = '';
for (var i=0; i<8; i++) ctrTxt += String.fromCharCode(counterBlock[i]);
// generate key schedule - an expansion of the key into distinct Key Rounds for each round
var keySchedule = Aes.keyExpansion(key);
var blockCount = Math.ceil(plaintext.length/blockSize);
var ciphertxt = new Array(blockCount); // ciphertext as array of strings
for (var b=0; b<blockCount; b++) {
// set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
// done in two stages for 32-bit ops: using two words allows us to go past 2^32 blocks (68GB)
for (var c=0; c<4; c++) counterBlock[15-c] = (b >>> c*8) & 0xff;
for (var c=0; c<4; c++) counterBlock[15-c-4] = (b/0x100000000 >>> c*8)
var cipherCntr = Aes.cipher(counterBlock, keySchedule); // -- encrypt counter block --
// block size is reduced on final block
var blockLength = b<blockCount-1 ? blockSize : (plaintext.length-1)%blockSize+1;
var cipherChar = new Array(blockLength);
for (var i=0; i<blockLength; i++) { // -- xor plaintext with ciphered counter char-by-char --
cipherChar[i] = cipherCntr[i] ^ plaintext.charCodeAt(b*blockSize+i);
cipherChar[i] = String.fromCharCode(cipherChar[i]);
}
ciphertxt[b] = cipherChar.join('');
}
// Array.join is more efficient than repeated string concatenation in IE
var ciphertext = ctrTxt + ciphertxt.join('');
ciphertext = Base64.encode(ciphertext); // encode in base64
//alert((new Date()) - t);
return ciphertext;
}
/**
* Decrypt a text encrypted by AES in counter mode of operation
*
* @param {String} ciphertext Source text to be encrypted
* @param {String} password The password to use to generate a key
* @param {Number} nBits Number of bits to be used in the key (128, 192, or 256)
* @returns {String} Decrypted text
*/
Aes.Ctr.decrypt = function(ciphertext, password, nBits) {
var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys
ciphertext = Base64.decode(ciphertext);
password = Utf8.encode(password);
//var t = new Date(); // timer
// use AES to encrypt password (mirroring encrypt routine)
var nBytes = nBits/8; // no bytes in key
var pwBytes = new Array(nBytes);
for (var i=0; i<nBytes; i++) {
pwBytes[i] = isNaN(password.charCodeAt(i)) ? 0 : password.charCodeAt(i);
}
var key = Aes.cipher(pwBytes, Aes.keyExpansion(pwBytes));
key = key.concat(key.slice(0, nBytes-16)); // expand key to 16/24/32 bytes long
// recover nonce from 1st 8 bytes of ciphertext
var counterBlock = new Array(8);
ctrTxt = ciphertext.slice(0, 8);
for (var i=0; i<8; i++) counterBlock[i] = ctrTxt.charCodeAt(i);
// generate key schedule
var keySchedule = Aes.keyExpansion(key);
// separate ciphertext into blocks (skipping past initial 8 bytes)
var nBlocks = Math.ceil((ciphertext.length-8) / blockSize);
var ct = new Array(nBlocks);
for (var b=0; b<nBlocks; b++) ct[b] = ciphertext.slice(8+b*blockSize, 8+b*blockSize+blockSize);
ciphertext = ct; // ciphertext is now array of block-length strings
// plaintext will get generated block-by-block into array of block-length strings
var plaintxt = new Array(ciphertext.length);
for (var b=0; b<nBlocks; b++) {
// set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
for (var c=0; c<4; c++) counterBlock[15-c] = ((b) >>> c*8) & 0xff;
for (var c=0; c<4; c++) counterBlock[15-c-4] = (((b+1)/0x100000000-1) >>> c*8) & 0xff;
var cipherCntr = Aes.cipher(counterBlock, keySchedule); // encrypt counter block
var plaintxtByte = new Array(ciphertext[b].length);
for (var i=0; i<ciphertext[b].length; i++) {
// -- xor plaintxt with ciphered counter byte-by-byte --
plaintxtByte[i] = cipherCntr[i] ^ ciphertext[b].charCodeAt(i);
plaintxtByte[i] = String.fromCharCode(plaintxtByte[i]);
}
plaintxt[b] = plaintxtByte.join('');
}
// join array of blocks into single plaintext string
var plaintext = plaintxt.join('');
plaintext = Utf8.decode(plaintext); // decode from UTF8 back to Unicode multi-byte chars
//alert((new Date()) - t);
return plaintext;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* Base64 class: Base 64 encoding / decoding (c) Chris Veness 2002-2011 */
/* note: depends on Utf8 class */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var Base64 = {}; // Base64 namespace
Base64.code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
/**
* Encode string into Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]
* (instance method extending String object). As per RFC 4648, no newlines are added.
*
* @param {String} str The string to be encoded as base-64
* @param {Boolean} [utf8encode=false] Flag to indicate whether str is Unicode string to be encoded
* to UTF8 before conversion to base64; otherwise string is assumed to be 8-bit characters
* @returns {String} Base64-encoded string
*/
Base64.encode = function(str, utf8encode) { // http://tools.ietf.org/html/rfc4648
utf8encode = (typeof utf8encode == 'undefined') ? false : utf8encode;
var o1, o2, o3, bits, h1, h2, h3, h4, e=[], pad = '', c, plain, coded;
var b64 = Base64.code;
plain = utf8encode ? str.encodeUTF8() : str;
c = plain.length % 3; // pad string to length of multiple of 3
if (c > 0) { while (c++ < 3) { pad += '='; plain += '\0'; } }
// note: doing padding here saves us doing special-case packing for trailing 1 or 2 chars
for (c=0; c<plain.length; c+=3) { // pack three octets into four hexets
o1 = plain.charCodeAt(c);
o2 = plain.charCodeAt(c+1);
o3 = plain.charCodeAt(c+2);
bits = o1<<16 | o2<<8 | o3;
h1 = bits>>18 & 0x3f;
h2 = bits>>12 & 0x3f;
h3 = bits>>6 & 0x3f;
h4 = bits & 0x3f;
// use hextets to index into code string
e[c/3] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
}
coded = e.join(''); // join() is far faster than repeated string concatenation in IE
// replace 'A's from padded nulls with '='s
coded = coded.slice(0, coded.length-pad.length) + pad;
return coded;
}
/**
* Decode string from Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]
* (instance method extending String object). As per RFC 4648, newlines are not catered for.
*
* @param {String} str The string to be decoded from base-64
* @param {Boolean} [utf8decode=false] Flag to indicate whether str is Unicode string to be decoded
* from UTF8 after conversion from base64
* @returns {String} decoded string
*/
Base64.decode = function(str, utf8decode) {
utf8decode = (typeof utf8decode == 'undefined') ? false : utf8decode;
var o1, o2, o3, h1, h2, h3, h4, bits, d=[], plain, coded;
var b64 = Base64.code;
coded = utf8decode ? str.decodeUTF8() : str;
for (var c=0; c<coded.length; c+=4) { // unpack four hexets into three octets
h1 = b64.indexOf(coded.charAt(c));
h2 = b64.indexOf(coded.charAt(c+1));
h3 = b64.indexOf(coded.charAt(c+2));
h4 = b64.indexOf(coded.charAt(c+3));
bits = h1<<18 | h2<<12 | h3<<6 | h4;
o1 = bits>>>16 & 0xff;
o2 = bits>>>8 & 0xff;
o3 = bits & 0xff;
d[c/4] = String.fromCharCode(o1, o2, o3);
// check for padding
if (h4 == 0x40) d[c/4] = String.fromCharCode(o1, o2);
if (h3 == 0x40) d[c/4] = String.fromCharCode(o1);
}
plain = d.join(''); // join() is far faster than repeated string concatenation in IE
return utf8decode ? plain.decodeUTF8() : plain;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* Utf8 class: encode / decode between multi-byte Unicode characters and UTF-8 multiple */
/* single-byte character encoding (c) Chris Veness 2002-2011 */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var Utf8 = {}; // Utf8 namespace
/**
* Encode multi-byte Unicode string into utf-8 multiple single-byte characters
* (BMP / basic multilingual plane only)
*
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars
*
* @param {String} strUni Unicode string to be encoded as UTF-8
* @returns {String} encoded string
*/
Utf8.encode = function(strUni) {
// use regular expressions & String.replace callback function for better efficiency
// than procedural approaches
var strUtf = strUni.replace(
/[\u0080-\u07ff]/g, // U+0080 - U+07FF => 2 bytes 110yyyyy, 10zzzzzz
function(c) {
var cc = c.charCodeAt(0);
return String.fromCharCode(0xc0 | cc>>6, 0x80 | cc&0x3f); }
);
strUtf = strUtf.replace(
/[\u0800-\uffff]/g, // U+0800 - U+FFFF => 3 bytes 1110xxxx, 10yyyyyy, 10zzzzzz
function(c) {
var cc = c.charCodeAt(0);
return String.fromCharCode(0xe0 | cc>>12, 0x80 | cc>>6&0x3F, 0x80 | cc&0x3f); }
);
return strUtf;
}
/**
* Decode utf-8 encoded string back into multi-byte Unicode characters
*
* @param {String} strUtf UTF-8 string to be decoded back to Unicode
* @returns {String} decoded string
*/
Utf8.decode = function(strUtf) {
// note: decode 3-byte chars first as decoded 2-byte strings could appear to be 3-byte char!
var strUni = strUtf.replace(
/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, // 3-byte chars
function(c) { // (note parentheses for precence)
var cc = ((c.charCodeAt(0)&0x0f)<<12) | ((c.charCodeAt(1)&0x3f)<<6) | ( c.charCodeAt(2)&0x3f);
return String.fromCharCode(cc); }
);
strUni = strUni.replace(
/[\u00c0-\u00df][\u0080-\u00bf]/g, // 2-byte chars
function(c) { // (note parentheses for precence)
var cc = (c.charCodeAt(0)&0x1f)<<6 | c.charCodeAt(1)&0x3f;
return String.fromCharCode(cc); }
);
return strUni;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

137
source/js/VMM.Core.js

@ -2,132 +2,12 @@
================================================== */
/* Sequence
================================================== */
if(typeof VMM != 'undefined' && typeof VMM.Sequence == 'undefined') {
VMM.Sequence = Class.extend({
initialize: function(length,index) {
trace('sequence init');
// PUBLIC
this.increment = 1;
this.decrement = 1;
this.wrap = false;
// PRIVATE
this.length = (length == null) ? 0 : length;
this.index = (index == null) ? ((length == 0) ? -1 : 0) : (index >= length) ? length-1 : index;
this.synced = [];
},
setLength: function(i) {
this.length = i;
this.setIndex(this.index);
},
getLength: function() {
return this.length;
},
setIndex: function(i) {
if(this.length <= 0) {
this.index = -1;
return;
}
if(i < 0) i = (this.wrap) ? this.length - (i%this.length) : 0;
else if(i >= this.length) i = (this.wrap) ? (i%this.length) : this.length-1;
var pi = this.index;
this.index = i;
if(pi != this.index) {
// update sequences
for(var j=0; j<this.synced.length; j++) {
var s = this.synced[j];
if(s.getIndex() != this.index) s.setIndex(this.index);
}
}
},
getIndex: function() {
return this.index;
},
next: function() {
this.setIndex(this.index+this.increment);
},
prev: function () {
this.setIndex(this.index-this.decrement);
},
sync: function(s,bothWays) {
if(s instanceof NYTMM.Sequence && s != this) {
this.synced.push(s);
if(bothWays) s.sync(this);
return true;
}
return false;
},
unsync: function(s,bothWays) {
// update sequences
for(var i=0; i<this.synced.length; i++) {
if(this.synced[i] == s) {
this.synced.splice(i,1);
if(bothWays) s.unsync(this);
return true;
}
}
return false;
}
});
}
/* Slider
================================================== */
if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
VMM.Slider = function(parent, content_width, content_height, is_timeline) {
/* DEVICE
================================================== */
/*
trace("VMM.Browser.OS");
trace(VMM.Browser.browser);
trace(VMM.Browser.version);
trace(VMM.Browser.OS);
trace(VMM.Browser.device);
*/
/* PRIVATE VARS
================================================== */
@ -354,6 +234,20 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
}
}
function onKeypressNav(e) {
switch(e.keyCode) {
//right arrow
case 39:
onNextClick(e);
break;
//left arrow
case 37:
onPrevClick(e);
break;
}
}
function onTouchUpdate(e, b) {
if (slide_positions.length == 0) {
@ -409,7 +303,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
var _media;
bw = VMM.createElement("div", d[i].content, "content");
_slide = VMM.appendAndGetElement($slides_items, "<div>", "slider-item" , bw);
slides.push(_slide);
}
@ -588,6 +484,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
VMM.bindEvent(".nav-next", onNextClick);
VMM.bindEvent(".nav-previous", onPrevClick);
VMM.bindEvent(window, onKeypressNav, 'keydown');
}
/* BUILD

247
source/js/VMM.LoadLib.js

@ -0,0 +1,247 @@
/*
LoadLib
Based on LazyLoad by Ryan Grove
https://github.com/rgrove/lazyload/
Copyright (c) 2011 Ryan Grove <ryan@wonko.com>
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
================================================== */
window.loadedJS = [];
if(typeof VMM != 'undefined' && typeof VMM.LoadLib == 'undefined') {
//VMM.LoadLib.js('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', onJQueryLoaded);
//VMM.LoadLib.css('http://someurl.css', onCSSLoaded);
VMM.LoadLib = (function (doc) {
var env,
head,
pending = {},
pollCount = 0,
queue = {css: [], js: []},
styleSheets = doc.styleSheets;
var loaded_Array = [];
function isLoaded(url) {
var has_been_loaded = false;
for(var i=0; i<loaded_Array.length; i++) {
if (loaded_Array[i] == url) {
has_been_loaded = true;
}
}
if (!has_been_loaded) {
loaded_Array.push(url);
}
return has_been_loaded;
}
function createNode(name, attrs) {
var node = doc.createElement(name), attr;
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
node.setAttribute(attr, attrs[attr]);
}
}
return node;
}
function finish(type) {
var p = pending[type],
callback,
urls;
if (p) {
callback = p.callback;
urls = p.urls;
urls.shift();
pollCount = 0;
if (!urls.length) {
callback && callback.call(p.context, p.obj);
pending[type] = null;
queue[type].length && load(type);
}
}
}
function getEnv() {
var ua = navigator.userAgent;
env = {
async: doc.createElement('script').async === true
};
(env.webkit = /AppleWebKit\//.test(ua))
|| (env.ie = /MSIE/.test(ua))
|| (env.opera = /Opera/.test(ua))
|| (env.gecko = /Gecko\//.test(ua))
|| (env.unknown = true);
}
function load(type, urls, callback, obj, context) {
var _finish = function () { finish(type); },
isCSS = type === 'css',
nodes = [],
i, len, node, p, pendingUrls, url;
env || getEnv();
if (urls) {
urls = typeof urls === 'string' ? [urls] : urls.concat();
if (isCSS || env.async || env.gecko || env.opera) {
queue[type].push({
urls : urls,
callback: callback,
obj : obj,
context : context
});
} else {
for (i = 0, len = urls.length; i < len; ++i) {
queue[type].push({
urls : [urls[i]],
callback: i === len - 1 ? callback : null,
obj : obj,
context : context
});
}
}
}
if (pending[type] || !(p = pending[type] = queue[type].shift())) {
return;
}
head || (head = doc.head || doc.getElementsByTagName('head')[0]);
pendingUrls = p.urls;
for (i = 0, len = pendingUrls.length; i < len; ++i) {
url = pendingUrls[i];
if (isCSS) {
node = env.gecko ? createNode('style') : createNode('link', {
href: url,
rel : 'stylesheet'
});
} else {
node = createNode('script', {src: url});
node.async = false;
}
node.className = 'lazyload';
node.setAttribute('charset', 'utf-8');
if (env.ie && !isCSS) {
node.onreadystatechange = function () {
if (/loaded|complete/.test(node.readyState)) {
node.onreadystatechange = null;
_finish();
}
};
} else if (isCSS && (env.gecko || env.webkit)) {
if (env.webkit) {
p.urls[i] = node.href;
pollWebKit();
} else {
node.innerHTML = '@import "' + url + '";';
pollGecko(node);
}
} else {
node.onload = node.onerror = _finish;
}
nodes.push(node);
}
for (i = 0, len = nodes.length; i < len; ++i) {
head.appendChild(nodes[i]);
}
}
function pollGecko(node) {
var hasRules;
try {
hasRules = !!node.sheet.cssRules;
} catch (ex) {
pollCount += 1;
if (pollCount < 200) {
setTimeout(function () { pollGecko(node); }, 50);
} else {
hasRules && finish('css');
}
return;
}
finish('css');
}
function pollWebKit() {
var css = pending.css, i;
if (css) {
i = styleSheets.length;
while (--i >= 0) {
if (styleSheets[i].href === css.urls[0]) {
finish('css');
break;
}
}
pollCount += 1;
if (css) {
if (pollCount < 200) {
setTimeout(pollWebKit, 50);
} else {
finish('css');
}
}
}
}
return {
css: function (urls, callback, obj, context) {
if (isLoaded(urls)) {
return callback;
} else {
load('css', urls, callback, obj, context);
}
},
js: function (urls, callback, obj, context) {
if (isLoaded(urls)) {
return callback;
} else {
load('js', urls, callback, obj, context);
}
}
};
})(this.document);
}

98
source/js/VMM.Util.js

@ -123,6 +123,15 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
// VMM.Util.date.day[0];
// VMM.Util.date.get12HRTime(time, seconds_true);
date: {
month: VMM.master_config.i18n.date.month,
month_abbr: VMM.master_config.i18n.date.month_abbr,
day: VMM.master_config.i18n.date.day,
day_abbr: VMM.master_config.i18n.date.day_abbr,
// not localized, localize through dateFormat's functioanlity.
hour: [1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12],
hour_suffix: ["am"],
prettyDate: function(d, is_abbr, date_type) {
var _date = "";
if (type.of(d) == "date") {
@ -224,25 +233,49 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
// VMM.Util.linkify();
linkify: function(text,targets,is_touch) {
if(!text) return text;
// http://, https://, ftp://
var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
// www. sans http:// or https://
var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
// Email addresses
var emailAddressPattern = /(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;
text = text.replace(/((https?\:\/\/|ftp\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi, function(url) {
var nice = url;
var _touch = "";
if(url.search('^https?:\/\/') < 0) url = 'http://'+url;
_touch = "onclick = 'void(0)'";
if(is_touch) {
_touch = "onclick = 'void(0)'";
}
onclick = "void(0)";
if(targets === null || targets === "") return '<a href="'+ url + " " + _touch + '">'+ url +'</a>';
else return "<a href='"+ url + " " + _touch + " target='" +targets+"'>'" + url + "</a>" ;
});
return text
.replace(urlPattern, "<a target='_blank' href='$&' onclick='void(0)'>$&</a>")
.replace(pseudoUrlPattern, "$1<a target='_blank' onclick='void(0)' href='http://$2'>$2</a>")
.replace(emailAddressPattern, "<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>");
},
linkify_with_twitter: function(text,targets,is_touch) {
return text;
// http://, https://, ftp://
var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
var url_pattern = /(\()((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\))|(\[)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\])|(\{)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\})|(<|&(?:lt|#60|#x3c);)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(>|&(?:gt|#62|#x3e);)|((?:^|[^=\s'"\]])\s*['"]?|[^=\s]\s+)(\b(?:ht|f)tps?:\/\/[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]+(?:(?!&(?:gt|#0*62|#x0*3e);|&(?:amp|apos|quot|#0*3[49]|#x0*2[27]);[.!&',:?;]?(?:[^a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]|$))&[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]*)*[a-z0-9\-_~$()*+=\/#[\]@%])/img;
var url_replace = '$1$4$7$10$13<a href="$2$5$8$11$14">$2$5$8$11$14</a>$3$6$9$12';
//return text.replace(url_pattern, url_replace);
// www. sans http:// or https://
var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
// Email addresses
var emailAddressPattern = /(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;
var twitterHandlePattern = /(@([\w]+))/g;
var twitterSearchPattern = /(#([\w]+))/g;
return text
//.replace(urlPattern, "<a target='_blank' href='$&' onclick='void(0)'>$&</a>")
.replace(url_pattern, url_replace)
.replace(pseudoUrlPattern, "$1<a target='_blank' onclick='void(0)' href='http://$2'>$2</a>")
.replace(emailAddressPattern, "<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>")
.replace(twitterHandlePattern, "<a href='http://twitter.com/$2' target='_blank' onclick='void(0)'>$1</a>")
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>");
},
/* Turns plain text links into real links
================================================== */
// VMM.Util.unlinkify();
@ -292,7 +325,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
/* Get URL Variables
================================================== */
// var somestring = VMM.Util.getUrlVars(str_url)["varname"];
getUrlVars: function(str) {
getUrlVars: function(string) {
var str = string.toString();
var vars = [], hash;
var hashes = str.slice(str.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++) {
@ -300,10 +336,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
trace(vars);
return vars;
},
/* Cleans up strings to become real HTML
================================================== */
toHTML: function(text) {
@ -432,6 +468,30 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
}).init();
//'string'.linkify();
if(!String.linkify) {
String.prototype.linkify = function() {
// http://, https://, ftp://
var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
// www. sans http:// or https://
var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
// Email addresses
var emailAddressPattern = /(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;
var twitterHandlePattern = /(@([\w]+))/g;
var twitterSearchPattern = /(#([\w]+))/g;
return this
.replace(urlPattern, '<a target="_blank" href="$&">$&</a>')
.replace(pseudoUrlPattern, '$1<a target="_blank" href="http://$2">$2</a>')
.replace(emailAddressPattern, '<a target="_blank" href="mailto:$1">$1</a>')
.replace(twitterHandlePattern, "<a href='http://twitter.com/$2' target='_blank'>$1</a>")
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank'>$1</a>");
};
}
}

754
source/js/VMM.js

File diff suppressed because it is too large Load Diff

125
source/js/date-format.js

@ -0,0 +1,125 @@
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
* The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default.
*/
var dateFormat = function () {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
timezoneClip = /[^-+\dA-Z]/g,
pad = function (val, len) {
val = String(val);
len = len || 2;
while (val.length < len) val = "0" + val;
return val;
};
// Regexes and supporting functions are cached through closure
return function (date, mask, utc) {
var dF = dateFormat;
// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
mask = date;
date = undefined;
}
// Passing date through Date applies Date.parse, if necessary
date = date ? new Date(date) : new Date;
if (isNaN(date)) throw SyntaxError("invalid date");
mask = String(dF.masks[mask] || mask || dF.masks["default"]);
// Allow setting the utc argument via the mask
if (mask.slice(0, 4) == "UTC:") {
mask = mask.slice(4);
utc = true;
}
var _ = utc ? "getUTC" : "get",
d = date[_ + "Date"](),
D = date[_ + "Day"](),
m = date[_ + "Month"](),
y = date[_ + "FullYear"](),
H = date[_ + "Hours"](),
M = date[_ + "Minutes"](),
s = date[_ + "Seconds"](),
L = date[_ + "Milliseconds"](),
o = utc ? 0 : date.getTimezoneOffset(),
flags = {
d: d,
dd: pad(d),
ddd: dF.i18n.dayNames[D],
dddd: dF.i18n.dayNames[D + 7],
m: m + 1,
mm: pad(m + 1),
mmm: dF.i18n.monthNames[m],
mmmm: dF.i18n.monthNames[m + 12],
yy: String(y).slice(2),
yyyy: y,
h: H % 12 || 12,
hh: pad(H % 12 || 12),
H: H,
HH: pad(H),
M: M,
MM: pad(M),
s: s,
ss: pad(s),
l: pad(L, 3),
L: pad(L > 99 ? Math.round(L / 10) : L),
t: H < 12 ? "a" : "p",
tt: H < 12 ? "am" : "pm",
T: H < 12 ? "A" : "P",
TT: H < 12 ? "AM" : "PM",
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
};
return mask.replace(token, function ($0) {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
};
}();
// Some common format strings
dateFormat.masks = {
"default": "ddd mmm dd yyyy HH:MM:ss",
shortDate: "m/d/yy",
mediumDate: "mmm d, yyyy",
longDate: "mmmm d, yyyy",
fullDate: "dddd, mmmm d, yyyy",
shortTime: "h:MM TT",
mediumTime: "h:MM:ss TT",
longTime: "h:MM:ss TT Z",
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
// Internationalization strings
dateFormat.i18n = {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
]
};
// For convenience...
Date.prototype.format = function (mask, utc) {
return dateFormat(this, mask, utc);
};

391
source/js/lazyload.js

@ -0,0 +1,391 @@
/*jslint browser: true, eqeqeq: true, bitwise: true, newcap: true, immed: true, regexp: false */
/**
LazyLoad makes it easy and painless to lazily load one or more external
JavaScript or CSS files on demand either during or after the rendering of a web
page.
Supported browsers include Firefox 2+, IE6+, Safari 3+ (including Mobile
Safari), Google Chrome, and Opera 9+. Other browsers may or may not work and
are not officially supported.
Visit https://github.com/rgrove/lazyload/ for more info.
Copyright (c) 2011 Ryan Grove <ryan@wonko.com>
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@module lazyload
@class LazyLoad
@static
@version 2.0.3 (git)
*/
LazyLoad = (function (doc) {
// -- Private Variables ------------------------------------------------------
// User agent and feature test information.
var env,
// Reference to the <head> element (populated lazily).
head,
// Requests currently in progress, if any.
pending = {},
// Number of times we've polled to check whether a pending stylesheet has
// finished loading. If this gets too high, we're probably stalled.
pollCount = 0,
// Queued requests.
queue = {css: [], js: []},
// Reference to the browser's list of stylesheets.
styleSheets = doc.styleSheets;
// -- Private Methods --------------------------------------------------------
/**
Creates and returns an HTML element with the specified name and attributes.
@method createNode
@param {String} name element name
@param {Object} attrs name/value mapping of element attributes
@return {HTMLElement}
@private
*/
function createNode(name, attrs) {
var node = doc.createElement(name), attr;
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
node.setAttribute(attr, attrs[attr]);
}
}
return node;
}
/**
Called when the current pending resource of the specified type has finished
loading. Executes the associated callback (if any) and loads the next
resource in the queue.
@method finish
@param {String} type resource type ('css' or 'js')
@private
*/
function finish(type) {
var p = pending[type],
callback,
urls;
if (p) {
callback = p.callback;
urls = p.urls;
urls.shift();
pollCount = 0;
// If this is the last of the pending URLs, execute the callback and
// start the next request in the queue (if any).
if (!urls.length) {
callback && callback.call(p.context, p.obj);
pending[type] = null;
queue[type].length && load(type);
}
}
}
/**
Populates the <code>env</code> variable with user agent and feature test
information.
@method getEnv
@private
*/
function getEnv() {
var ua = navigator.userAgent;
env = {
// True if this browser supports disabling async mode on dynamically
// created script nodes. See
// http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
async: doc.createElement('script').async === true
};
(env.webkit = /AppleWebKit\//.test(ua))
|| (env.ie = /MSIE/.test(ua))
|| (env.opera = /Opera/.test(ua))
|| (env.gecko = /Gecko\//.test(ua))
|| (env.unknown = true);
}
/**
Loads the specified resources, or the next resource of the specified type
in the queue if no resources are specified. If a resource of the specified
type is already being loaded, the new request will be queued until the
first request has been finished.
When an array of resource URLs is specified, those URLs will be loaded in
parallel if it is possible to do so while preserving execution order. All
browsers support parallel loading of CSS, but only Firefox and Opera
support parallel loading of scripts. In other browsers, scripts will be
queued and loaded one at a time to ensure correct execution order.
@method load
@param {String} type resource type ('css' or 'js')
@param {String|Array} urls (optional) URL or array of URLs to load
@param {Function} callback (optional) callback function to execute when the
resource is loaded
@param {Object} obj (optional) object to pass to the callback function
@param {Object} context (optional) if provided, the callback function will
be executed in this object's context
@private
*/
function load(type, urls, callback, obj, context) {
var _finish = function () { finish(type); },
isCSS = type === 'css',
nodes = [],
i, len, node, p, pendingUrls, url;
env || getEnv();
if (urls) {
// If urls is a string, wrap it in an array. Otherwise assume it's an
// array and create a copy of it so modifications won't be made to the
// original.
urls = typeof urls === 'string' ? [urls] : urls.concat();
// Create a request object for each URL. If multiple URLs are specified,
// the callback will only be executed after all URLs have been loaded.
//
// Sadly, Firefox and Opera are the only browsers capable of loading
// scripts in parallel while preserving execution order. In all other
// browsers, scripts must be loaded sequentially.
//
// All browsers respect CSS specificity based on the order of the link
// elements in the DOM, regardless of the order in which the stylesheets
// are actually downloaded.
if (isCSS || env.async || env.gecko || env.opera) {
// Load in parallel.
queue[type].push({
urls : urls,
callback: callback,
obj : obj,
context : context
});
} else {
// Load sequentially.
for (i = 0, len = urls.length; i < len; ++i) {
queue[type].push({
urls : [urls[i]],
callback: i === len - 1 ? callback : null, // callback is only added to the last URL
obj : obj,
context : context
});
}
}
}
// If a previous load request of this type is currently in progress, we'll
// wait our turn. Otherwise, grab the next item in the queue.
if (pending[type] || !(p = pending[type] = queue[type].shift())) {
return;
}
head || (head = doc.head || doc.getElementsByTagName('head')[0]);
pendingUrls = p.urls;
for (i = 0, len = pendingUrls.length; i < len; ++i) {
url = pendingUrls[i];
if (isCSS) {
node = env.gecko ? createNode('style') : createNode('link', {
href: url,
rel : 'stylesheet'
});
} else {
node = createNode('script', {src: url});
node.async = false;
}
node.className = 'lazyload';
node.setAttribute('charset', 'utf-8');
if (env.ie && !isCSS) {
node.onreadystatechange = function () {
if (/loaded|complete/.test(node.readyState)) {
node.onreadystatechange = null;
_finish();
}
};
} else if (isCSS && (env.gecko || env.webkit)) {
// Gecko and WebKit don't support the onload event on link nodes.
if (env.webkit) {
// In WebKit, we can poll for changes to document.styleSheets to
// figure out when stylesheets have loaded.
p.urls[i] = node.href; // resolve relative URLs (or polling won't work)
pollWebKit();
} else {
// In Gecko, we can import the requested URL into a <style> node and
// poll for the existence of node.sheet.cssRules. Props to Zach
// Leatherman for calling my attention to this technique.
node.innerHTML = '@import "' + url + '";';
pollGecko(node);
}
} else {
node.onload = node.onerror = _finish;
}
nodes.push(node);
}
for (i = 0, len = nodes.length; i < len; ++i) {
head.appendChild(nodes[i]);
}
}
/**
Begins polling to determine when the specified stylesheet has finished loading
in Gecko. Polling stops when all pending stylesheets have loaded or after 10
seconds (to prevent stalls).
Thanks to Zach Leatherman for calling my attention to the @import-based
cross-domain technique used here, and to Oleg Slobodskoi for an earlier
same-domain implementation. See Zach's blog for more details:
http://www.zachleat.com/web/2010/07/29/load-css-dynamically/
@method pollGecko
@param {HTMLElement} node Style node to poll.
@private
*/
function pollGecko(node) {
var hasRules;
try {
// We don't really need to store this value or ever refer to it again, but
// if we don't store it, Closure Compiler assumes the code is useless and
// removes it.
hasRules = !!node.sheet.cssRules;
} catch (ex) {
// An exception means the stylesheet is still loading.
pollCount += 1;
if (pollCount < 200) {
setTimeout(function () { pollGecko(node); }, 50);
} else {
// We've been polling for 10 seconds and nothing's happened. Stop
// polling and finish the pending requests to avoid blocking further
// requests.
hasRules && finish('css');
}
return;
}
// If we get here, the stylesheet has loaded.
finish('css');
}
/**
Begins polling to determine when pending stylesheets have finished loading
in WebKit. Polling stops when all pending stylesheets have loaded or after 10
seconds (to prevent stalls).
@method pollWebKit
@private
*/
function pollWebKit() {
var css = pending.css, i;
if (css) {
i = styleSheets.length;
// Look for a stylesheet matching the pending URL.
while (--i >= 0) {
if (styleSheets[i].href === css.urls[0]) {
finish('css');
break;
}
}
pollCount += 1;
if (css) {
if (pollCount < 200) {
setTimeout(pollWebKit, 50);
} else {
// We've been polling for 10 seconds and nothing's happened, which may
// indicate that the stylesheet has been removed from the document
// before it had a chance to load. Stop polling and finish the pending
// request to prevent blocking further requests.
finish('css');
}
}
}
}
return {
/**
Requests the specified CSS URL or URLs and executes the specified
callback (if any) when they have finished loading. If an array of URLs is
specified, the stylesheets will be loaded in parallel and the callback
will be executed after all stylesheets have finished loading.
@method css
@param {String|Array} urls CSS URL or array of CSS URLs to load
@param {Function} callback (optional) callback function to execute when
the specified stylesheets are loaded
@param {Object} obj (optional) object to pass to the callback function
@param {Object} context (optional) if provided, the callback function
will be executed in this object's context
@static
*/
css: function (urls, callback, obj, context) {
load('css', urls, callback, obj, context);
},
/**
Requests the specified JavaScript URL or URLs and executes the specified
callback (if any) when they have finished loading. If an array of URLs is
specified and the browser supports it, the scripts will be loaded in
parallel and the callback will be executed after all scripts have
finished loading.
Currently, only Firefox and Opera support parallel loading of scripts while
preserving execution order. In other browsers, scripts will be
queued and loaded one at a time to ensure correct execution order.
@method js
@param {String|Array} urls JS URL or array of JS URLs to load
@param {Function} callback (optional) callback function to execute when
the specified scripts are loaded
@param {Object} obj (optional) object to pass to the callback function
@param {Object} context (optional) if provided, the callback function
will be executed in this object's context
@static
*/
js: function (urls, callback, obj, context) {
load('js', urls, callback, obj, context);
}
};
})(this.document);

195
source/js/timeline-embed.js

@ -0,0 +1,195 @@
/*!
Verite Timeline Loader 0.1
Designed and built by Zach Wise digitalartwork.net
Date: March 30, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
http://www.gnu.org/licenses/
*/
/* CodeKit Import
http://incident57.com/codekit/
================================================== */
// @codekit-prepend "lazyload.js";
/* TIMELINE CDN LOADER
================================================== */
/* Embed code with config
================================================== */
/*
<!-- Begin Embed Code -->
<div id="timeline-embed"></div>
<script type="text/javascript">
var timeline_config = {
width: 900,
height: 700,
source: 'https://docs.google.com/a/digitalartwork.net/spreadsheet/ccc?hl=en_US&key=0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE&rm=full#gid=0',
css: '../timeline.css',
js: '../timeline.js'
}
</script>
<script type="text/javascript" src="../timeline-embed.js"></script>
<!-- End Embed Code -->
*/
(function() {
/* CONFIG Default
================================================== */
var embed_config = {
width: 800,
height: 600,
source: 'taylor/data.json',
css: 'http://veritetimeline.appspot.com/latest/timeline.css',
js: 'http://veritetimeline.appspot.com/latest/timeline-min.js'
}
if (typeof timeline_config == 'object') {
var x;
for (x in timeline_config) {
if (Object.prototype.hasOwnProperty.call(timeline_config, x)) {
embed_config[x] = timeline_config[x];
}
}
} else if (typeof config == 'object') {
var x;
for (x in config) {
if (Object.prototype.hasOwnProperty.call(config, x)) {
embed_config[x] = config[x];
}
}
}
timeline_config = embed_config;
/* VARS
================================================== */
var jsReady = false;
var cssReady = false;
var isReady = false;
var preload_checks = 0;
var timeout;
var timeline;
/* Add Timeline Div
================================================== */
var t = document.createElement('div');
var te = document.getElementById("timeline-embed");
te.appendChild(t);
t.setAttribute("id", 'timeline');
if (embed_config.width.toString().match("%") || embed_config.width.toString().match("px")) {
te.style.width = embed_config.width;
} else {
te.style.width = embed_config.width + 'px';
}
if (embed_config.height.toString().match("%") || embed_config.height.toString().match("px")) {
te.style.height = embed_config.height;
} else {
te.style.height = embed_config.height + 'px';
}
t.style.position = 'relative';
/* Load CSS
================================================== */
LazyLoad.css(embed_config.css, cssComplete);
/* Check for jQuery
================================================== */
try {
var jqueryLoaded=jQuery;
jqueryLoaded=true;
} catch(err) {
var jqueryLoaded=false;
}
/* Load jQuery if it doesn't exist
================================================== */
if (!jqueryLoaded) {
LazyLoad.js('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', onJQueryLoaded);
} else {
onJQueryLoaded();
}
function onJQueryLoaded() {
LazyLoad.js(embed_config.js, onJSLoaded);
}
function onJSLoaded() {
jsReady = true;
checkLoad();
}
function cssComplete() {
cssReady = true;
checkLoad();
}
/* Check to see if everything is loaded.
================================================== */
function checkLoad() {
if (preload_checks > 40) {
return;
alert("Error Loading Files");
} else {
preload_checks++;
if (jsReady && cssReady) {
if (!isReady) {
isReady = true;
if ( embed_config.i18n ) {
VMM.master_config.i18n = embed_config.i18n;
console.log( VMM.master_config );
}
timeline = new VMM.Timeline();
timeline.init(embed_config.source);
}
} else {
//alert("run timeout");
timeout = setTimeout('checkAgain();', 250);
}
}
}
this.checkAgain = function() {
checkLoad();
}
})();
/*
Thinking of ditching Lazy loader after some more testing.
*/
/*
var stylesheet = document.createElement('link');
stylesheet.href = '/inc/body/jquery/css/start/jquery-ui-1.8.10.custom.css';
stylesheet.rel = 'stylesheet';
stylesheet.type = 'text/css';
document.getElementsByTagName('head')[0].appendChild(stylesheet);
var tjs = document.createElement('script');
tjs.type = 'text/javascript';
tjs.async = true;
tjs.url = '/inc/body/jquery/css/start/jquery-ui-1.8.10.custom.css';
document.getElementsByTagName('head')[0].appendChild(tjs);
*/

186
source/js/timeline.js

@ -1,8 +1,7 @@
/*!
Verite Timeline 0.82
Copyright 2011 Verite.co
Open Timeline 0.89
Designed and built by Zach Wise digitalartwork.net
Date: February 7, 2012
Date: April 8, 2012
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,13 +19,13 @@
/*!
TODO
- Better Flags
- Google Spreadsheets support
-
-
FUTURE PLANS
- Better iPhone usability
- Support feeds from popular sources
- Storify integration
- Code optimization
- Clean up config flow
- Possible tagging of events (depends on usability factors)
*/
@ -35,17 +34,24 @@
http://incident57.com/codekit/
================================================== */
// @codekit-prepend "date-format.js";
// @codekit-prepend "VMM.js";
// @codekit-prepend "VMM.Core.js";
// @codekit-prepend "VMM.Util.js";
// @codekit-prepend "VMM.LoadLib.js";
// @codekit-prepend "bootstrap-tooltip.js";
// @codekit-prepend "AES.js";
/* Timeline Class contained in VMM (verite) namespace
/* Open Timeline Class contained in VMM (verite) namespace
================================================== */
if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
VMM.Timeline = function(w, h) {
VMM.Timeline = function(w, h, conf) {
var version = "0.89";
trace("OPEN TIMELINE VERSION " + version);
var $timeline = VMM.getElement("#timeline"); // expecting name only for parent
var $feedback;
@ -80,7 +86,16 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
/* CONFIG
================================================== */
var config = {};
var config = VMM.Timeline.Config;
VMM.master_config.Timeline = VMM.Timeline.Config;
/* MAP TYPE
options include
Stamen Maps "toner", "watercolor", "sterrain", "toner-lines", "toner-labels"
Apple "apple"
Google "HYBRID", "ROADMAP", "SATELLITE", "TERRAIN"
================================================== */
config.maptype = "toner";
config.interval = 10;
config.something = 0;
config.width = 960;
@ -104,23 +119,44 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
config.height = VMM.Element.height($timeline);
}
config.nav_width = config.width;
config.nav_height = 200;
config.feature_width = config.width;
if (VMM.Browser.device == "mobile") {
config.nav_width = config.width;
config.nav_height = 200;
config.feature_width = config.width;
config.feature_height = config.height;
} else {
config.nav_width = config.width;
config.nav_height = 200;
config.feature_width = config.width;
config.feature_height = config.height - config.nav_height;
}
/* APPLY SUPPLIED CONFIG TO TIMELINE CONFIG
================================================== */
/* VER
if (typeof timeline_config == 'object') {
trace("HAS TIMELINE CONFIG");
var x;
for (x in timeline_config) {
if (Object.prototype.hasOwnProperty.call(timeline_config, x)) {
config[x] = timeline_config[x];
}
}
} else if (typeof conf == 'object') {
var x;
for (x in conf) {
if (Object.prototype.hasOwnProperty.call(conf, x)) {
config[x] = conf[x];
}
}
}
/* CHECK FOR IE7
================================================== */
this.ver = "0.5";
var ie7 = false;
if (VMM.Browser.browser == "MSIE") {
if ( parseInt(VMM.Browser.version, 10) == 7) {
ie7 = true;
}
}
/* ON EVENT
@ -187,18 +223,21 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
/* GET DATA
================================================== */
if (type.of(d) == "string") {
VMM.Timeline.DataObj.getData(d);
if (ie7) {
$feedback = VMM.appendAndGetElement($timeline, "<div>", "feedback", "");
$messege = VMM.appendAndGetElement($feedback, "<div>", "messege", VMM.master_config.i18n.messages.unsupported_ie7);
} else {
VMM.Timeline.DataObj.getData(html_string);
//VMM.attachElement(element, content);
}
//VMM.attachElement($timeline, "");
if (type.of(d) == "string") {
VMM.Timeline.DataObj.getData(d);
} else {
VMM.Timeline.DataObj.getData(html_string);
//VMM.attachElement(element, content);
}
$feedback = VMM.appendAndGetElement($timeline, "<div>", "feedback", "");
$messege = VMM.appendAndGetElement($feedback, "<div>", "messege", VMM.master_config.i18n.messages.loading_timeline);
//VMM.attachElement($timeline, "");
$feedback = VMM.appendAndGetElement($timeline, "<div>", "feedback", "");
$messege = VMM.appendAndGetElement($feedback, "<div>", "messege", VMM.master_config.i18n.messages.loading_timeline);
}
};
this.iframeLoaded = function() {
@ -293,14 +332,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
if (d.type == "tweets") {
} else if (dd.type == "start") {
c._text += VMM.createElement("h2", d.headline, "start");
c._text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(d.headline, "_blank"), "start");
} else {
c._text += VMM.createElement("h3", d.headline);
c._text += VMM.createElement("h3", VMM.Util.linkify_with_twitter(d.headline, "_blank"));
}
}
if (d.text != null && d.text != "") {
_hastext = true;
c._text += VMM.createElement("p", d.text);
c._text += VMM.createElement("p", VMM.Util.linkify_with_twitter(d.text, "_blank"));
}
c._text = VMM.createElement("div", c._text, "container");
@ -335,6 +374,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
//c._media = VMM.createElement("div", c._media, "media-wrapper");
slide = VMM.createElement("div", c._text + c._media, _layout_class);
//trace(slide);
}
@ -613,32 +655,24 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
week: {}
};
var config = {
interval: 10,
something: 0,
width: 900,
height: 150,
ease: "easeInOutExpo",
duration: 1000,
nav_width: 100,
nav_height: 200,
timeline: false,
spacing: 15,
marker_width: 150,
marker_height: 48,
density: 2,
timeline_width: 900,
interval_width: 200,
rows: [1, 1, 1],
multiplier: 6,
max_multiplier:16,
min_multiplier:1,
has_start_page:false,
};
/* ADD to Config
================================================== */
var config = VMM.Timeline.Config;
config.something = 0;
config.nav_width = 100;
config.nav_height = 200;
config.timeline = false;
config.marker_width = 150;
config.marker_height = 48;
config.density = 2;
config.timeline_width = 900;
config.interval_width = 200;
config.rows = [1, 1, 1];
config.multiplier = 6;
config.max_multiplier = 16;
config.min_multiplier = 1;
config.has_start_page = false;
//config.rows = [1, config.marker_height, config.marker_height*2];
config.rows = [config.marker_height, config.marker_height*2, 1];
if (content_width != null && content_width != "") {
@ -1396,8 +1430,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
interval_major.date.setMonth(data[0].startdate.getMonth());
}
interval_major.date.setMonth(interval_major.date.getMonth() + inc_time_major);
_idd = VMM.Util.date.month[interval_major.date.getMonth()] + " " + interval_major.date.getFullYear();
//_idd = VMM.Util.date.prettyDate(interval_major.date, true, interval_major.type);
//_idd = VMM.Util.date.month[interval_major.date.getMonth()] + " " + interval_major.date.getFullYear();
_idd = VMM.Util.date.prettyDate(interval_major.date, false, interval_major.type);
} else if (interval_major.type == "week") {
if (_first_run) {
interval_major.date.setMonth( data[0].startdate.getMonth() );
@ -1716,7 +1750,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
};
VMM.Timeline.Config = {
};
/* SOURCE DATA PROCESSOR
================================================== */
VMM.Timeline.DataObj = {
@ -1956,28 +1992,34 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
type: "google spreadsheet",
getData: function(raw_data) {
//https://spreadsheets.google.com/feeds/list/0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE/od6/public/values?alt=json
// https://docs.google.com/a/digitalartwork.net/spreadsheet/ccc?hl=en_US&key=0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE&rm=full#gid=0
var _key = VMM.Util.getUrlVars(raw_data)["key"];
var _url = "//spreadsheets.google.com/feeds/list/" + _key + "/od6/public/values?alt=json";
if ( $.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) {
var _url = "https://spreadsheets.google.com/feeds/list/" + _key + "/od6/public/values?alt=json";
VMM.getJSON(_url, VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
/*
if ( VMM.Browser.browser == "Explorer" && parseInt(VMM.Browser.version, 10) >= 8 && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRequest();
xdr.open("get", _url);
xdr.onload = function() {
var json = $.parseJSON( xdr.responseText );
VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData( json );
// going to move this to VMM.getJSON
trace("it's ie");
var ie_xdr = new XDomainRequest();
var _url = "//spreadsheets.google.com/feeds/list/" + _key + "/od6/public/values?alt=json";
ie_xdr.open("get", _url);
ie_xdr.onload = function() {
var ie_j = {};
var ie_json = VMM.parseJSON(ie_xdr.responseText);
VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData(ie_json);
}
xdr.send();
ie_xdr.send();
} else {
VMM.getJSON( "https:" + _url, VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
trace("not ie");
VMM.getJSON(_url, VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
}
*/
},
buildData: function(d) {
var _data_obj = VMM.Timeline.DataObj.data_template_obj;
for(var i = 0; i < d.feed.entry.length; i++) {

105
source/less/gfx-dark.less

@ -0,0 +1,105 @@
/* Icons.less
* Base64 Icons
* ----------------------------------------------------------------- */
// Next and Back Icons
.icon-previous() {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAAB1SURBVHjafNFXDsAgDAPQAKWDUd//tq2EnS6p+eNJECcYWLmzklFq2Ud1iAKlVNFG2c/zoCiJIJlkA6lOlFBFXU+vIM26lkHypxvzmCnjgg91J6TPRaDJktMVwvATFc+ur7Gb02MCrfA2py/6amGe2b/jEGAA5cYUouw7P64AAAAASUVORK5CYII=) no-repeat scroll 0% 50%;
}
.icon-next() {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAABySURBVHjabNFLEoAgDAPQAiJ/ev/buqCJONjlm5GkVcKwEbWR5uaaq4E0V7NB0mg0b5J2mCdpMqpC+kasaNkjrE3Ac530RgSSDkaQ0kFbN6N9g0X5KPFTteAzLuSPtQVScJyGpx1PyNo8NH9HxB6PAAMAzkAUorcBvvAAAAAASUVORK5CYII=) no-repeat scroll 100% 50%;
}
.icon-twitter() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -889px; width: 24px; height: 24px;
}
.icon-vimeo() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -963px; width: 24px; height: 24px;
}
.icon-youtube() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -1111px; width: 24px; height: 24px;
}
.icon-website() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -1037px; width: 24px; height: 24px;
}
.icon-soundcloud() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -659px; width: 24px; height: 24px;
}
.icon-map() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -514px; width: 26px; height: 21px;
}
.icon-map-pin() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -438px; width: 16px; height: 26px;
}
.icon-zoom-in() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
//background-position: 0 -1433px; width: 24px; height: 24px;
background-position: 0 -1507px; width: 16px; height: 16px;
}
.icon-zoom-out() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
//background-position: 0 -1573px; width: 24px; height: 24px;
background-position: 0 -1647px; width: 16px; height: 16px;
}
.icon-back-home() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -1303px; width: 16px; height: 12px;
//background-position: 0 -1365px; width: 24px; height: 18px;
}
.icon-microphone() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -585px; width: 12px; height: 24px;
}
.time-flag() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 0; width: 153px; height: 60px;
}
.time-flag-active() {
background-image: url(timeline-dark.png);
background-repeat:no-repeat;
background-position: 0 -110px; width: 153px; height: 60px;
}
.background-time-tic() {
background: @color-background url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAMAAAA8JaR5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBrwkQIABAAHIABkHeR3aAAAAAElFTkSuQmCC);
}
.background-time-interval() {
//background: @color-base url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);
//background-repeat: no-repeat;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);
}

36
source/less/gfx.less

@ -4,18 +4,10 @@
// Next and Back Icons
.icon-previous() {
//background-image: url(timeline.png);
//background-repeat:no-repeat;
//background-position: 0 -292px; width: 18px; height: 22px;
//background: url(gfx/chevron-prev.png) no-repeat scroll 0% 50%;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAAB1SURBVHjafNFXDsAgDAPQAKWDUd//tq2EnS6p+eNJECcYWLmzklFq2Ud1iAKlVNFG2c/zoCiJIJlkA6lOlFBFXU+vIM26lkHypxvzmCnjgg91J6TPRaDJktMVwvATFc+ur7Gb02MCrfA2py/6amGe2b/jEGAA5cYUouw7P64AAAAASUVORK5CYII=) no-repeat scroll 0% 50%;
}
.icon-next() {
//background-image: url(timeline.png);
//background-repeat:no-repeat;
//background-position: 0 -220px; width: 18px; height: 22px;
//background: url(gfx/chevron-next.png) no-repeat scroll 100% 50%;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAABySURBVHjabNFLEoAgDAPQAiJ/ev/buqCJONjlm5GkVcKwEbWR5uaaq4E0V7NB0mg0b5J2mCdpMqpC+kasaNkjrE3Ac530RgSSDkaQ0kFbN6N9g0X5KPFTteAzLuSPtQVScJyGpx1PyNo8NH9HxB6PAAMAzkAUorcBvvAAAAAASUVORK5CYII=) no-repeat scroll 100% 50%;
}
@ -111,31 +103,3 @@
}
/* Sprite Reference
================================================== */
/*
.sprite-TimeFlagSmall{ background-position: 0 0; width: 153px; height: 60px; }
.sprite-TimeFlagSmallActive{ background-position: 0 -110px; width: 153px; height: 60px; }
.sprite-chevron-next{ background-position: 0 -220px; width: 18px; height: 22px; }
.sprite-chevron-prev{ background-position: 0 -292px; width: 18px; height: 22px; }
.sprite-icon-facebook{ background-position: 0 -364px; width: 24px; height: 24px; }
.sprite-icon-map-pin{ background-position: 0 -438px; width: 16px; height: 26px; }
.sprite-icon-map{ background-position: 0 -514px; width: 26px; height: 21px; }
.sprite-icon-microphone{ background-position: 0 -585px; width: 12px; height: 24px; }
.sprite-icon-music{ background-position: 0 -659px; width: 24px; height: 24px; }
.sprite-icon-soundcloud{ background-position: 0 -733px; width: 32px; height: 32px; }
.sprite-icon-speaker{ background-position: 0 -815px; width: 24px; height: 24px; }
.sprite-icon-twitter{ background-position: 0 -889px; width: 24px; height: 24px; }
.sprite-icon-vimeo{ background-position: 0 -963px; width: 24px; height: 24px; }
.sprite-icon-youtube{ background-position: 0 -1037px; width: 24px; height: 24px; }
.sprite-icon-youtube_alt{ background-position: 0 -1111px; width: 24px; height: 24px; }
.sprite-time-interval-bg{ background-position: 0 -1185px; width: 5px; height: 12px; }
.sprite-time-interval{ background-position: 0 -1247px; width: 5px; height: 6px; }
.sprite-zback-to-begin-16{ background-position: 0 -1303px; width: 16px; height: 12px; }
.sprite-zback-to-begin-24{ background-position: 0 -1365px; width: 24px; height: 18px; }
.sprite-zoom-in-24{ background-position: 0 -1433px; width: 24px; height: 24px; }
.sprite-zoom-in{ background-position: 0 -1507px; width: 16px; height: 16px; }
.sprite-zoom-out-24{ background-position: 0 -1573px; width: 24px; height: 24px; }
.sprite-zoom-out{ background-position: 0 -1647px; width: 16px; height: 16px; }
*/

47
source/less/slider.less

@ -221,6 +221,53 @@
border: 1px solid @color-line;
//max-height:350px;
}
.map {
line-height: normal;
border: 1px solid @color-line;
z-index:500;
text-align:left;
background-color:@white;
img {
max-height:none !important;
max-width:none !important;
}
.google-map {
height:100%;
width:100%;
}
.map-attribution {
position: absolute;
z-index: 1000003;
//right: 0px;
bottom: 0px;
width:100%;
overflow:hidden;
.attribution-text {
height: 19px;
overflow:hidden;
-webkit-user-select: none;
line-height: 19px;
margin-right: 60px;
padding-left: 65px;
font-family: Arial, sans-serif;
font-size: 10px;
//font-weight: bold;
color: #444;
white-space: nowrap;
color:@color-base;
text-shadow:1px 1px 1px @color-dark-second;
//direction: ltr;
text-align: center;
a {
color:@color-base !important;
}
}
}
}
}
.credit, .caption {
font-family: @font-sansserif;

5
source/less/structure-navigation.less

@ -231,6 +231,10 @@
height:150px;
background: @color-line;
//background:@color-line-hover;
-moz-box-shadow: 1px 0 0 @color-base;
-webkit-box-shadow: 1px 0 0 @color-base;
box-shadow: 1px 0 0 @color-base;
//.opacity(25);
z-index:22;
.event-line {
@ -405,6 +409,7 @@
}
}
.time-interval {
white-space:nowrap;
position:absolute;

29
source/less/structure.less

@ -3,18 +3,26 @@
* Basic and global styles for generating structural layout
* ------------------------------------------------------------------------------------------- */
/* TESTING PURPOSES
/* TIMELINE EMBED
================================================== */
html, body {
height:100%;
padding: 0px;
margin: 0px;
#timeline-embed {
background-color: @color-background;
margin-bottom:20px;
border: 1px solid @color-line;
padding-top:20px;
padding-bottom:20px;
clear:both;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: 0 1px 3px rgba(0,0,0,.25);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,.25);
box-shadow: 1px 2px 6px rgba(0,0,0,.25);
}
/* IPHONE ETC
================================================== */
/* TIMELINE
================================================== */
#timeline {
width: 100%;
height:100%;
@ -24,6 +32,9 @@ html, body {
background-color:@color-background;
position: absolute;
//border: 1px solid @color-line;
z-index:100;
clear:both;
overflow:hidden;

26
source/less/timeline-dark.less

@ -0,0 +1,26 @@
/* Timeline
* Dark
* Copyright 2012 Zach Wise
* Designed and built by Zach Wise digitalartwork.net
* ----------------------------------------------------- */
// CSS Reset
@import "reset.less";
// Core variables and mixins
@import "variables-dark.less";
@import "mixins.less";
@import "gfx-dark.less";
// Grid system and page structure
@import "structure.less";
// Typography
@import "type.less";
// Elements
@import "elements.less"; // UI Elements etc
// Grid system and page structure
@import "tooltip.less";

6
source/less/timeline.less

@ -1,7 +1,5 @@
/* Timeline
* CSS
* Version: 0.1
* Date: January 12, 2011
* Default
* Copyright 2012 Zach Wise
* Designed and built by Zach Wise digitalartwork.net
* ----------------------------------------------------- */
@ -11,7 +9,7 @@
@import "reset.less";
// Core variables and mixins
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
@import "variables.less";
@import "mixins.less";
@import "gfx.less";

100
source/less/variables-dark.less

@ -0,0 +1,100 @@
/* Variables.less
* Variables to customize the look and feel
* ----------------------------------------------------- */
/* Colors
================================================== */
@color-base: #1A1A1A;
@color-line: #333; //#414141;
@color-line-hover: #666;
@color-dark: #FFF;
@color-dark-second: #AAA;
@color-dark-third: #AAA;
@color-dark-fourth: #999;
@color-dark-fifth: #E3E3E3;
@color-dark-fifth: #E3E3E3;
//262626
/* COLOR SCHEME
================================================== */
@color-theme: #0BD4E3; //#FF3712; //#FF0000;
@color-theme-dark: darken(@color-theme, 15);
@color-theme-complement: spin(@color-theme, 180);
@color-theme-complement-dark: darken(@color-theme-complement, 15);
@color-theme-split1: spin(@color-theme, -158);
@color-theme-split2: spin(@color-theme, 158);
@color-theme-triad1: spin(@color-theme, -135);
@color-theme-triad2: spin(@color-theme, 135);
@color-theme-tetra1: spin(@color-theme, -90);
@color-theme-tetra2: spin(@color-theme, 90);
@color-theme-analog1: spin(@color-theme, -22);
@color-theme-analog2: spin(@color-theme, 22);
@color-background: @color-base;
@color-background-dark: #262626;
@white: @color-base;
/* CLEANUP IN PROGRESS
================================================== */
// Navigation
@color-nav-date: #AAA; // 33%
@color-nav-description: @color-dark-fourth; // 40%
@color-nav-title: @color-dark-fourth;
// Feature
@color-feature-date: @color-dark-third;
@color-feature-description: @color-dark-third;
@color-feature-title: @color-dark;
@color-caption: @color-dark-third;
@color-credit: @color-dark-fourth;
// Navigation
@color-navigation-time: @color-dark-third; // 60%
@color-navigation-major-time: @color-dark-second; // 80%
@color-navigation-time-strong: @color-dark; // 100%
@era-background: #E2E2E2; //#E3E3E3; // 11%
@era-line: @color-line;
@era-text: @color-feature-date;
/* Sizes
================================================== */
// Baseline grid
@base-font: 15px;
@base-line: 20px;
@base-space: 15px;
@base-font-small: 11px;
// Feature Element Sizes
@feature-content-text: 200px;
@feature-content-width: 720px;
@feature-content-height: 400px;
// Feature Navigation
@feature-nav-width: 100px;
@feature-nav-height: 200px;
// Navigation
@navigation-height: 200px;
@navigation-time-height: 50px;
@navigation-content-height: @navigation-height - @navigation-time-height;
// Marker
@navigation-marker-height:6px;
@font-sansserif: "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-serif: "Georgia", Times New Roman, Times, serif;

50
source/less/variables.less

@ -5,16 +5,16 @@
/* Colors
================================================== */
@color-base: #FFF;
@color-line: #CCC;
@color-line-hover: #666;
@color-line: #CCC;
@color-line-hover: #666;
@color-dark:#000;
@color-dark-second: #333;
@color-dark-third: #666;
@color-dark-fourth: #999;
@color-dark-fifth: #E3E3E3;
@color-dark-fifth: #E3E3E3;
@color-dark: #000;
@color-dark-second: #333;
@color-dark-third: #666;
@color-dark-fourth: #999;
@color-dark-fifth: #E3E3E3;
@color-dark-fifth: #E3E3E3;
/* COLOR SCHEME
@ -37,38 +37,38 @@
@color-theme-analog1: spin(@color-theme, -22);
@color-theme-analog2: spin(@color-theme, 22);
@color-background: #FFF;
@color-background: @color-base;
@color-background-dark: #E9E9E9;
@white: #FFF;
@white: @color-base;
/* CLEANUP IN PROGRESS
================================================== */
// Navigation
@color-nav-date: #AAA; // 33%
@color-nav-description: #999; // 40%
@color-nav-title: #999;
@color-nav-date: #AAA; // 33%
@color-nav-description: @color-dark-fourth; // 40%
@color-nav-title: @color-dark-fourth;
// Feature
@color-feature-date: #666;
@color-feature-description: #666;
@color-feature-title: #000;
@color-feature-date: @color-dark-third;
@color-feature-description: @color-dark-third;
@color-feature-title: @color-dark;
@color-caption:#666;
@color-credit:#999;
@color-caption: @color-dark-third;
@color-credit: @color-dark-fourth;
// Navigation
@color-navigation-time: #666; // 60%
@color-navigation-major-time: #333; // 80%
@color-navigation-time-strong: #000; // 100%
@color-navigation-time: @color-dark-third; // 60%
@color-navigation-major-time: @color-dark-second; // 80%
@color-navigation-time-strong: @color-dark; // 100%
@era-background: #E2E2E2; //#E3E3E3; // 11%
@era-line:@color-line;
@era-text:@color-feature-date;
@era-background: #E2E2E2; //#E3E3E3; // 11%
@era-line: @color-line;
@era-text: @color-feature-date;
/* Sizes
================================================== */

1466
timeline-dark.css

File diff suppressed because it is too large Load Diff

BIN
timeline-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

36
timeline-embed.js

@ -0,0 +1,36 @@
/*jslint browser: true, eqeqeq: true, bitwise: true, newcap: true, immed: true, regexp: false *//**
LazyLoad makes it easy and painless to lazily load one or more external
JavaScript or CSS files on demand either during or after the rendering of a web
page.
Supported browsers include Firefox 2+, IE6+, Safari 3+ (including Mobile
Safari), Google Chrome, and Opera 9+. Other browsers may or may not work and
are not officially supported.
Visit https://github.com/rgrove/lazyload/ for more info.
Copyright (c) 2011 Ryan Grove <ryan@wonko.com>
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@module lazyload
@class LazyLoad
@static
@version 2.0.3 (git)
*/LazyLoad=function(a){function h(b,c){var d=a.createElement(b),e;for(e in c)c.hasOwnProperty(e)&&d.setAttribute(e,c[e]);return d}function i(a){var b=d[a],c,g;if(b){c=b.callback;g=b.urls;g.shift();e=0;if(!g.length){c&&c.call(b.context,b.obj);d[a]=null;f[a].length&&k(a)}}}function j(){var c=navigator.userAgent;b={async:a.createElement("script").async===!0};(b.webkit=/AppleWebKit\//.test(c))||(b.ie=/MSIE/.test(c))||(b.opera=/Opera/.test(c))||(b.gecko=/Gecko\//.test(c))||(b.unknown=!0)}function k(e,g,k,n,o){var p=function(){i(e)},q=e==="css",r=[],s,t,u,v,w,x;b||j();if(g){g=typeof g=="string"?[g]:g.concat();if(q||b.async||b.gecko||b.opera)f[e].push({urls:g,callback:k,obj:n,context:o});else for(s=0,t=g.length;s<t;++s)f[e].push({urls:[g[s]],callback:s===t-1?k:null,obj:n,context:o})}if(d[e]||!(v=d[e]=f[e].shift()))return;c||(c=a.head||a.getElementsByTagName("head")[0]);w=v.urls;for(s=0,t=w.length;s<t;++s){x=w[s];if(q)u=b.gecko?h("style"):h("link",{href:x,rel:"stylesheet"});else{u=h("script",{src:x});u.async=!1}u.className="lazyload";u.setAttribute("charset","utf-8");if(b.ie&&!q)u.onreadystatechange=function(){if(/loaded|complete/.test(u.readyState)){u.onreadystatechange=null;p()}};else if(q&&(b.gecko||b.webkit))if(b.webkit){v.urls[s]=u.href;m()}else{u.innerHTML='@import "'+x+'";';l(u)}else u.onload=u.onerror=p;r.push(u)}for(s=0,t=r.length;s<t;++s)c.appendChild(r[s])}function l(a){var b;try{b=!!a.sheet.cssRules}catch(c){e+=1;e<200?setTimeout(function(){l(a)},50):b&&i("css");return}i("css")}function m(){var a=d.css,b;if(a){b=g.length;while(--b>=0)if(g[b].href===a.urls[0]){i("css");break}e+=1;a&&(e<200?setTimeout(m,50):i("css"))}}var b,c,d={},e=0,f={css:[],js:[]},g=a.styleSheets;return{css:function(a,b,c,d){k("css",a,b,c,d)},js:function(a,b,c,d){k("js",a,b,c,d)}}}(this.document);(function(){function m(){LazyLoad.js(a.js,n)}function n(){c=!0;p()}function o(){d=!0;p()}function p(){if(f>40)return;f++;if(c&&d){if(!e){e=!0;if(a.i18n){VMM.master_config.i18n=a.i18n;console.log(VMM.master_config)}h=new VMM.Timeline;h.init(a.source)}}else g=setTimeout("checkAgain();",250)}var a={width:800,height:600,source:"taylor/data.json",css:"http://veritetimeline.appspot.com/latest/timeline.css",js:"http://veritetimeline.appspot.com/latest/timeline-min.js"};if(typeof timeline_config=="object"){var b;for(b in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,b)&&(a[b]=timeline_config[b])}else if(typeof config=="object"){var b;for(b in config)Object.prototype.hasOwnProperty.call(config,b)&&(a[b]=config[b])}timeline_config=a;var c=!1,d=!1,e=!1,f=0,g,h,i=document.createElement("div"),j=document.getElementById("timeline-embed");j.appendChild(i);i.setAttribute("id","timeline");a.width.toString().match("%")||a.width.toString().match("px")?j.style.width=a.width:j.style.width=a.width+"px";a.height.toString().match("%")||a.height.toString().match("px")?j.style.height=a.height:j.style.height=a.height+"px";i.style.position="relative";LazyLoad.css(a.css,o);try{var k=jQuery;k=!0}catch(l){var k=!1}k?m():LazyLoad.js("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",m);this.checkAgain=function(){p()}})();

28
timeline-min.js vendored

File diff suppressed because one or more lines are too long

23
timeline.css

@ -18,8 +18,8 @@
#timeline input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
#timeline input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
#timeline textarea{overflow:auto;vertical-align:top;}
html,body{height:100%;padding:0px;margin:0px;}
#timeline{width:100%;height:100%;padding:0px;margin:0px;background-color:#ffffff;position:absolute;overflow:hidden;}#timeline .feedback{position:absolute;display:table;overflow:hidden;top:0px;left:0px;z-index:2000;width:100%;height:100%;background-color:#e9e9e9;border:1px solid #cccccc;}#timeline .feedback .messege{display:table-cell;vertical-align:middle;font-size:28px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;text-transform:uppercase;line-height:36px;width:75%;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;text-align:center;}
#timeline-embed{background-color:#ffffff;margin-bottom:20px;border:1px solid #cccccc;padding-top:20px;padding-bottom:20px;clear:both;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25);box-shadow:1px 2px 6px rgba(0, 0, 0, 0.25);}
#timeline{width:100%;height:100%;padding:0px;margin:0px;background-color:#ffffff;position:absolute;z-index:100;clear:both;overflow:hidden;}#timeline .feedback{position:absolute;display:table;overflow:hidden;top:0px;left:0px;z-index:2000;width:100%;height:100%;background-color:#e9e9e9;border:1px solid #cccccc;}#timeline .feedback .messege{display:table-cell;vertical-align:middle;font-size:28px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;text-transform:uppercase;line-height:36px;width:75%;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;text-align:center;}
#timeline .container.main{position:absolute;top:0px: left:0px;padding-bottom:3px;width:auto;height:auto;margin:0px;clear:both;}
#timeline img,#timeline embed,#timeline object,#timeline video,#timeline iframe{max-width:100%;}
#timeline img{max-height:100%;border:1px solid #999999;}
@ -63,13 +63,16 @@ html,body{height:100%;padding:0px;margin:0px;}
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
.slider .slider-item{position:absolute;width:700px;height:100%;padding:0px;margin:0px;overflow:hidden;display:table;}.slider .slider-item .content{display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container{display:table;vertical-align:middle;}.slider .slider-item .content .content-container .text{width:40%;max-width:50%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #cccccc;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .credit,.slider .slider-item .content .content-container .media .media-wrapper .media-container .caption{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .credit{color:#999999;text-align:right;font-size:10px;line-height:10px;display:block;margin:0 auto;margin-top:4px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .caption{text-align:left;margin-top:10px;color:#666666;font-size:11px;line-height:14px;}
.slider .slider-item .content .content-container .media.text-media .media-wrapper .media-container{border:none;background-color:#ffffff;}
.slider .slider-item .content .content-container.layout-text{width:100%;}.slider .slider-item .content .content-container.layout-text .text{width:100%;max-width:100%;}.slider .slider-item .content .content-container.layout-text .text .container{display:block;vertical-align:middle;text-align:left;padding:0px;width:60%;text-align:left;margin-left:auto;margin-right:auto;}
.slider .slider-item .content .content-container.layout-media{width:100%;}.slider .slider-item .content .content-container.layout-media .text{width:100%;height:100%;max-width:100%;display:block;text-align:center;}.slider .slider-item .content .content-container.layout-media .text .container{display:block;text-align:center;width:100%;margin-left:none;margin-right:none;}
.slider .slider-item .content .content-container.layout-media .media{width:100%;min-width:50%;float:none;}.slider .slider-item .content .content-container.layout-media .media .media-wrapper{display:block;}.slider .slider-item .content .content-container.layout-media .media .media-wrapper .media-container{margin-left:auto;margin-right:auto;overflow:hidden;line-height:0px;padding:0px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map{line-height:normal;border:1px solid #cccccc;z-index:500;text-align:left;background-color:#ffffff;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map img{max-height:none !important;max-width:none !important;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .google-map{height:100%;width:100%;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution{position:absolute;z-index:1000003;bottom:0px;width:100%;overflow:hidden;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution .attribution-text{height:19px;overflow:hidden;-webkit-user-select:none;line-height:19px;margin-right:60px;padding-left:65px;font-family:Arial,sans-serif;font-size:10px;color:#444;white-space:nowrap;color:#ffffff;text-shadow:1px 1px 1px #333333;text-align:center;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution .attribution-text a{color:#ffffff !important;}
.slider .slider-item .content .content-container .media .media-wrapper .credit,.slider .slider-item .content .content-container .media .media-wrapper .caption{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
.slider .slider-item .content .content-container .media .media-wrapper .credit{color:#999999;text-align:right;font-size:10px;line-height:10px;display:block;margin:0 auto;margin-top:4px;}
.slider .slider-item .content .content-container .media .media-wrapper .caption{text-align:left;margin-top:10px;color:#666666;font-size:11px;line-height:14px;}
.slider .slider-item .content .media.text-media .media-wrapper .media-container{border:none;background-color:#ffffff;}
.slider .slider-item .content-container.layout-text{width:100%;}.slider .slider-item .content-container.layout-text .text{width:100%;max-width:100%;}.slider .slider-item .content-container.layout-text .text .container{display:block;vertical-align:middle;text-align:left;padding:0px;width:60%;text-align:left;margin-left:auto;margin-right:auto;}
.slider .slider-item .content-container.layout-media{width:100%;}.slider .slider-item .content-container.layout-media .text{width:100%;height:100%;max-width:100%;display:block;text-align:center;}.slider .slider-item .content-container.layout-media .text .container{display:block;text-align:center;width:100%;margin-left:none;margin-right:none;}
.slider .slider-item .content-container.layout-media .media{width:100%;min-width:50%;float:none;}.slider .slider-item .content-container.layout-media .media .media-wrapper{display:block;}.slider .slider-item .content-container.layout-media .media .media-wrapper .media-container{margin-left:auto;margin-right:auto;overflow:hidden;line-height:0px;padding:0px;}
#timeline .navigation{clear:both;cursor:move;width:100%;height:200px;border-top:1px solid #cccccc;position:relative;}#timeline .navigation .toolbar{position:absolute;top:45px;left:0px;z-index:1000;background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:1px 1px 0px rgba(0, 0, 0, 0.2);-moz-box-shadow:1px 1px 0px rgba(0, 0, 0, 0.2);box-shadow:1px 1px 0px rgba(0, 0, 0, 0.2);}#timeline .navigation .toolbar .zoom-in,#timeline .navigation .toolbar .zoom-out,#timeline .navigation .toolbar .back-home{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px;font-weight:normal;line-height:20px;top:0px;z-index:1000;width:18px;height:18px;color:#333333;text-align:center;font-weight:bold;border:1px solid #ffffff;padding:5px;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
#timeline .navigation .toolbar .zoom-in:hover,#timeline .navigation .toolbar .zoom-out:hover,#timeline .navigation .toolbar .back-home:hover{color:#0088cc;cursor:pointer;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
#timeline .navigation .toolbar .zoom-in .icon{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -1507px;width:16px;height:16px;}
@ -86,7 +89,7 @@ html,body{height:100%;padding:0px;margin:0px;}
#timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h4{color:#999999;}
#timeline .navigation .timenav .content .marker:hover .line{z-index:500;background:#999999;}
#timeline .navigation .timenav .content .marker{position:absolute;top:0px;left:150px;display:block;}#timeline .navigation .timenav .content .marker .dot{position:absolute;top:150px;left:0px;display:block;width:6px;height:6px;background:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;z-index:21;}
#timeline .navigation .timenav .content .marker .line{position:absolute;top:0px;left:3px;width:1px;height:150px;background:#cccccc;z-index:22;}#timeline .navigation .timenav .content .marker .line .event-line{position:absolute;z-index:22;left:0px;height:1px;width:1px;background:#0088cc;filter:alpha(opacity=15);-khtml-opacity:0.15;-moz-opacity:0.15;opacity:0.15;}
#timeline .navigation .timenav .content .marker .line{position:absolute;top:0px;left:3px;width:1px;height:150px;background:#cccccc;-moz-box-shadow:1px 0 0 #ffffff;-webkit-box-shadow:1px 0 0 #ffffff;box-shadow:1px 0 0 #ffffff;z-index:22;}#timeline .navigation .timenav .content .marker .line .event-line{position:absolute;z-index:22;left:0px;height:1px;width:1px;background:#0088cc;filter:alpha(opacity=15);-khtml-opacity:0.15;-moz-opacity:0.15;opacity:0.15;}
#timeline .navigation .timenav .content .marker .flag{position:absolute;top:15px;left:3px;padding:0px;display:block;z-index:23;width:153px;height:56px;background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 0;width:153px;height:60px;}#timeline .navigation .timenav .content .marker .flag .flag-content{padding:5px 7px 2px 5px;overflow:hidden;height:33px;}#timeline .navigation .timenav .content .marker .flag .flag-content h3{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:bold;line-height:20px;font-size:11px;line-height:11px;color:#999999;margin-bottom:2px;}#timeline .navigation .timenav .content .marker .flag .flag-content h3 small{display:none;}
#timeline .navigation .timenav .content .marker .flag .flag-content h4{display:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:normal;line-height:20px;font-size:10px;line-height:10px;color:#aaaaaa;}#timeline .navigation .timenav .content .marker .flag .flag-content h4 small{display:none;}
#timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;}

6579
timeline.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save