<link href='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css' rel='stylesheet' type='text/css'/>
<b:if cond='data:blog.pageType == "item"'>
<style type='text/css'>
.related-posts .panel{position:relative}
.related-posts .label{position:absolute;top:15px;left:15px}
</style>
<div class='related-posts' id='related-posts'/>
<script type='text/javascript'>
/**
* Related Post Widget for Blogger
* by Taufik Nurrohman
* https://github.com/tovic
*/
var labelArray = [<b:if cond='data:post.labels'><b:loop values='data:post.labels' var='label'> "<data:label.name/>"<b:if cond='data:label.isLast != "true"'>,</b:if> </b:loop></b:if>];
var rPC = {
homePage: "<data:blog.homepageUrl/>",
widgetTtitle: "<h3 class='text-uppercase'><i class='fa fa-tags'/> Related Post</h3>",
numberPosts: 4,
thumbnailSize: "w480-h320-p-nu",
noImage: "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd2Fr5GddATxwS_0bs-cxmKHXa3YojlK5wNyGnQnnJqHKmqcBDFvf302IlN_0iEOK87zH0RwslkQLyIfZM_kydB1sH-oRXFaKNThIsFS1hEFDBalFd7sjKG3RErgpfSXz-suQPifBgD14/w262-c-h252/images.png",
containerID: "related-posts",
targetBlank: false,
callBack: function() {}
}
//<![CDATA[
function ini(){for(var a in rPC)a="undefined"==rPC?a:rPC;var b=function(a){var b=document.createElement("script");b.type="text/javascript",b.src=a,document.body.appendChild(b)},c=function(a,b){return Math.floor(Math.random()*(b-a+1))+a},d=function(a){var c,d,b=a.length;if(0===b)return!1;for(;--b;)c=Math.floor(Math.random()*(b+1)),d=a[b],a[b]=a[c],a[c]=d;return a},e="object"==typeof labelArray&&labelArray.length>0?"/-/"+d(labelArray)[0]:"",f=function(d){var f=d.feed.openSearch$totalResults.$t-a.numberPosts,g=c(1,f>0?f:1);b(a.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&start-index="+g+"&max-results="+a.numberPosts+"&callback=sRP")},g=function(b){var i,j,k,l,c=document.getElementById(a.containerID),e=d(b.feed.entry),f=a.widgetTtitle + '<div class="row">',g=a.targetBlank?' target="_blank"':"";if(c){for(var n=0;n<a.numberPosts&&n!=e.length;n++){j=e[n].title.$t,tag=e[n].category[0].term,k="auto"!==a.tL&&a.tL<j.length?j.substring(0,a.tL)+"…":j,l="media$thumbnail"in e[n]&&a.tS!==!1?e[n].media$thumbnail.url.replace(/s72-c/,a.thumbnailSize):a.noImage;for(var o=0,p=e[n].link.length;o<p;o++)i="alternate"==e[n].link[o].rel?e[n].link[o].href:"#";f+='<div class="col-xs-6 col-sm-6 col-md-3 mobile"><div class="panel panel-custom"><a href="'+i+" "+g+'"><img class="img-responsive" alt="'+j+'" src="'+l+'" /></a><span class="label label-info">'+tag+'</span><div class="panel-footer"><h4 class="panel-title"><a href="'+i+" "+g+'">'+j+'</a></h4></div></div></div>'}c.innerHTML=f + '</div>',a.callBack()}};rRI=f,sRP=g,b(a.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=rRI")}window.onload=ini;
//]]>
</script>
</b:if>