Thursday, 11 December 2014

RELATED POST WIDGET FRONT SCREEN TEMPLATE

RELATED POST WIDGET FRONT SCREEN TEMPLATE



----------------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW  CODE
-----------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<title><data:blog.pageTitle/></title>
<b:skin><![CDATA[/*
-----------------------------------------------
Blogger Template Style
Name: GENERIC BLOGGER TEMPLATE
Design by : FBGadgets
URL : http://fbgadgets.blogspot.co.uk/
----------------------------------------------- */
/* Variable definitions
   ====================
<Variable name="maincolor" description="Main Color" type="color" default="#FF5848" value="#FF5848"/>
<Group description="Body Object" selector="body">
<Variable name="body.font" description="Body font" type="font" default="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif" value="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
<Variable name="body.background.color" description="Outer Background" type="color" default="#f0f0f0" value="#f0f0f0"/>
</Group>
<Group description="Post Title" selector=".item .title, .post-title, .">
<Variable name="post.title.font" description="Post Title Font" type="font" default="normal bold 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif" value="normal bold 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
</Group>
<Group description="Widget Title" selector="#side .widget h2">
<Variable name="widget.title.font" description="Widget Title Font" type="font" default="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif" value="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
</Group>
*/

/* RESET */
* {max-width: 100%;line-height: 1.5em;}
img {height: auto;}
body {
font:$(body.font);
padding: 0;
background: $(body.background.color);
word-wrap: break-word;
}

.hide {display:none}
.widget,.section {
margin: 0;
}
a {color: $(maincolor);text-decoration: none;}
a:hover {text-decoration: underline;}
/* FRAME */
#wrapper {
width: 960px;
margin: auto;
background: white;
-moz-box-shadow: 0 0 10px #BBB;
-webkit-box-shadow: 0 0 10px #BBB;
box-shadow: 0 0 10px #BBB;
}
#header .widget h2 {
display: none;
}
/* PRIMARY --------------------------------------- */
#primary {
margin: 0 30px;
}
/* Home */
#main {
float: left;
width: 630px;
padding: 0 0 30px 0;
}
#main .widget {
display: none;
}
#main .widget.Blog {
display: block;
}
.home-index img {
max-width: 5000%;
}
.home-index .thumb {
overflow: hidden;
}
.home-index .item .thumb {
height: 50px;
width: 50px;
float: left;
margin-right: 15px;
overflow: hidden;
background: #f8f8f8;
}
.home-index .item .title {
font: $(post.title.font);
margin: -4px 0 0 65px;
padding: 0;
}
.home-index .item .title a {
color: black;
}
.home-index .item .meta {
font-size: 12px;
font-style: italic;
color: #999;
margin: 0 0 0 65px;
}
.home-index .label-link {
background: #f0f0f0;
font-size: 16px;
padding: 10px 15px;
font-weight: normal;
text-transform: uppercase;
border-bottom: 1px solid #ddd;
}
.home-index .label-link a {
color: $(maincolor);
padding-left: 0.5em;
border-left: 1.2em solid $(maincolor);
font-family: courier;
}
.home-index .hot {
border: 1px solid #DDD;
margin: 20px 0 0 0;
}
.home-index .hot .item.item-0 {
width: 300px;
border: none;
padding: 0;
border-left: 1px solid #DDD;
display: block;
line-height: 1px;
float: right;
}
.home-index .hot .item {
float: left;
width: 287px;
padding: 20px;
position: relative;
border-bottom: 1px solid #DDD;
}
.home-index .hot .item.item-0 .thumb {
height: 300px;
width: 300px;
float: none;
margin: 0;
}
.home-index .hot .item.item-0 h2.title {
background: #f0f0f0;
padding: 15px;
margin: 0;
font-size: 20px;
}
.home-index .hot .item.item-0 h2.title a {
color: $(maincolor);
}
.home-index .hot .item.item-0 .meta {
margin: 5px 15px;
border-bottom: 1px solid #DDD;
padding: 5px 0;
}
.home-index .hot .item.item-0 .snip {
font-size: 14px;
margin: 0 15px 15px 15px;
color: #666;
}
.home-index .hot .item.item-5 {
border: none;
}
.home-index .wide {
margin: 30px 0 0 0;
border: 1px solid #ddd;
}
.home-index .wide .item {
float: left;
padding: 20px;
width: 297px;
border-bottom: 1px solid #ddd;
}
.home-index .wide .item.item-0 .thumb {
height: 250px;
width: 250px;
margin: 0;
}
.home-index .wide .item.item-0 {
width: 250px;
border-right: 1px solid #ddd;
border-bottom: 0;
}
.home-index .wide .item.item-0 .title {
padding: 8px 0 0 0;
font-size: 20px;
clear: both;
display: block;
margin: 0;
}
.home-index .wide .item.item-0 .title a {
color: $(maincolor);
}
.home-index .wide .item.item-0 .meta {
margin: 0;
padding: 5px 0;
}
.home-index .wide .item.item-4 {
border: none;
}
.home-index .small {
display: inline-block;
vertical-align: top;
width: 300px;
border: 1px solid #ddd;
margin: 30px 0 0 0;
}
.home-index .small .item {
float: left;
padding: 20px;
border-bottom: 1px solid #ddd;
width: 260px;
}
.home-index .small .item.item-0 .thumb {
margin: 0;
width: 260px;
height: 260px;
}
.home-index .small .item.item-0 .title {
padding: 10px 0 5px 0;
clear: both;
margin: 0;
font-size: 20px;
}
.home-index .small .item.item-0 .title a {
color: $(maincolor);
}
.home-index .small .item.item-0 .meta {
margin: 0;
}
.home-index .small.small-last {
margin-left: 26px;
}
/* Index */
.index-thumbnail {
width: 170px;
height: 170px;
overflow: hidden;
float: left;
position: relative;
z-index: 1;
margin: 0 15px 0 0;
}
.index-thumbnail img {
max-width: 50000px;
}
.index-nothumb {
overflow: hidden;
float: left;
position: relative;
z-index: 100;
margin: 0;
width: 15px;
height: 170px;
}
.post-index {
border: 1px solid #ddd;
margin: 10px 0 20px 0;
}
.post-index .post-title {
font: $(post.title.font);
font-size: 16px;
padding: 10px 15px 10px 0;
background: #f8f8f8;
position: relative;
z-index: 0;
}
.post-index .post-title.entry-title a {
padding: 0;
}
.post-index .meta {
font-size: 10px;
font-style: italic;
color: #999;
padding: 10px 0;
}
.post-index .meta .author {
padding: 0;
}
.post-index .snip {
margin: 0;
padding: 0 15px 0 0;
font-size: 14px;
color: #666;
}
#blog-pager a {
text-transform: uppercase;
font-size: 10px;
font-weight: bold;
}
/* Static */
.static_page #main {
width: 100%;
}
/* Single */
.post-single {
border: 1px solid #ddd;
margin: 20px 0 0 0;
padding: 20px;
}
.post-single a {
margin: 0!important;
}
.post-single img {
border: none;
background: #ddd;
}
.post-single .post-title {
font: $(post.title.font);
font-size: 24px;
font-weight: normal;
}
.post-single .post-header {
font-size: 12px;
font-style: italic;
margin: 0 0 15px 0;
padding: 0 0 5px 0;
border-bottom: 1px solid #ddd;
color: #ccc;
}
.post-single .post-timestamp {
margin: 0;
}
.post-single .post-labels {
display: block;
text-align: right;
font-size: 12px;
margin: 1em 0 0 0;
}
.post-single .post-labels a {
padding: 3px 10px;
background: $(maincolor);
color: white;
}
.post-single .reaction-buttons {
display: block;
background: #f0f0f0;
padding: 5px 10px 0 10px;
font-size: 12px;
margin: 1em 0 0 0;
border: 1px solid #ddd;
}
.post-single .reaction-buttons iframe {
margin: 3px 0 0 0;
}
.post-single .post-location {
display: block;
text-align: right;
margin: 1em 0 0 0;
font-size: 12px;
font-weight: bold;
}
.post-share-buttons {
margin: 0;
padding: 20px 20px 15px 20px;
border: 1px solid #ddd;
display: block;
border-top: none;
}
/* Footer
----------------------------------------------- */
#footer {
width:960px;
height:70px;
clear:both;
margin:0 auto;
line-height: 1.6em;
text-transform:uppercase;
letter-spacing:.1em;
text-align: center;
border: 2px solid Black;
background-color:Transparent;
background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-GA4PodUgVFpdJ37K_Qn8kkM3zKRuescVpLSYSWejy0_1bj3FZFNoGQWqHSg9EXOPwaPO_2HnV9Hfc3DE03RfxWo2qNtDbhmZXPVcXXjvdZ6k2OCcTnVQnVEvfn5e3Wq7Tkui9eatMR2/s1600/960X70.gif);
}
/* FORMAT -------------------------------------- */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
margin: 1em 0 0.3em 0;
}
.post-body blockquote {
background: #f8f8f8;
display:block;
padding: 1em 2em;
color: #666;
font-style:italic;
border-left: 5px solid $(maincolor);
margin:1em 0;
}
/* RESPONSIVE */
/* responsive menu default style */
.selectnav { display: none; }
@media screen and (max-width: 960px) {
}
@media screen and (max-width: 959px) {
/* responsive menu small screen */
.js #nav { display: none; }
.js .selectnav { display: block; }
#wrapper {
width: 690px;
}
#main {
float: none;
}
@media screen and (max-width: 689px) {
#primary {
margin: auto;
width: 630px;
}
}
@media screen and (max-width: 629px) {
.home-index > div {
border-left: none!important;
border-right: none!important;
width: 100%!important;
float: none!important;
margin-left: 0!important;
}
.home-index .item {
width: 100%!important;
border-left: none!important;
border-bottom: 1px solid #ddd!important;
height: auto!important;
padding: 20px!important;
width: auto!important;
float: none!important;
}
.home-index .item .thumb {
height: 50px!important;
width: 50px!important;
float: left!important;
margin-right: 15px!important;
}
.home-index .item .title {
display: inline!important;
padding: 0!important;
background: none!important;
margin: 0!important;
}
.home-index .item .meta {
margin: 0!important;
border: none!important;
}
.home-index .hot .item.item-0 .snip {
margin: 1em 0 0 0!important;
}
#footer .top a {
display: block;
clear: both;
}
.post-index .snip {
display: none;
}
.index-thumbnail {
height: 100px;
width: 100px;
}
}
@media screen and (max-width: 359px) {
#newsletter-follow .widget.LinkList ul li a {
display: block;
margin: 0;
}
#newsletter-follow .widget.LinkList ul li {
display: block;
}
}
]]></b:skin>



