Browse Source

Added Wikipedia as a source

pull/127/head
Zach Wise 13 years ago
parent
commit
6d1ad7fdf4
  1. 8
      locale/de.js
  2. 8
      locale/en.js
  3. 8
      locale/es.js
  4. 8
      locale/fr.js
  5. 8
      locale/is.js
  6. 8
      locale/it.js
  7. 8
      locale/kr.js
  8. 8
      locale/nl.js
  9. 8
      locale/pt-br.js
  10. 8
      locale/zh-ch.js
  11. 8
      locale/zh-tw.js
  12. BIN
      source/gfx/timeline.psd
  13. 34
      source/js/VMM.ExternalAPI.js
  14. 2
      source/js/VMM.MediaElement.js
  15. 5
      source/js/VMM.MediaType.js
  16. 24
      source/js/VMM.Util.js
  17. 106
      source/less/VMM.Slider.less
  18. 6
      source/less/VMM.Timeline.Core.less
  19. 12
      source/less/VMM.Timeline.TimeNav.less
  20. 19
      themes/dark.css
  21. 8
      timeline-min.js
  22. 19
      timeline.css
  23. 65
      timeline.js
  24. BIN
      timeline.png

8
locale/de.js

File diff suppressed because one or more lines are too long

8
locale/en.js

File diff suppressed because one or more lines are too long

8
locale/es.js

File diff suppressed because one or more lines are too long

8
locale/fr.js

File diff suppressed because one or more lines are too long

8
locale/is.js

File diff suppressed because one or more lines are too long

8
locale/it.js

File diff suppressed because one or more lines are too long

8
locale/kr.js

File diff suppressed because one or more lines are too long

8
locale/nl.js

File diff suppressed because one or more lines are too long

8
locale/pt-br.js

File diff suppressed because one or more lines are too long

8
locale/zh-ch.js

File diff suppressed because one or more lines are too long

8
locale/zh-tw.js

File diff suppressed because one or more lines are too long

BIN
source/gfx/timeline.psd

Binary file not shown.

34
source/js/VMM.ExternalAPI.js

