jumbo-jekyll-theme 1.4.55 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/footer.html +1 -0
- data/_sass/core/footer.scss +1 -0
- metadata +1 -2
- data/assets/js/vendor/twitter.js +0 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94568869e0e92f5574ba274a1b1cea9be57ed02c
|
4
|
+
data.tar.gz: bdb4243ac42dc7f6d7c97cc66980ffe8c12889a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 940c16f09c53aee3e7edaecc779533cfe50514065c78a3db85928fd79eefecb90209a98c7cf777725c1ff78a3d7f0415d53efabbab29d134048d854a4efd82cf
|
7
|
+
data.tar.gz: 99721220081883ceae985a1e3dbb5f88d61fe8930db0c4f20d36eb62a28ef2dfd12865f732c634abafb3eb35d67e46e180c341025a554821d88e34db4b1bd5c9
|
data/_includes/footer.html
CHANGED
data/_sass/core/footer.scss
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jumbo-jekyll-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Kirkby
|
@@ -502,7 +502,6 @@ files:
|
|
502
502
|
- assets/js/vendor/owl.carousel.js
|
503
503
|
- assets/js/vendor/picturefill.js
|
504
504
|
- assets/js/vendor/shuffle.js
|
505
|
-
- assets/js/vendor/twitter.js
|
506
505
|
- robots.txt
|
507
506
|
homepage: https://github.com/linaro-website/jumbo-jekyll-theme/
|
508
507
|
licenses:
|
data/assets/js/vendor/twitter.js
DELETED
@@ -1,129 +0,0 @@
|
|
1
|
-
/*********************************************************************
|
2
|
-
* #### Twitter Post Fetcher v17.0.2 ####
|
3
|
-
* Coded by Jason Mayes 2015. A present to all the developers out there.
|
4
|
-
* www.jasonmayes.com
|
5
|
-
* Please keep this disclaimer with my code if you use it. Thanks. :-)
|
6
|
-
* Got feedback or questions, ask here:
|
7
|
-
* http://www.jasonmayes.com/projects/twitterApi/
|
8
|
-
* Github: https://github.com/jasonmayes/Twitter-Post-Fetcher
|
9
|
-
* Updates will be posted to this site.
|
10
|
-
*********************************************************************/
|
11
|
-
(function(root,factory){if(typeof define==='function'&&define.amd){define([],factory);}else if(typeof exports==='object'){module.exports=factory();}else{factory();}}(this,function(){var domNode='';var maxTweets=20;var parseLinks=true;var queue=[];var inProgress=false;var printTime=true;var printUser=true;var formatterFunction=null;var supportsClassName=true;var showRts=true;var customCallbackFunction=null;var showInteractionLinks=true;var showImages=false;var useEmoji=false;var targetBlank=true;var lang='en';var permalinks=true;var dataOnly=false;var script=null;var scriptAdded=false;function handleTweets(tweets){if(customCallbackFunction===null){var x=tweets.length;var n=0;var element=document.getElementById(domNode);var html='<ul>';while(n<x){html+='<li>'+tweets[n]+'</li>';n++;}
|
12
|
-
html+='</ul>';element.innerHTML=html;}else{customCallbackFunction(tweets);}}
|
13
|
-
function strip(data){return data.replace(/<b[^>]*>(.*?)<\/b>/gi,function(a,s){return s;}).replace(/class="(?!(tco-hidden|tco-display|tco-ellipsis))+.*?"|data-query-source=".*?"|dir=".*?"|rel=".*?"/gi,'');}
|
14
|
-
function targetLinksToNewWindow(el){var links=el.getElementsByTagName('a');for(var i=links.length-1;i>=0;i--){links[i].setAttribute('target','_blank');}}
|
15
|
-
function getElementsByClassName(node,classname){var a=[];var regex=new RegExp('(^| )'+classname+'( |$)');var elems=node.getElementsByTagName('*');for(var i=0,j=elems.length;i<j;i++){if(regex.test(elems[i].className)){a.push(elems[i]);}}
|
16
|
-
return a;}
|
17
|
-
function extractImageUrl(image_data){if(image_data!==undefined&&image_data.innerHTML.indexOf('data-srcset')>=0){var data_src=image_data.innerHTML.match(/data-srcset="([A-z0-9%_\.-]+)/i)[0];return decodeURIComponent(data_src).split('"')[1];}}
|
18
|
-
var twitterFetcher={fetch:function(config){if(config.maxTweets===undefined){config.maxTweets=20;}
|
19
|
-
if(config.enableLinks===undefined){config.enableLinks=true;}
|
20
|
-
if(config.showUser===undefined){config.showUser=true;}
|
21
|
-
if(config.showTime===undefined){config.showTime=true;}
|
22
|
-
if(config.dateFunction===undefined){config.dateFunction='default';}
|
23
|
-
if(config.showRetweet===undefined){config.showRetweet=true;}
|
24
|
-
if(config.customCallback===undefined){config.customCallback=null;}
|
25
|
-
if(config.showInteraction===undefined){config.showInteraction=true;}
|
26
|
-
if(config.showImages===undefined){config.showImages=false;}
|
27
|
-
if(config.useEmoji===undefined){config.useEmoji=false;}
|
28
|
-
if(config.linksInNewWindow===undefined){config.linksInNewWindow=true;}
|
29
|
-
if(config.showPermalinks===undefined){config.showPermalinks=true;}
|
30
|
-
if(config.dataOnly===undefined){config.dataOnly=false;}
|
31
|
-
if(inProgress){queue.push(config);}else{inProgress=true;domNode=config.domId;maxTweets=config.maxTweets;parseLinks=config.enableLinks;printUser=config.showUser;printTime=config.showTime;showRts=config.showRetweet;formatterFunction=config.dateFunction;customCallbackFunction=config.customCallback;showInteractionLinks=config.showInteraction;showImages=config.showImages;useEmoji=config.useEmoji;targetBlank=config.linksInNewWindow;permalinks=config.showPermalinks;dataOnly=config.dataOnly;var head=document.getElementsByTagName('head')[0];if(script!==null){head.removeChild(script);}
|
32
|
-
script=document.createElement('script');script.type='text/javascript';if(config.list!==undefined){script.src='https://syndication.twitter.com/timeline/list?'+'callback=__twttrf.callback&dnt=false&list_slug='+
|
33
|
-
config.list.listSlug+'&screen_name='+config.list.screenName+'&suppress_response_codes=true&lang='+(config.lang||lang)+'&rnd='+Math.random();}else if(config.profile!==undefined){script.src='https://syndication.twitter.com/timeline/profile?'+'callback=__twttrf.callback&dnt=false'+'&screen_name='+config.profile.screenName+'&suppress_response_codes=true&lang='+(config.lang||lang)+'&rnd='+Math.random();}else if(config.likes!==undefined){script.src='https://syndication.twitter.com/timeline/likes?'+'callback=__twttrf.callback&dnt=false'+'&screen_name='+config.likes.screenName+'&suppress_response_codes=true&lang='+(config.lang||lang)+'&rnd='+Math.random();}else{script.src='https://cdn.syndication.twimg.com/widgets/timelines/'+
|
34
|
-
config.id+'?&lang='+(config.lang||lang)+'&callback=__twttrf.callback&'+'suppress_response_codes=true&rnd='+Math.random();}
|
35
|
-
head.appendChild(script);}},callback:function(data){if(data===undefined||data.body===undefined){inProgress=false;if(queue.length>0){twitterFetcher.fetch(queue[0]);queue.splice(0,1);}
|
36
|
-
return;}
|
37
|
-
if(!useEmoji){data.body=data.body.replace(/(<img[^c]*class="Emoji[^>]*>)|(<img[^c]*class="u-block[^>]*>)/g,'');}
|
38
|
-
if(!showImages){data.body=data.body.replace(/(<img[^c]*class="NaturalImage-image[^>]*>|(<img[^c]*class="CroppedImage-image[^>]*>))/g,'');}
|
39
|
-
if(!printUser){data.body=data.body.replace(/(<img[^c]*class="Avatar"[^>]*>)/g,'');}
|
40
|
-
var div=document.createElement('div');div.innerHTML=data.body;if(typeof(div.getElementsByClassName)==='undefined'){supportsClassName=false;}
|
41
|
-
function swapDataSrc(element){var avatarImg=element.getElementsByTagName('img')[0];avatarImg.src=avatarImg.getAttribute('data-src-2x');return element;}
|
42
|
-
var tweets=[];var authors=[];var times=[];var images=[];var rts=[];var tids=[];var permalinksURL=[];var x=0;if(supportsClassName){var tmp=div.getElementsByClassName('timeline-Tweet');while(x<tmp.length){if(tmp[x].getElementsByClassName('timeline-Tweet-retweetCredit').length>0){rts.push(true);}else{rts.push(false);}
|
43
|
-
if(!rts[x]||rts[x]&&showRts){tweets.push(tmp[x].getElementsByClassName('timeline-Tweet-text')[0]);tids.push(tmp[x].getAttribute('data-tweet-id'));if(printUser){authors.push(swapDataSrc(tmp[x].getElementsByClassName('timeline-Tweet-author')[0]));}
|
44
|
-
times.push(tmp[x].getElementsByClassName('dt-updated')[0]);permalinksURL.push(tmp[x].getElementsByClassName('timeline-Tweet-timestamp')[0]);if(tmp[x].getElementsByClassName('timeline-Tweet-media')[0]!==undefined){images.push(tmp[x].getElementsByClassName('timeline-Tweet-media')[0]);}else{images.push(undefined);}}
|
45
|
-
x++;}}else{var tmp=getElementsByClassName(div,'timeline-Tweet');while(x<tmp.length){if(getElementsByClassName(tmp[x],'timeline-Tweet-retweetCredit').length>0){rts.push(true);}else{rts.push(false);}
|
46
|
-
if(!rts[x]||rts[x]&&showRts){tweets.push(getElementsByClassName(tmp[x],'timeline-Tweet-text')[0]);tids.push(tmp[x].getAttribute('data-tweet-id'));if(printUser){authors.push(swapDataSrc(getElementsByClassName(tmp[x],'timeline-Tweet-author')[0]));}
|
47
|
-
times.push(getElementsByClassName(tmp[x],'dt-updated')[0]);permalinksURL.push(getElementsByClassName(tmp[x],'timeline-Tweet-timestamp')[0]);if(getElementsByClassName(tmp[x],'timeline-Tweet-media')[0]!==undefined){images.push(getElementsByClassName(tmp[x],'timeline-Tweet-media')[0]);}else{images.push(undefined);}}
|
48
|
-
x++;}}
|
49
|
-
if(tweets.length>maxTweets){tweets.splice(maxTweets,(tweets.length-maxTweets));authors.splice(maxTweets,(authors.length-maxTweets));times.splice(maxTweets,(times.length-maxTweets));rts.splice(maxTweets,(rts.length-maxTweets));images.splice(maxTweets,(images.length-maxTweets));permalinksURL.splice(maxTweets,(permalinksURL.length-maxTweets));}
|
50
|
-
var arrayTweets=[];var x=tweets.length;var n=0;if(dataOnly){while(n<x){arrayTweets.push({tweet:tweets[n].innerHTML,author:authors[n]?authors[n].innerHTML:'Unknown Author',author_data:{profile_url:authors[n]?authors[n].querySelector('[data-scribe="element:user_link"]').href:null,profile_image:authors[n]?authors[n].querySelector('[data-scribe="element:avatar"]').getAttribute('data-src-1x'):null,profile_image_2x:authors[n]?authors[n].querySelector('[data-scribe="element:avatar"]').getAttribute('data-src-2x'):null,screen_name:authors[n]?authors[n].querySelector('[data-scribe="element:screen_name"]').title:null,name:authors[n]?authors[n].querySelector('[data-scribe="element:name"]').title:null},time:times[n].textContent,timestamp:times[n].getAttribute('datetime').replace('+0000','Z').replace(/([\+\-])(\d\d)(\d\d)/,'$1$2:$3'),image:extractImageUrl(images[n]),rt:rts[n],tid:tids[n],permalinkURL:(permalinksURL[n]===undefined)?'':permalinksURL[n].href});n++;}}else{while(n<x){if(typeof(formatterFunction)!=='string'){var datetimeText=times[n].getAttribute('datetime');var newDate=new Date(times[n].getAttribute('datetime').replace(/-/g,'/').replace('T',' ').split('+')[0]);var dateString=formatterFunction(newDate,datetimeText);times[n].setAttribute('aria-label',dateString);if(tweets[n].textContent){if(supportsClassName){times[n].textContent=dateString;}else{var h=document.createElement('p');var t=document.createTextNode(dateString);h.appendChild(t);h.setAttribute('aria-label',dateString);times[n]=h;}}else{times[n].textContent=dateString;}}
|
51
|
-
var op='';if(parseLinks){if(targetBlank){targetLinksToNewWindow(tweets[n]);if(printUser){targetLinksToNewWindow(authors[n]);}}
|
52
|
-
if(printUser){op+='<div class="user">'+strip(authors[n].innerHTML)+'</div>';}
|
53
|
-
op+='<p class="tweet">'+strip(tweets[n].innerHTML)+'</p>';if(printTime){if(permalinks){op+='<p class="timePosted"><a href="'+permalinksURL[n]+'">'+times[n].getAttribute('aria-label')+'</a></p>';}else{op+='<p class="timePosted">'+
|
54
|
-
times[n].getAttribute('aria-label')+'</p>';}}}else{if(tweets[n].textContent){if(printUser){op+='<p class="user">'+authors[n].textContent+'</p>';}
|
55
|
-
op+='<p class="tweet">'+tweets[n].textContent+'</p>';if(printTime){op+='<p class="timePosted">'+times[n].textContent+'</p>';}}else{if(printUser){op+='<p class="user">'+authors[n].textContent+'</p>';}
|
56
|
-
op+='<p class="tweet">'+tweets[n].textContent+'</p>';if(printTime){op+='<p class="timePosted">'+times[n].textContent+'</p>';}}}
|
57
|
-
if(showInteractionLinks){op+='<p class="interact"><a href="https://twitter.com/intent/'+'tweet?in_reply_to='+tids[n]+'" class="twitter_reply_icon"'+
|
58
|
-
(targetBlank?' target="_blank">':'>')+'Reply</a><a href="https://twitter.com/intent/retweet?'+'tweet_id='+tids[n]+'" class="twitter_retweet_icon"'+
|
59
|
-
(targetBlank?' target="_blank">':'>')+'Retweet</a>'+'<a href="https://twitter.com/intent/favorite?tweet_id='+
|
60
|
-
tids[n]+'" class="twitter_fav_icon"'+
|
61
|
-
(targetBlank?' target="_blank">':'>')+'Favorite</a></p>';}
|
62
|
-
if(showImages&&images[n]!==undefined&&extractImageUrl(images[n])!==undefined){op+='<div class="media">'+'<img src="'+extractImageUrl(images[n])+'" alt="Image from tweet" />'+'</div>';}
|
63
|
-
if(showImages){arrayTweets.push(op);}else if(!showImages&&tweets[n].textContent.length){arrayTweets.push(op);}
|
64
|
-
n++;}}
|
65
|
-
handleTweets(arrayTweets);inProgress=false;if(queue.length>0){twitterFetcher.fetch(queue[0]);queue.splice(0,1);}}};window.__twttrf=twitterFetcher;window.twitterFetcher=twitterFetcher;return twitterFetcher;}));
|
66
|
-
|
67
|
-
|
68
|
-
var twitterConfig = {
|
69
|
-
"profile": {"screenName": 'LinaroOrg'},
|
70
|
-
"dataOnly": true,
|
71
|
-
"maxTweets": 4,
|
72
|
-
"enableLinks": true,
|
73
|
-
"showUser": true,
|
74
|
-
"showImages": true,
|
75
|
-
"showTime": true,
|
76
|
-
"dateFunction": '',
|
77
|
-
"showRetweet": true,
|
78
|
-
"showInteraction": true,
|
79
|
-
"customCallback": populateTpl,
|
80
|
-
};
|
81
|
-
|
82
|
-
function populateTpl(tweets){
|
83
|
-
|
84
|
-
var element = document.getElementById('linaro-latest-tweets');
|
85
|
-
|
86
|
-
var html = '';
|
87
|
-
|
88
|
-
for (var i = 0, lgth = tweets.length; i < lgth ; i++) {
|
89
|
-
|
90
|
-
var tweetObject = tweets[i];
|
91
|
-
|
92
|
-
// console.log(tweetObject);
|
93
|
-
|
94
|
-
html += '<div class="col-xs-12 col-sm-4 col-md-3 linaro-tweet tweet-id-' + i + '">'
|
95
|
-
+ '<div class="tweet-inner">'
|
96
|
-
+ '<div class="tweet-header">'
|
97
|
-
+ '<div class="col-xs-2 tweet-user-img">'
|
98
|
-
+ '<a href="' + tweetObject.author_data.profile_url + '"><img class="img-circle" src="' + tweetObject.author_data.profile_image + '" alt="' + tweetObject.author_data.screen_name+' Twitter Profile Photo"/></a>'
|
99
|
-
+ '</div>'
|
100
|
-
+ '<div class="col-xs-9 tweet-user-name">'
|
101
|
-
+ '<a href="' + tweetObject.author_data.profile_url + '"><h3>'+ tweetObject.author_data.name + '</h3></a>'
|
102
|
-
+ '<a href="' + tweetObject.author_data.profile_url + '"><small>'+ tweetObject.author_data.screen_name + '</small></a>'
|
103
|
-
+ '</div>'
|
104
|
-
+ '<div class="col-xs-1 twitter-bird"><a href="' + tweetObject.author_data.profile_url + '"><i class="icon-twitter"></i></a></div>'
|
105
|
-
+ '</div>'
|
106
|
-
+ '<div class="tweet-inner-content">'
|
107
|
-
+ '<p class="tweet-content">' + tweetObject.tweet + '</p>'
|
108
|
-
+ (tweetObject.image ? '<div class="tweet-img"><img src="'+tweetObject.image+'" /></div>' : '')
|
109
|
-
+ '</div>'
|
110
|
-
+ '<div class="tweet-footer">'
|
111
|
-
+ '<p class="interact">'
|
112
|
-
+ '<a href="https://twitter.com/intent/' + 'tweet?in_reply_to=' + tweetObject.tid +'" class="twitter_reply_icon"' + 'target="_blank">'
|
113
|
-
+ '<i class="glyphicon glyphicon-comment"></i></a><a href="https://twitter.com/intent/retweet?' + 'tweet_id=' + tweetObject.tid + '" class="twitter_retweet_icon"' + 'target="_blank">'
|
114
|
-
+ '<i class="glyphicon glyphicon-retweet"></i></a>'
|
115
|
-
+ '<a href="https://twitter.com/intent/favorite?tweet_id=' + tweetObject.tid + '" class="twitter_fav_icon"' + 'target="_blank">' + '<i class="glyphicon glyphicon-heart-empty"></i></a></p>'
|
116
|
-
+ '<p class="tweet-infos"> Posted <span class="time">' + tweetObject.time + '</span></p>'
|
117
|
-
+ '</div>'
|
118
|
-
+ '</div>'
|
119
|
-
+ '</div>';
|
120
|
-
}
|
121
|
-
|
122
|
-
element.innerHTML = html;
|
123
|
-
|
124
|
-
}
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
twitterFetcher.fetch(twitterConfig);
|