link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
var tmb = img[i].replace('s1600/','s500-c/');
if(i===0) {
var trtd1 = '<div class="left-box-wrapper clearfix"><div class="left-box left1" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(i===1) {
var trtd2 = '<div class="left-box left2" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div></div>';
}
if(i===2) {
var trtd3 = '<div class="center-box clearfix" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(i===3) {
var trtd4 = '<div class="right-box-wrapper clearfix"><div class="right-box right1" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(i===4) {
var trtd5 = '<div class="right-box right2" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div></div>';
}
if(sliderTitle === "slider1") {
slider.html(trtd1 + trtd2 + trtd3 + trtd4 + trtd5);
}
if(sliderTitle === "slider2") {
slider.html(trtd3 + trtd1 + trtd2 + trtd4 + trtd5);
}
}
}
});
} else if(sliderContent.charAt(0) === "[") {
$.ajax({
url: "/feeds/posts/default?alt=json-in-script",
type: "get",
dataType: "jsonp",
success: function (e) {
var r = sliderContent.match(/[^[\]]+(?=])/g);
var postsLength = e.feed.entry.length;
for (var i = 0; i < postsLength; i++) {
var entry = e.feed.entry[i];
var posttitle = entry.title.$t.toLowerCase();
if(r[0].toLowerCase() === posttitle) {
var img = new Array();
var posturl;
var category = '<a class="post-category" href="/search/label/'+e.feed.entry[i].category[0].term+'?max-results=7">'+e.feed.entry[i].category[0].term+'</a>';
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
var tmb = img[i].replace('s1600/','s500-c/');
var trtd1 = '<div class="left-box-wrapper clearfix"><div class="left-box left1" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(r[1].toLowerCase() === posttitle) {
var img = new Array();
var posturl;
var category = '<a class="post-category" href="/search/label/'+e.feed.entry[i].category[0].term+'?max-results=7">'+e.feed.entry[i].category[0].term+'</a>';
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
var tmb = img[i].replace('s1600/','s500-c/');
var trtd2 = '<div class="left-box left2" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div></div>';
}
if(r[2].toLowerCase() === posttitle) {
var img = new Array();
var posturl;
var category = '<a class="post-category" href="/search/label/'+e.feed.entry[i].category[0].term+'?max-results=7">'+e.feed.entry[i].category[0].term+'</a>';
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
var tmb = img[i].replace('s1600/','s500-c/');
var trtd3 = '<div class="center-box clearfix" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
Back to home |
File page
Subscribe |
Register |
Login
| N