@ -18,6 +18,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
if (VMM.master_config.googledocs.active) {
VMM.ExternalAPI.googledocs.pushQue();
}
if (VMM.master_config.wikipedia.active) {
VMM.ExternalAPI.wikipedia.pushQue();
}
},
@ -564,25 +567,44 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
//http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Beastie%20Boys&format=json&exintro=1
get: function(url, id) {
trace("WIKIPEDIA GET");
var api_obj = {url: url, id: id};
VMM.master_config.wikipedia.que.push(api_obj);
VMM.master_config.wikipedia.active = true;
},
create: function(api_obj) {
VMM.attachElement("#"+api_obj.id, api_obj.url);
/*
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + wiki.url + "&format=json&exintro=1&callback=?";
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + api_obj.url + "&format=json&exintro=1&callback=?";
VMM.getJSON(the_url, function(d) {
if (d.query.pages[0].extract.match("REDIRECT")) {
var wiki_extract = VMM.Util.getObjectAttributeByIndex(d.query.pages, 0).extract;
var wiki_title = VMM.Util.getObjectAttributeByIndex(d.query.pages, 0).title;
var _wiki = "";
var wiki_text = "";
var wiki_text_array = wiki_extract.split("<p>");
var wiki_number_of_paragraphs = 2;
for(var i = 0; i < wiki_text_array.length; i++) {
if (i+1 <= wiki_number_of_paragraphs && i+1 < wiki_text_array.length) {
wiki_text += "<p>" + wiki_text_array[i+1];
}
}
_wiki = "<h4>" + wiki_title + "</h4>";
_wiki += "<div class='wiki-source'>From Wikipedia, the free encyclopedia</span>";
_wiki += VMM.Util.linkify_wikipedia(wiki_text);
if (wiki_extract.match("REDIRECT")) {
} else {
VMM.attachElement("#"+api_obj.id, _wiki );
}
VMM.attachElement("#"+wiki.id, d.html);
});
*/
},
pushQue: function() {
trace("WIKIPEDIA PUSH QUE");
for(var i = 0; i < VMM.master_config.wikipedia.que.length; i++) {
VMM.ExternalAPI.wikipedia.create(VMM.master_config.wikipedia.que[i]);
}

2
source/js/VMM.MediaElement.js

@ -137,7 +137,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// WIKIPEDIA
} else if (m.type == "wikipedia") {
_id = "wikipedia_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='wikipedia' id='" + "wikipedia_" + _id + "'><span class='messege'><p>Loading Wikipedia</p></span></div>";
mediaElem = "<div class='wikipedia' id='" + _id + "'><span class='messege'><p>Loading Wikipedia</p></span></div>";
VMM.ExternalAPI.wikipedia.get(m.id, _id);
// UNKNOWN
} else if (m.type == "unknown") {

5
source/js/VMM.MediaType.js

@ -62,7 +62,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
success = true;
} else if (d.match('(www.)?wikipedia\.org')) {
media.type = "wikipedia";
media.id = d;
//media.id = d.split("wiki\/")[1];
var wiki_id = d.split("wiki\/")[1].split("#")[0].replace("_", " ");
media.id = VMM.Util.toTitleCase(wiki_id).replace(" ", "%20");
trace("WIKIPEDIA " + media.id);
success = true;
} else if (d.indexOf('http://') == 0) {
media.type = "website";

24
source/js/VMM.Util.js

@ -8,7 +8,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
return this;
},
/* CORRECT PROTOCOL
/* CORRECT PROTOCOL (DOES NOT WORK)
================================================== */
correctProtocol: function(url) {
var loc = (window.parent.location.protocol).toString();
@ -24,7 +24,19 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
return prefix + "://" + _url[1];
},
/* GET OBJECT ATTRIBUTE BY INDEX
================================================== */
getObjectAttributeByIndex: function(obj, index) {
var i = 0;
for (var attr in obj){
if (index === i){
return obj[attr];
}
i++;
}
return null;
},
/* RANDOM BETWEEN
================================================== */
//VMM.Util.randomBetween(1, 3)
@ -404,6 +416,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>");
},
linkify_wikipedia: function(text) {
var urlPattern = /<i[^>]*>(.*?)<\/i>/gim;
return text
.replace(urlPattern, "<a target='_blank' href='http://en.wikipedia.org/wiki/$&' onclick='void(0)'>$&</a>")
.replace(/<i\b[^>]*>/gim, "")
.replace(/<\/i>/gim, "");
},
/* Turns plain text links into real links
================================================== */
// VMM.Util.unlinkify();

106
source/less/VMM.Slider.less

@ -177,7 +177,7 @@
margin-left:auto;
margin-right:auto;
text-align:center;
margin-top:50%;
margin-top: 50%;
font-size: 28px;
font-weight: bold;
text-transform: uppercase;
@ -195,6 +195,107 @@
}
}
}
.twitter {
text-align:left;
margin-left: auto;
margin-right: auto;
margin-bottom:@base-space;
clear:both;
blockquote {
font-size: @base-font;
line-height: @base-line;
color:@color-feature-description;
p {
font-size: 28px;
line-height: 36px;
margin-bottom: 6px;
padding-top: 10px;
background-color:@white;
color:@color-feature-title;
//margin-left:10px;
}
.quote-mark {
color:@color-dark-third;
}
}
.created-at {
.icon-twitter();
width:24px;
height:24px;
overflow:hidden;
margin-left:@base-space;
display:inline-block;
float:right;
.opacity(25);
}
.created-at:hover {
.opacity(100);
}
.vcard {
float:right;
margin-bottom:@base-space;
//position: relative;
a {
color: @color-dark-second;
}
a:hover {
text-decoration: none;
.fn {
text-decoration: underline;
}
}
.fn, .nickname {
padding-left: 42px;
}
.fn {
display:block;
//display:inline;
font-weight: bold;
}
.nickname {
margin-top:3px;
display:block;
color: @color-dark-third;
}
.avatar {
float:left;
//position: absolute;
display: block;
width: 32px;
height: 32px;
img {
//border: 0px solid #999;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
}
}
}
.wikipedia {
font-size: @base-font;
line-height: @base-line;
text-align:left;
margin-left: auto;
margin-right: auto;
margin-bottom:@base-space;
clear:both;
.wiki-source {
margin-bottom:@base-space;
}
h4 {
border-bottom: 1px solid @color-line;
margin-bottom:5px;
font-style: italic;
}
p {
font-size: 13px;
line-height: 19px;
}
}
img, iframe {
border: 1px solid @color-line;
//max-height:350px;
@ -329,6 +430,9 @@
}
}
.twitter, .wikipedia {
max-width:70%;
}
}
}
}