<b:template-skin>
<b:variable default='960px' name='content.width' type='length'/>
<b:variable default='0' name='main.column.left.width' type='length'/>
<b:variable default='310px' name='main.column.right.width' type='length'/>
<![CDATA[

/* LAYOUT DESIGN */
body#layout {}
}
body#layout * {
max-width: 100%;
}
body#layout {
background: #f0f0f0;
}
body#layout #wrapper {
width: 94%;
margin: auto;
}
body#layout .widget {
display:block;
}
body#layout .section > div {
filter: alpha(opacity=90);
opacity: 0.9;
}
body#layout .section > div:hover {
filter: alpha(opacity=100);
opacity: 1;
}
body#layout #page-list-search {
background: #272727;
margin: 50px 0 0 0;
height: 50px;
padding: 3px 0 0 0;
}
body#layout #page-list-search .widget, body#layout #newsletter-follow .widget {
display: inline-block;
width: 49%;
float: left;
margin: 0;
padding: 0 0 0 5px;
}
body#layout #logo-ads {
background: white;
height: 50px;
padding: 5px 0 0 0;
margin: 10px 0 0 0;
}
body#layout #logo-ads .widget {
float: left;
width: 49%;
margin: 0;
padding: 0 0 0 5px;
}
body#layout #drop-menu {
background: #f8f8f8;
border: 1px solid #ddd;
margin: 10px 0 0 0;
padding: 3px 0 0 0;
}
body#layout #newsletter-follow {
background: #272727;
height: 50px;
padding: 3px 0 0 0;
margin: 10px 0 0 0;
}
body#layout #main {
float: left;
width: 60%;
padding: 3px 0 0 0;
margin: 10px 0;
background: white;
}
body#layout #side {
float: left;
width: 38%;
margin: 10px 0 0 2%;
padding: 3px 0 0 0;
background: white;
}
]]>
</b:template-skin>