6
source/less/VMM.Timeline.Core.less

@ -208,11 +208,7 @@
}
.layout-media {
.twitter {
max-width:70%;
}
}
.thumbnail {
width:24px;

12
source/less/VMM.Timeline.TimeNav.less

@ -172,6 +172,11 @@
h3 {
color: @color-theme;
}
.thumbnail {
opacity: 1;
-moz-opacity: 1;
filter:alpha(opacity=100);
}
}
}
.flag.row1, .flag.row2, .flag.row3 {
@ -297,6 +302,9 @@
.thumbnail {
margin-bottom:15px;
opacity: 0.5;
-moz-opacity: 0.5;
filter:alpha(opacity=50);
}
}
@ -314,7 +322,9 @@
color:@color-nav-date;
}
.thumbnail {
//border: 1px solid @color-nav-date;
opacity: 1;
-moz-opacity: 1;
filter:alpha(opacity=100);
}
}
}

19
themes/dark.css

@ -44,7 +44,6 @@
.vmm-timeline .twitter .vcard .fn{display:block;font-weight:bold;}
.vmm-timeline .twitter .vcard .nickname{margin-top:3px;display:block;color:#aaaaaa;}
.vmm-timeline .twitter .vcard .avatar{float:left;display:block;width:32px;height:32px;}.vmm-timeline .twitter .vcard .avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}
.vmm-timeline .layout-media .twitter{max-width:70%;}
.vmm-timeline .thumbnail{width:24px;height:24px;overflow:hidden;float:left;margin-right:1px;margin-top:6px;}
.vmm-timeline .thumbnail.thumb-plaintext{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-280px -48px;}
.vmm-timeline .thumbnail.thumb-quote{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-232px -48px;}
@ -76,6 +75,19 @@
.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 span.messege{display:block;vertical-align:middle;margin-left:auto;margin-right:auto;text-align:center;margin-top:50%;font-size:28px;font-weight:bold;text-transform:uppercase;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text{display:table;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container{display:table-cell;vertical-align:middle;font-size:15px;line-height:20px;color:#aaaaaa;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container p{margin-bottom:20px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter{text-align:left;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter blockquote{font-size:15px;line-height:20px;color:#aaaaaa;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter blockquote p{font-size:28px;line-height:36px;margin-bottom:6px;padding-top:10px;background-color:#1a1a1a;color:#ffffff;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter blockquote .quote-mark{color:#aaaaaa;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .created-at{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-256px -24px;width:24px;height:24px;overflow:hidden;margin-left:15px;display:inline-block;float:right;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .created-at:hover{filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard{float:right;margin-bottom:15px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard a{color:#aaaaaa;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard a:hover{text-decoration:none;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard a:hover .fn{text-decoration:underline;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .fn,.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .nickname{padding-left:42px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .fn{display:block;font-weight:bold;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .nickname{margin-top:3px;display:block;color:#aaaaaa;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .avatar{float:left;display:block;width:32px;height:32px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia{font-size:15px;line-height:20px;text-align:left;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia .wiki-source{margin-bottom:15px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia h4{border-bottom:1px solid #333333;margin-bottom:5px;font-style:italic;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia p{font-size:13px;line-height:19px;}
.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 #333333;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map{line-height:normal;border:1px solid #333333;z-index:200;text-align:left;background-color:#1a1a1a;}.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%;}
@ -86,6 +98,7 @@
.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:90%;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;}
.slider .slider-item .content-container.layout-media .twitter,.slider .slider-item .content-container.layout-media .wikipedia{max-width:70%;}
.vmm-timeline .navigation{clear:both;cursor:move;width:100%;height:200px;border-top:1px solid #333333;position:relative;}.vmm-timeline .navigation .toolbar{position:absolute;top:45px;left:0px;z-index:202;background-color:#1a1a1a;border:1px solid #333333;-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);}.vmm-timeline .navigation .toolbar .zoom-in,.vmm-timeline .navigation .toolbar .zoom-out,.vmm-timeline .navigation .toolbar .back-home{font-weight:normal;font-size:10px;line-height:20px;top:0px;z-index:202;width:18px;height:18px;color:#aaaaaa;text-align:center;font-weight:bold;border:1px solid #1a1a1a;padding:5px;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
.vmm-timeline .navigation .toolbar .zoom-in:hover,.vmm-timeline .navigation .toolbar .zoom-out:hover,.vmm-timeline .navigation .toolbar .back-home:hover{color:#0bd4e3;cursor:pointer;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
.vmm-timeline .navigation .toolbar .zoom-in .icon{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-256px 0;width:24px;height:24px;}
@ -97,6 +110,7 @@
.vmm-timeline .navigation .timenav .content .marker.active .dot{background:#0bd4e3;z-index:200;}
.vmm-timeline .navigation .timenav .content .marker.active .line{z-index:199;background:#0bd4e3;width:1px;}.vmm-timeline .navigation .timenav .content .marker.active .line .event-line{background:#0bd4e3;filter:alpha(opacity=75);-khtml-opacity:0.75;-moz-opacity:0.75;opacity:0.75;}
.vmm-timeline .navigation .timenav .content .marker.active .flag{z-index:200;background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:0 -53px;width:153px;height:53px;}.vmm-timeline .navigation .timenav .content .marker.active .flag .flag-content h3{color:#0bd4e3;}
.vmm-timeline .navigation .timenav .content .marker.active .flag .flag-content .thumbnail{opacity:1;-moz-opacity:1;filter:alpha(opacity=100);}
.vmm-timeline .navigation .timenav .content .marker.active .flag.row1,.vmm-timeline .navigation .timenav .content .marker.active .flag.row2,.vmm-timeline .navigation .timenav .content .marker.active .flag.row3{z-index:200;}
.vmm-timeline .navigation .timenav .content .marker.active:hover{cursor:default;}.vmm-timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h3{color:#0bd4e3;}
.vmm-timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h4{color:#999999;}
@ -105,9 +119,10 @@
.vmm-timeline .navigation .timenav .content .marker .line{position:absolute;top:0px;left:3px;width:1px;height:150px;background:#333333;-moz-box-shadow:1px 0 0 #1a1a1a;-webkit-box-shadow:1px 0 0 #1a1a1a;box-shadow:1px 0 0 #1a1a1a;z-index:22;}.vmm-timeline .navigation .timenav .content .marker .line .event-line{position:absolute;z-index:22;left:0px;height:1px;width:1px;background:#0bd4e3;filter:alpha(opacity=15);-khtml-opacity:0.15;-moz-opacity:0.15;opacity:0.15;}
.vmm-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(themes/timeline-dark.png);background-repeat:no-repeat;background-position:0 0;width:153px;height:53px;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content{padding:0px 7px 2px 6px;overflow:hidden;height:36px;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h3{font-weight:bold;font-size:15px;line-height:20px;font-size:11px;line-height:11px;color:#999999;margin-top:5px;margin-bottom:2px;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h3 small{display:none;}
.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h4{display:none;font-weight:normal;font-size:15px;line-height:20px;margin-top:5px;font-size:10px;line-height:10px;color:#aaaaaa;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h4 small{display:none;}
.vmm-timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;}
.vmm-timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;opacity:0.5;-moz-opacity:0.5;filter:alpha(opacity=50);}
.vmm-timeline .navigation .timenav .content .marker .flag:hover{cursor:pointer;background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:0 -53px;width:153px;height:53px;}.vmm-timeline .navigation .timenav .content .marker .flag:hover .flag-content h3{color:#aaaaaa;}
.vmm-timeline .navigation .timenav .content .marker .flag:hover .flag-content h4{color:#aaaaaa;}
.vmm-timeline .navigation .timenav .content .marker .flag:hover .flag-content .thumbnail{opacity:1;-moz-opacity:1;filter:alpha(opacity=100);}
.vmm-timeline .navigation .timenav .content .marker .flag.row1{z-index:25;top:48px;}
.vmm-timeline .navigation .timenav .content .marker .flag.row2{z-index:24;top:96px;}
.vmm-timeline .navigation .timenav .content .marker .flag.row3{z-index:23;top:1px;}

8
timeline-min.js vendored

File diff suppressed because one or more lines are too long

19
timeline.css

@ -44,7 +44,6 @@
.vmm-timeline .twitter .vcard .fn{display:block;font-weight:bold;}
.vmm-timeline .twitter .vcard .nickname{margin-top:3px;display:block;color:#666666;}
.vmm-timeline .twitter .vcard .avatar{float:left;display:block;width:32px;height:32px;}.vmm-timeline .twitter .vcard .avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}
.vmm-timeline .layout-media .twitter{max-width:70%;}
.vmm-timeline .thumbnail{width:24px;height:24px;overflow:hidden;float:left;margin-right:1px;margin-top:6px;}
.vmm-timeline .thumbnail.thumb-plaintext{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-280px -48px;}
.vmm-timeline .thumbnail.thumb-quote{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-232px -48px;}
@ -76,6 +75,19 @@
.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 span.messege{display:block;vertical-align:middle;margin-left:auto;margin-right:auto;text-align:center;margin-top:50%;font-size:28px;font-weight:bold;text-transform:uppercase;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text{display:table;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container{display:table-cell;vertical-align:middle;font-size:15px;line-height:20px;color:#666666;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container p{margin-bottom:20px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter{text-align:left;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter blockquote{font-size:15px;line-height:20px;color:#666666;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter blockquote p{font-size:28px;line-height:36px;margin-bottom:6px;padding-top:10px;background-color:#ffffff;color:#000000;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter blockquote .quote-mark{color:#666666;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .created-at{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-256px -24px;width:24px;height:24px;overflow:hidden;margin-left:15px;display:inline-block;float:right;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .created-at:hover{filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard{float:right;margin-bottom:15px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard a{color:#333333;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard a:hover{text-decoration:none;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard a:hover .fn{text-decoration:underline;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .fn,.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .nickname{padding-left:42px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .fn{display:block;font-weight:bold;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .nickname{margin-top:3px;display:block;color:#666666;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .avatar{float:left;display:block;width:32px;height:32px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .twitter .vcard .avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia{font-size:15px;line-height:20px;text-align:left;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia .wiki-source{margin-bottom:15px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia h4{border-bottom:1px solid #cccccc;margin-bottom:5px;font-style:italic;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .wikipedia p{font-size:13px;line-height:19px;}
.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 .map{line-height:normal;border:1px solid #cccccc;z-index:200;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%;}
@ -86,6 +98,7 @@
.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:90%;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;}
.slider .slider-item .content-container.layout-media .twitter,.slider .slider-item .content-container.layout-media .wikipedia{max-width:70%;}
.vmm-timeline .navigation{clear:both;cursor:move;width:100%;height:200px;border-top:1px solid #cccccc;position:relative;}.vmm-timeline .navigation .toolbar{position:absolute;top:45px;left:0px;z-index:202;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);}.vmm-timeline .navigation .toolbar .zoom-in,.vmm-timeline .navigation .toolbar .zoom-out,.vmm-timeline .navigation .toolbar .back-home{font-weight:normal;font-size:10px;line-height:20px;top:0px;z-index:202;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;}
.vmm-timeline .navigation .toolbar .zoom-in:hover,.vmm-timeline .navigation .toolbar .zoom-out:hover,.vmm-timeline .navigation .toolbar .back-home:hover{color:#0088cc;cursor:pointer;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
.vmm-timeline .navigation .toolbar .zoom-in .icon{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-256px 0;width:24px;height:24px;}
@ -97,6 +110,7 @@
.vmm-timeline .navigation .timenav .content .marker.active .dot{background:#0088cc;z-index:200;}
.vmm-timeline .navigation .timenav .content .marker.active .line{z-index:199;background:#0088cc;width:1px;}.vmm-timeline .navigation .timenav .content .marker.active .line .event-line{background:#0088cc;filter:alpha(opacity=75);-khtml-opacity:0.75;-moz-opacity:0.75;opacity:0.75;}
.vmm-timeline .navigation .timenav .content .marker.active .flag{z-index:200;background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -53px;width:153px;height:53px;}.vmm-timeline .navigation .timenav .content .marker.active .flag .flag-content h3{color:#0088cc;}
.vmm-timeline .navigation .timenav .content .marker.active .flag .flag-content .thumbnail{opacity:1;-moz-opacity:1;filter:alpha(opacity=100);}
.vmm-timeline .navigation .timenav .content .marker.active .flag.row1,.vmm-timeline .navigation .timenav .content .marker.active .flag.row2,.vmm-timeline .navigation .timenav .content .marker.active .flag.row3{z-index:200;}
.vmm-timeline .navigation .timenav .content .marker.active:hover{cursor:default;}.vmm-timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h3{color:#0088cc;}
.vmm-timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h4{color:#999999;}
@ -105,9 +119,10 @@
.vmm-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;}.vmm-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;}
.vmm-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:53px;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content{padding:0px 7px 2px 6px;overflow:hidden;height:36px;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h3{font-weight:bold;font-size:15px;line-height:20px;font-size:11px;line-height:11px;color:#999999;margin-top:5px;margin-bottom:2px;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h3 small{display:none;}
.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h4{display:none;font-weight:normal;font-size:15px;line-height:20px;margin-top:5px;font-size:10px;line-height:10px;color:#aaaaaa;}.vmm-timeline .navigation .timenav .content .marker .flag .flag-content h4 small{display:none;}
.vmm-timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;}
.vmm-timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;opacity:0.5;-moz-opacity:0.5;filter:alpha(opacity=50);}
.vmm-timeline .navigation .timenav .content .marker .flag:hover{cursor:pointer;background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -53px;width:153px;height:53px;}.vmm-timeline .navigation .timenav .content .marker .flag:hover .flag-content h3{color:#333333;}
.vmm-timeline .navigation .timenav .content .marker .flag:hover .flag-content h4{color:#aaaaaa;}
.vmm-timeline .navigation .timenav .content .marker .flag:hover .flag-content .thumbnail{opacity:1;-moz-opacity:1;filter:alpha(opacity=100);}
.vmm-timeline .navigation .timenav .content .marker .flag.row1{z-index:25;top:48px;}
.vmm-timeline .navigation .timenav .content .marker .flag.row2{z-index:24;top:96px;}
.vmm-timeline .navigation .timenav .content .marker .flag.row3{z-index:23;top:1px;}

65
timeline.js

@ -1147,7 +1147,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// WIKIPEDIA
} else if (m.type == "wikipedia") {
_id = "wikipedia_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='wikipedia' id='" + "wikipedia_" + _id + "'><span class='messege'><p>Loading Wikipedia</p></span></div>";
mediaElem = "<div class='wikipedia' id='" + _id + "'><span class='messege'><p>Loading Wikipedia</p></span></div>";
VMM.ExternalAPI.wikipedia.get(m.id, _id);
// UNKNOWN
} else if (m.type == "unknown") {
@ -1260,7 +1260,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
success = true;
} else if (d.match('(www.)?wikipedia\.org')) {
media.type = "wikipedia";
media.id = d;
//media.id = d.split("wiki\/")[1];
var wiki_id = d.split("wiki\/")[1].split("#")[0].replace("_", " ");
media.id = VMM.Util.toTitleCase(wiki_id).replace(" ", "%20");
trace("WIKIPEDIA " + media.id);
success = true;
} else if (d.indexOf('http://') == 0) {
media.type = "website";
@ -1507,6 +1510,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
if (VMM.master_config.googledocs.active) {
VMM.ExternalAPI.googledocs.pushQue();
}
if (VMM.master_config.wikipedia.active) {
VMM.ExternalAPI.wikipedia.pushQue();
}
},
@ -2053,25 +2059,44 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
//http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Beastie%20Boys&format=json&exintro=1
get: function(url, id) {
trace("WIKIPEDIA GET");
var api_obj = {url: url, id: id};
VMM.master_config.wikipedia.que.push(api_obj);
VMM.master_config.wikipedia.active = true;
},
create: function(api_obj) {
VMM.attachElement("#"+api_obj.id, api_obj.url);
/*
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + wiki.url + "&format=json&exintro=1&callback=?";
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + api_obj.url + "&format=json&exintro=1&callback=?";
VMM.getJSON(the_url, function(d) {
if (d.query.pages[0].extract.match("REDIRECT")) {
var wiki_extract = VMM.Util.getObjectAttributeByIndex(d.query.pages, 0).extract;
var wiki_title = VMM.Util.getObjectAttributeByIndex(d.query.pages, 0).title;
var _wiki = "";
var wiki_text = "";
var wiki_text_array = wiki_extract.split("<p>");
var wiki_number_of_paragraphs = 2;
for(var i = 0; i < wiki_text_array.length; i++) {
if (i+1 <= wiki_number_of_paragraphs && i+1 < wiki_text_array.length) {
wiki_text += "<p>" + wiki_text_array[i+1];
}
}
_wiki = "<h4>" + wiki_title + "</h4>";
_wiki += "<div class='wiki-source'>From Wikipedia, the free encyclopedia</span>";
_wiki += VMM.Util.linkify_wikipedia(wiki_text);
if (wiki_extract.match("REDIRECT")) {
} else {
VMM.attachElement("#"+api_obj.id, _wiki );
}
VMM.attachElement("#"+wiki.id, d.html);
});
*/
},
pushQue: function() {
trace("WIKIPEDIA PUSH QUE");
for(var i = 0; i < VMM.master_config.wikipedia.que.length; i++) {
VMM.ExternalAPI.wikipedia.create(VMM.master_config.wikipedia.que[i]);
}
@ -3322,7 +3347,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
return this;
},
/* CORRECT PROTOCOL
/* CORRECT PROTOCOL (DOES NOT WORK)
================================================== */
correctProtocol: function(url) {
var loc = (window.parent.location.protocol).toString();
@ -3338,7 +3363,19 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
return prefix + "://" + _url[1];
},
/* GET OBJECT ATTRIBUTE BY INDEX
================================================== */
getObjectAttributeByIndex: function(obj, index) {
var i = 0;
for (var attr in obj){
if (index === i){
return obj[attr];
}
i++;
}
return null;
},
/* RANDOM BETWEEN
================================================== */
//VMM.Util.randomBetween(1, 3)
@ -3718,6 +3755,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>");
},
linkify_wikipedia: function(text) {
var urlPattern = /<i[^>]*>(.*?)<\/i>/gim;
return text
.replace(urlPattern, "<a target='_blank' href='http://en.wikipedia.org/wiki/$&' onclick='void(0)'>$&</a>")
.replace(/<i\b[^>]*>/gim, "")
.replace(/<\/i>/gim, "");
},
/* Turns plain text links into real links
================================================== */
// VMM.Util.unlinkify();

BIN
timeline.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Loading…
Cancel
Save