<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>

</head>
<body expr:class='data:blog.pageType'>

<div id='wrapper'>


<!-- PRIMARY -->
<div id='primary'>

<b:section id='main' maxwidgets='2'>
<b:widget id='Label1' locked='true' title='Index Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div expr:class='&quot;widget-content &quot; + data:display + &quot;-label-widget-content&quot;'>
<b:if cond='data:display == &quot;list&quot;'>
<ul>
<b:loop values='data:labels' var='label'>
<li>
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'><data:label.name/></span>
<b:else/>
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'><data:label.name/></a>
</b:if>
<b:if cond='data:showFreqNumbers'>
<span dir='ltr'>(<data:label.count/>)</span>
</b:if>
</li>
</b:loop>
</ul>
<b:else/>
<b:loop values='data:labels' var='label'>
<span expr:class='&quot;label-size label-size-&quot; + data:label.cssSize'>
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'><data:label.name/></span>
<b:else/>
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'><data:label.name/></a>
</b:if>
<b:if cond='data:showFreqNumbers'>
<span class='label-count' dir='ltr'>(<data:label.count/>)</span>
</b:if>
</span>
</b:loop>
</b:if>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main' var='top'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<div class='home-index'>
<div class='author-label hide'><data:top.authorLabel/></div>
</div>
<b:else/>
<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<div class='page-404'>
<style type='text/css'>@import url(http://fonts.googleapis.com/css?family=Geo);</style><h1 style='font-family:Geo;font-size:120px;color:#666;letter-spacing:0;font-weight:bold;font-style:normal;text-decoration:initial;text-align:center;text-shadow:#eee 5px 5px 0,#707070 7px 7px 0'>404 Oops.</h1>
<span>Snap! Looks like you&#39;ve messed up and got nothing, it&#39;s time to go <a href='/'>back home!</a></span>
</div>
<b:else/>
<data:defaultAdStart/>
<b:loop values='data:posts' var='post'>
<b:include data='post' name='post'/>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<b:include data='post' name='comment_picker'/>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:include data='post' name='comment_picker'/>
</b:if>
</b:loop>
<data:adEnd/>
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<b:include name='nextprev'/>
</b:if>
</b:if>
</b:if>
</b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'></b:includable>
<b:includable id='backlinks' var='post'></b:includable>
<b:includable id='comment-form' var='post'></b:includable>
<b:includable id='commentDeleteIcon' var='comment'></b:includable>
<b:includable id='comment_count_picker' var='post'></b:includable>
<b:includable id='comment_picker' var='post'></b:includable>
<b:includable id='comments' var='post'></b:includable>
<b:includable id='feedLinks'></b:includable>
<b:includable id='feedLinksBody' var='links'></b:includable>
<b:includable id='iframe_comments' var='post'></b:includable>
<b:includable id='mobile-index-post' var='post'></b:includable>
<b:includable id='mobile-main' var='top'></b:includable>
<b:includable id='mobile-nextprev'></b:includable>
<b:includable id='mobile-post' var='post'></b:includable>
<b:includable id='nextprev'></b:includable>

<b:includable id='post' var='post'>
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<b:include data='post' name='post-index'/>
<b:else/>
<b:if cond='data:blog.pageType == &quot;archive&quot;'>
<b:include data='post' name='post-index'/>
<b:else/>
<b:include data='post' name='post-single'/>
</b:if>
</b:if>
</b:includable>
<b:includable id='post-index' var='post'>
<div class='post-index'>
<a expr:name='data:post.id'/>
<b:if cond='data:post.thumbnailUrl'>
<div class='index-thumbnail'>
<a expr:href='data:post.url'>
<img expr:src='data:post.thumbnailUrl'/>
</a>
</div>
<b:else/>
<b:if cond='data:post.firstImageUrl'>
<div class='index-thumbnail'>
<a expr:href='data:post.url'>
<img expr:src='data:post.firstImageUrl'/>
</a>
</div>
<b:else/>
<div class='index-nothumb'/>
</b:if>
</b:if>
<div class='content'>
<h2 class='post-title entry-title'>
<a expr:href='data:post.url'><data:post.title/></a>
</h2>
<div class='meta'>
<b:if cond='data:post.authorProfileUrl'>
<a class='author' expr:href='data:post.authorProfileUrl' rel='author' title='author profile'>
<span><data:post.author/></span>
</a>
<b:else/>
<span class='author' itemprop='name'><data:post.author/></span>
</b:if>
<span class='separate'>. </span>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'>
<abbr class='published' expr:title='data:post.timestampISO8601' itemprop='datePublished'>
<data:post.timestamp/>
</abbr>
</a>
<b:if cond='data:post.allowComments'>
<span class='separate'>. </span>
<b:include data='post' name='comment_count_picker'/>
</b:if>
</div>
<div class='snip'><data:post.snippet/></div>
<b:include data='post' name='postQuickEdit'/>
</div>
<div class='clear'/>
</div>
<div class='clear'/>
</b:includable>
<b:includable id='post-single' var='post'>
<div class='post post-single hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
<b:if cond='data:post.firstImageUrl'>
<meta expr:content='data:post.firstImageUrl' itemprop='image_url'/>
</b:if>
<meta expr:content='data:blog.blogId' itemprop='blogId'/>
<meta expr:content='data:post.id' itemprop='postId'/>
<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<h1 class='post-title entry-title' itemprop='name'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<b:if cond='data:blog.url != data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h1>
</b:if>
<div class='post-header'>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<span class='post-author vcard'>
<b:if cond='data:top.showAuthor'>
<b:if cond='data:post.authorProfileUrl'>
<span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'>
<meta expr:content='data:post.authorProfileUrl' itemprop='url'/>
<a expr:href='data:post.authorProfileUrl' rel='author' title='author profile'>
<span itemprop='name'><data:post.author/></span>
</a>
</span>
<b:else/>
<span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'>
<span itemprop='name'><data:post.author/></span>
</span>
</b:if>
</b:if>
</span>
<span class='separate'>.</span>
<span class='post-timestamp'>
<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<meta expr:content='data:post.canonicalUrl' itemprop='url'/>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601' itemprop='datePublished'><data:post.timestamp/></abbr></a>
</b:if>
</b:if>
</span>
</b:if>
<span class='post-comment-link'>
<b:if cond='data:post.allowComments'>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<span class='separate'>.</span>
</b:if>
<b:include data='post' name='comment_count_picker'/>
</b:if>
</span>
<b:include data='post' name='postQuickEdit'/>
</div>
<b:if cond='data:blog.metaDescription == &quot;&quot;'>
<div class='post-body entry-content' expr:id='&quot;post-body-&quot; + data:post.id' itemprop='description articleBody'>
<data:post.body/>
<div style='clear:both'/>
</div>
<b:else/>
<div class='post-body entry-content' expr:id='&quot;post-body-&quot; + data:post.id' itemprop='articleBody'>
<data:post.body/>
<div style='clear:both'/>
</div>
</b:if>
<div class='post-footer'>
<b:if cond='data:top.showLocation'>
<b:if cond='data:post.location'>
<span class='post-location'>
<data:postLocationLabel/>
<a expr:href='data:post.location.mapsUrl' target='_blank'><data:post.location.name/></a>
</span>
</b:if>
</b:if>
<b:if cond='data:post.labels'>
<span class='post-labels'>
<data:postLabelsLabel/>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'><data:label.name/></a>
</b:loop>
</span>
</b:if>
<b:if cond='data:top.showReactions'>
<span class='reaction-buttons'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>
<td class='reactions-label-cell' nowrap='nowrap' valign='top' width='1%'>
<span class='reactions-label'>
<data:top.reactionsLabel/></span>&#160;</td>
<td><iframe allowtransparency='true' class='reactions-iframe' expr:src='data:post.reactionsUrl' frameborder='0' name='reactions' scrolling='no'/></td>
</tr></table>
</span>
</b:if>
</div>
</div>
<b:if cond='data:post.sharePostUrl'>
<div class='post-share-buttons'>
<b:include data='post' name='shareButtons'/>
</div>
</b:if>
</b:includable>


<b:includable id='postQuickEdit' var='post'></b:includable>
<b:includable id='shareButtons' var='post'></b:includable>
<b:includable id='status-message'></b:includable>
<b:includable id='threaded-comment-form' var='post'></b:includable>
<b:includable id='threaded_comment_js' var='post'></b:includable>
<b:includable id='threaded_comments' var='post'></b:includable>
</b:widget>
</b:section>
  
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;error_page&quot;'>
<b:section id='side'/>
</b:if>
</b:if>
<div class='clear'/>
</div>
<div class='clear'>&#160;</div>
<div id='footer-wrapper'>
<b:section class='footer' id='footer'/>
</div>
</div>



<!-- SCRIPTS -->
<script type='text/javascript'>
//<![CDATA[
var date_format = 'mm/dd/yyyy';
var snip_length = 150;
var no_thumb = 'http://www.google.com/images/errors/robot.png';
var search_engine = 'https://www.google.com/search';
function substr_(str,key)
{
if(str==null)
{
str='';
return str
}
var index=str.indexOf(key);
if(index!=-1)
{
return str.substring(index+key.length)
}
return str
}
function bi_get_first_image(content)
{
src='';
key0='\u003cimg ';
key1='src\u003d\"';
key2='\"';
index0=content.indexOf(key0);
if(index0!=-1)
{
index1=content.indexOf(key1,index0);
if(index0!=-1)
{
index2=content.indexOf(key2,index1+key1.length);
if(index0!=-1)
{
src=content.substring(index1+key1.length,index2)
}
}
}
if(src=='')
{
key0='data-thumbnail-src\u003d\"';
key1='\"';
index0=content.indexOf(key0);
if(index0!=-1)
{
index1=content.indexOf(key1,index0+key0.length);
if(index0!=-1)
{
src=content.substring(index0+key0.length,index1)
}
}
}
if(src=='')
{
key0='\u003ciframe ';
key1='src\u003d\"';
key2='\"';
index0=content.indexOf(key0);
if(index0!=-1)
{
index1=content.indexOf(key1,index0);
if(index0!=-1)
{
index2=content.indexOf(key2,index1+key1.length);
if(index0!=-1)
{
src=content.substring(index1+key1.length,index2);
src=src.replace('http://www.youtube.com/watch?v=','');
src=src.replace('http://www.youtube.com/embed/','');
src=src.replace('?rel=0','');
src='http://img.youtube.com/vi/'+src+'/mqdefault.jpg'
}
}
}
}
return src
}
function bi_date_format(pub_date,format)
{
pub_date=pub_date.split('-');
date=new Date(pub_date[0],pub_date[1]-1,pub_date[2].substring(0,2));
dd=date.getDate()+1;
mm=date.getMonth()+1;
yyyy=date.getFullYear();
format=format.replace('dd',dd);
format=format.replace('mm',mm);
format=format.replace('yyyy',yyyy);
return format
}
function bi_script(url)
{
document.write('<script type="text/JavaScript" src="'+url+'"><\/script>')
}
function bi_jshort(json)
{
var blog=new Object();
var re=/<\S[^>]*>/g;
blog.id=json.feed.id.$t;
key='blog-';
index=blog.id.indexOf(key);
blog.id=blog.id.substring(index+key.length);
blog.id=blog.id.replace('.comments','');
blog.cate=new Array();
if('category'in json.feed)
{
for(i=0;
i<json.feed.category.length; i++) { blog.cate[i]=json.feed.category[i].term } } blog.title=''; if('title'in json.feed) { blog.title=json.feed.title.$t } blog.subtitle=''; if('subtitle'in json.feed) { blog.subtitle=json.feed.subtitle.$t } blog.admin=new Object(); blog.admin.name='Anonymous'; blog.admin.uri=''; blog.admin.avatar='http://img1.blogblog.com/img/anon36.png'; if('name'in json.feed.author[0]) { blog.admin.name=json.feed.author[0].name.$t } if('uri'in json.feed.author[0]) { blog.admin.uri=json.feed.author[0].uri.$t } if('gd$image'in json.feed.author[0]) { if(json.feed.author[0].gd$image.src!='http://img1.blogblog.com/img/blank.gif') { blog.admin.avatar=json.feed.author[0].gd$image.src } } blog.total_entry=Number(json.feed.openSearch$totalResults.$t); blog.start_index=Number(json.feed.openSearch$startIndex.$t); blog.item_per_page=Number(json.feed.openSearch$itemsPerPage.$t); blog.entry_number=0; if('entry'in json.feed) { blog.entry_number=json.feed.entry.length } blog.entry=new Array(); for(i=0; i<blog.entry_number; i++) { blog.entry[i]=new Object(); temp=new Object(); entry=json.feed.entry[i]; temp.id=entry.id.$t; key='post-'; index=temp.id.indexOf(key); temp.id=temp.id.substring(index+key.length); temp.published=''; if('published'in entry) { temp.published=entry.published.$t } temp.cate=new Array(); if('category'in entry) { for(j=0; j<entry.category.length; j++) { temp.cate[j]=entry.category[j].term } } temp.title=''; if('title'in entry) { temp.title=entry.title.$t } temp.content=''; if('content'in entry) { temp.content=entry.content.$t } temp.summary=''; if('summary'in entry) { temp.summary=entry.summary.$t } if(temp.summary=='') { temp.summary=temp.content.replace(re,'') } if(temp.content=='') { temp.content=temp.summary } temp.link=''; temp.reply_label='comments'; if('link'in entry) { for(j=0; j<entry.link.length; j++) { if(entry.link[j].rel=='alternate') { temp.link=entry.link[j].href } if(entry.link[j].rel=='replies') { temp.reply_label=entry.link[j].title } } } temp.author=new Object(); temp.author.name='Anonymous'; temp.author.uri=''; temp.author.avatar='http://img1.blogblog.com/img/anon36.png'; a0=entry.author[0]; if('name'in a0) { temp.author.name=a0.name.$t } if('uri'in a0) { temp.author.uri=a0.uri.$t } if('gd$image'in a0) { if(a0.gd$image.src!='http://img1.blogblog.com/img/blank.gif') { temp.author.avatar=a0.gd$image.src } } temp.thumbnail=''; if('media$thumbnail'in entry) { temp.thumbnail=entry.media$thumbnail.url } temp.reply_number=0; if('thr$total'in entry) { temp.reply_number=Number(entry.thr$total.$t) } temp.reply_label=temp.reply_label.replace(temp.reply_number+' ',''); temp.reply_to=''; temp.reply_json=''; temp.reply_title=''; if('thr$in-reply-to'in entry) { temp.reply_to=entry['thr$in-reply-to'].href; temp.reply_json=entry['thr$in-reply-to'].source; temp.reply_json=temp.reply_json.replace('/default/','/summary/'); temp.reply_json=temp.reply_json+'?alt=json-in-script' } temp.pid=''; if('gd$extendedProperty'in entry) { for(j=0; j<entry.gd$extendedProperty.length; j++) { if(entry.gd$extendedProperty[j].name=='blogger.itemClass') { temp.pid=entry.gd$extendedProperty[j].value } } } temp.pid=temp.pid.replace('pid-',''); blog.entry[i]=temp } return blog } function bi_jmerge(jshort1,jshort2) { for(i=0; i<jshort2.entry_number; i++) { jshort1.entry[i+jshort1.entry_number]=jshort2.entry[i] } jshort1.entry_number+=jshort2.entry_number; return jshort1 } $('#logo-ads .widget.Image:first-child').each(function() { image=$(this).find('img').parent('*').html(); $(this).html('<a href="/">'+image+'</a>')
}
);
var dd_level=-1;
var dd_html='';
$('#drop-menu .widget li').each(function()
{
text=$(this).text();
href=$(this).find('a').attr('href');
index=0;
for(var i=0;
i<text.length; i++) { index=text.indexOf('_',index); if(index==-1)break; index++ } level=i; if(level>dd_level)
{
dd_html+='<ul>'
}
if(level<dd_level) { offset=dd_level-level; for(var i=0; i<offset; i++) { dd_html+='</ul></li>' } } text=text.replace(/_/gi,''); dd_html+='<li><a href="'+href+'">'+text+'</a>';
dd_level=level
}
);
for(var i=0;
i<=dd_level; i++) { dd_html+='</ul>'; if(i!=0) { dd_html+='</li>' } } $('#drop-menu').html(dd_html); $('#newsletter-follow .widget.LinkList a').each(function() { href=$(this).attr('href'); if(href!=null) { if(href.indexOf('facebook.com')!=-1) { $(this).addClass('facebook') } else if(href.indexOf('twitter.com')!=-1) { $(this).addClass('twitter') } else if(href.indexOf('plus.google.com')!=-1) { $(this).addClass('plus') } else { $(this).addClass('other') } } } ); var Blog; var Excluded=''; var Label_List=[]; var Label_List_Index=0; var Home_Index_Html=''; function home_index_optimize_image() { var optimized_all=true; $('.home-index .thumb img').each(function() { src=$(this).attr('src'); if(src!=null) { if(src.indexOf('/s72-c/')!=-1) { src=src.replace('/s72-c/','/s300-c/'); $(this).attr('src',src) } } cl=$(this).attr('class'); var need=false; if(cl!=null) { if(cl.indexOf('optimized')==-1) { need=true } } else { need=true } if(need) { h=Number($(this).height()); w=Number($(this).width()); if(h==0||w==0) { optimized_all=false; return } th=Number($(this).parents('.thumb').height()); tw=Number($(this).parents('.thumb').width()); if(h>w)
{
$(this).css('width',tw+'px');
h=(h/w)*tw;
margin_top=(th-h)/2;
$(this).css('margin-top',margin_top+'px')
}
else
{
$(this).css('height',th+'px');
w=(w/h)*th;
margin_left=(tw-w)/2;
$(this).css('margin-left',margin_left+'px')
}
$(this).addClass('optimized')
}
}
);
if(!optimized_all)
{
setTimeout(function()
{
home_index_optimize_image()
}
,50)
}
}
function home_index_optimize_layout()
{
$('.home-index .hot .item-0').each(function()
{
$(this).css('height','auto')
}
);
$('.home-index .hot .item-0').each(function()
{
height=$(this).parent('.hot').height();
$(this).css('height',height+'px')
}
);
$('.home-index .wide .item-0').each(function()
{
$(this).css('height','auto')
}
);
$('.home-index .wide .item-0').each(function()
{
ph=Number($(this).parent('.wide').height());
lh=Number($(this).parent('.wide').find('.label-link').outerHeight());
padding=$(this).css('padding-top');
padding=padding.replace('px','');
padding=Number(padding);
$(this).css('height',(ph-padding*2-lh)+'px')
}
)
}
function home_index_show(json)
{
Blog=bi_jshort(json);
for(var i=0;
i<Label_List_Index; i++) { var total_add=0; var html_add=''; for(var j=0; j<Blog.entry_number; j++) { entry=Blog.entry[j]; if(Excluded.indexOf(entry.id)!=-1)continue; for(var k=0; k<entry.cate.length; k++) { if(entry.cate[k]==Label_List[i].text) { Excluded+=entry.id+','; var image=bi_get_first_image(entry.content); if(image=='')image=entry.thumbnail; if(image=='') { image=no_thumb } html_add+='<div class="item item-'+total_add+'">';
if(image!='')
{
image='<img src="'+image+'"/>';
html_add+='<div class="thumb"><a href="'+entry.link+'">'+image+'</a></div>'
}
html_add+='<h2 class="title"><a href="'+entry.link+'">'+entry.title+'</a></h2>';
html_add+='<div class="meta">';
html_add+=entry.author.name+', '+bi_date_format(entry.published,date_format);
if(entry.reply_number>0)
{
html_add+=', '+entry.reply_number+' '+entry.reply_label
}
html_add+='</div>';
if(i==0&&total_add==0)
{
var snip=entry.summary;
if(snip.length>snip_length)
{
snip=snip.substring(0,snip_length)
}
snip+='...';
html_add+='<p class="snip">'+snip+'</p>'
}
html_add+='<div class="clear"></div></div>';
total_add++;
break
}
}
if(total_add==6||(i!=0&&total_add==5))
{
break
}
}
if(i!=0)
{
html_add='<div class="label-link"><a href="'+Label_List[i].href+'">'+Label_List[i].text+'</a></div>'+html_add
}
html_add+='<div class="clear"></div>';
if(i==0)
{
html_add='<div class="hot">'+html_add+'</div>'
}
else
{
var index=i-1;
if(index%3==0)
{
html_add='<div class="wide">'+html_add+'</div>'
}
else if(index%3==1)
{
if(index+2==Label_List_Index)
{
html_add='<div class="wide">'+html_add+'</div>'
}
else
{
html_add='<div class="small small-first">'+html_add+'</div>'
}
}
else if(index%3==2)
{
html_add='<div class="small small-last">'+html_add+'</div>'
}
}
Home_Index_Html+=html_add
}
$('.home-index').html(Home_Index_Html);
home_index_optimize_image();
home_index_optimize_layout()
}
$('.home-index').each(function()
{
Label_List[Label_List_Index]=new Object();
Label_List[Label_List_Index].href='/search/label/Hot';
Label_List[Label_List_Index].text='Hot';
Label_List_Index++;
$('#main .widget.Label ul li a').each(function()
{
href=$(this).attr('href');
text=$(this).text();
for(var i=0;
i<Label_List_Index; i++) { if(Label_List[i].text==text)break } if(i>=Label_List_Index)
{
Label_List[Label_List_Index]=new Object();
Label_List[Label_List_Index].href=href;
Label_List[Label_List_Index].text=text;
Label_List_Index++
}
}
);
bi_script('/feeds/posts/default?alt=json-in-script&max-results=500&callback=home_index_show')
}
);
function post_index_optimize_image()
{
var optimized_all=true;
$('.post-index .index-thumbnail img').each(function()
{
src=$(this).attr('src');
if(src!=null)
{
if(src.indexOf('/s72-c/')!=-1)
{
src=src.replace('/s72-c/','/s300-c/');
$(this).attr('src',src)
}
}
var cl=$(this).attr('class');
var src=$(this).attr('src');
if(src!=null&&src.indexOf('youtube.com')!=-1)
{
src=src.replace('/default.','/mqdefault.');
$(this).attr('src',src)
}
var need=false;
if(cl!=null)
{
if(cl.indexOf('optimized')==-1)
{
need=true
}
}
else
{
need=true
}
if(need)
{
h=Number($(this).height());
w=Number($(this).width());
if(h==0||w==0)
{
optimized_all=false;
return
}
th=Number($(this).parents('.index-thumbnail').height());
tw=Number($(this).parents('.index-thumbnail').width());
if(h>w)
{
$(this).css('width',tw+'px');
h=(h/w)*tw;
margin_top=(th-h)/2;
$(this).css('margin-top',margin_top+'px')
}
else
{
$(this).css('height',th+'px');
w=(w/h)*th;
margin_left=(tw-w)/2;
$(this).css('margin-left',margin_left+'px')
}
$(this).addClass('optimized')
}
}
);
if(!optimized_all)
{
setTimeout(function()
{
post_index_optimize_image()
}
,50)
}
}
post_index_optimize_image();
var search_html='<form method="get" id="search-form" action="'+search_engine+'" target="_blank" class="gsc-search-box" accept-charset="utf-8"><table cellspacing="0" cellpadding="0" class="gsc-search-box"><tbody><tr><td class="gsc-input"><input id="search-query" placeholder="Type keywords" autocomplete="on" type="text" size="10" class="gsc-input" name="q" title="search"></td><td class="gsc-search-button"><input type="submit" value="Search" class="gsc-search-button" title="search"></td></tr></tbody></table></form>';



//]]>
</script>

<!-- SCRIPT -->

</body>
</html>





0 comments:

Post a Comment

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets