Sunday, October 9, 2016

  •    Related Posts Thumbnail V2

  • add the above </head>

    <script type='text/javascript'>
    //<![CDATA[
    var relatedTitles = new Array();
    var relatedUrls = new Array();
    var relatedpSummary = new Array();
    var relatedThumb = new Array();
    var relatedTitlesNum = 0;
    var relatedPostsNum = 4; // number of entries to be shown
    var relatedmaxnum = 75; // the number of characters of summary
    var relatednoimage = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOnU0f9VHjClL6rM-WKAID_BWFMOqYy1MHeb1CIm91-dWH8994rtQNVRlyTRUtrIdDXgb8QqMy52DBWuEniyGPvdTEgy92uuHQO3Ic6R2jqFq-4KrQK_WXANA4b1XHIEcNwhO9CYNHxstp/s1600/no_image.jpg"; // default picture for entries with no image
    function readpostlabels(e){for(var t,r,l,a=0;a<e.feed.entry.length&&(t=e.feed.entry[a],a!=e.feed.entry.length);a++){relatedTitles[relatedTitlesNum]=t.title.$t,l="","content"in t?l=t.content.$t:"summary"in t&&(l=t.summary.$t),relatedpSummary[relatedTitlesNum]=removetags(l,relatedmaxnum),r="media$thumbnail"in t?t.media$thumbnail.url:relatednoimage,relatedThumb[relatedTitlesNum]=r;for(var d=0;d<t.link.length;d++)if("alternate"==t.link[d].rel){relatedUrls[relatedTitlesNum]=t.link[d].href;break}relatedTitlesNum++}}function showrelated(){for(var e=new Array(0),t=new Array(0),r=new Array(0),l=new Array(0),a=0;a<relatedUrls.length;a++)contains(e,relatedUrls[a])||(e.length+=1,e[e.length-1]=relatedUrls[a],t.length+=1,t[t.length-1]=relatedTitles[a],r.length+=1,r[r.length-1]=relatedpSummary[a],l.length+=1,l[l.length-1]=relatedThumb[a]);relatedTitles=t,relatedUrls=e,relatedpSummary=r,relatedThumb=l;for(var a=0;a<relatedTitles.length;a++){var d=Math.floor((relatedTitles.length-1)*Math.random()),n=relatedTitles[a],s=relatedUrls[a],m=relatedpSummary[a],i=relatedThumb[a];relatedTitles[a]=relatedTitles[d],relatedUrls[a]=relatedUrls[d],relatedpSummary[a]=relatedpSummary[d],relatedThumb[a]=relatedThumb[d],relatedTitles[d]=n,relatedUrls[d]=s,relatedpSummary[d]=m,relatedThumb[d]=i}for(var u,h=0,o=Math.floor((relatedTitles.length-1)*Math.random()),g=o,f=document.URL;h<relatedPostsNum&&(relatedUrls[o]==f||(u="<div class='relatedsumposts'>",u+="<a href='"+relatedUrls[o]+"' title='"+relatedTitles[o]+"'><img src='"+relatedThumb[o]+"' /></a>",u+="<h6><a href='"+relatedUrls[o]+"' target='_self'>"+relatedTitles[o]+"</a></h6>",u+="<p>"+relatedpSummary[o]+" ... </p>",u+="</div>",document.write(u),h++,h!=relatedPostsNum))&&(o<relatedTitles.length-1?o++:o=0,o!=g););}function removetags(e,t){for(var r=e.split("<"),l=0;l<r.length;l++)-1!=r[l].indexOf(">")&&(r[l]=r[l].substring(r[l].indexOf(">")+1,r[l].length));return r=r.join(""),r=r.substring(0,t-1)}function contains(e,t){for(var r=0;r<e.length;r++)if(e[r]==t)return!0;return!1}
    //]]>
    </script>



    <style>
    .relatedsumposts {
    padding: 0px 10px;
    text-align: center;
    /* width of the related posts area */
    width: <b>120px</b>;
    float:left;margin-bottom:15px;
    border-right: 1px dotted #E5E5E5;
    display: inline-block;
    }
    .relatedsumposts h6 {
    margin: 5px 0;
    }
    .relatedsumposts h6 a {
    /* link properties */
    color: #linkcolor;
    text-transform: uppercase;
    font-size:12px;
    }
    .relatedsumposts img {
    /* thumbnail properties */
    height: <b>82px</b>;
    width: <b>82px</b>;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    }
    .relatedsumposts p {
    /* summary properties */
    border-top: 1px dotted #E5E5E5;
    border-bottom: 1px dotted #E5E5E5;
    color: #summarycolor;
    font-size: 10px;
    height: 4em;
    line-height: 1;
    margin: 5px 0 0;
    padding: 5px 0 15px 0;
    }
    #relatedpostssum {
    width: 100%;
    }
    .relatedpoststitle {
    font-size: 19px;
    margin-bottom:15px;
    }
    </style>




    Search the code <b:includable id='postQuickEdit' var='post'> on your template

    on it there </b:includable> and paste the code above

    <!-- Related Posts with Thumbnails Code Start-->
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:label.isLast != &quot;true&quot;'>
    </b:if>
    <script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=readpostlabels&amp;max-results=50&quot;' type='text/javascript'/>
    </b:loop>
      <div class='post-footer-line post-footer-line-4'>
       <div class='relatedpoststitle'>RELATED POSTS</div>
    <div id='relatedpostssum'>
          <script type='text/javascript'>showrelated();</script>
        </div>
        <div style='clear:both;'/>
      </div>
    </b:if>
    <!-- Related Posts with Thumbnails Code End-->




     DEMO : 
    Scroll down

    Friday, October 7, 2016

  •    Attention Popup Screen Cover Only With CSS
  • put this code at above </b:skin>

    /* style link popup */
    a.popup-link {
    padding:17px 0;
    text-align: center;
    margin:10% auto;
    position: relative;
    width: 300px;
    color: #fff;
    text-decoration: none;
    background-color: #FFBA00;
    border-radius: 3px;
    box-shadow: 0 5px 0px 0px #eea900;
    display: block;
    }
    a.popup-link:hover {
    background-color: #ff9900;
    box-shadow: 0 3px 0px 0px #eea900;
    -webkit-transition:all 1s;
    transition:all 1s;
    }
    /* end link popup*/

    /* animation popup */
    @-webkit-keyframes autopopup {
    from {opacity: 0;margin-top:-200px;}
    to {opacity: 1;}
    }
    @-moz-keyframes autopopup {
    from {opacity: 0;margin-top:-200px;}
    to {opacity: 1;}
    }
    @keyframes autopopup {
    from {opacity: 0;margin-top:-200px;}
    to {opacity: 1;}
    }
    /* end animation popup */

    #popup {
    background-color: rgba(0,0,0,0.8);
    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    margin:0;
    -webkit-animation:autopopup 2s;
    -moz-animation:autopopup 2s;
    animation:autopopup 2s;
    }
    #popup:target {
    -webkit-transition:all 1s;
    -moz-transition:all 1s;
    transition:all 1s;
    opacity: 0;
    visibility: hidden;
    }

    @media (min-width: 768px){
    .popup-container {
    width:600px;
    }
    }
    @media (max-width: 767px){
    .popup-container {
    width:100%;
    }
    }
    .popup-container {
    position: relative;
    margin:7% auto;
    padding:30px 50px;
    background-color: #fafafa;
    color:#333;
    border-radius: 3px;
    }
    a.popup-close {
    position: absolute;
    top:3px;
    right:3px;
    background-color: #333;
    padding:7px 10px;
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
    color:#fff;
    }
    .popup-form {
    margin:10px auto;
    }
    .popup-form h2 {
    margin-bottom: 5px;
    font-size: 37px;
    text-transform: uppercase;
    }
    .popup-form .input-group {
    margin:10px auto;
    }
    .popup-form .input-group input {
    padding:17px;
    text-align: center;
    margin-bottom: 10px;
    border-radius:3px;
    font-size: 16px;
    display: block;
    width: 100%;
    }
    .popup-form .input-group input:focus {
    outline-color:#FB8833;
    }
    .popup-form .input-group input[type="email"] {
    border:0px;
    position: relative;
    }
    .popup-form .input-group input[type="submit"] {
    background-color: #FB8833;
    color: #fff;
    border: 0;
    cursor: pointer;
    }
    .popup-form .input-group input[type="submit"]:focus {
    box-shadow: inset 0 3px 7px 3px #ea7722;}



    Put anywhere in the body
    this code :

    <div class=”popup-wrapper” id=”popup”>
    <div class=”popup-container”>
    <!– START CONTENT –>
    <h2>ATTENTION... !!</h2>
    ..... your content attention here ...
    <!– END CONTENT –>
    <a class=”popup-close” href=”#popup”>X</a>
    </div>
    </div>


    This popup that appear only on the home page only
    add the code below :

    <b:if cond="data:blog.url == data:blog.homepageUrl">
    <div class=”popup-wrapper” id=”popup”>
    ......................... 
    </div>
    </b:if>


     DEMO  : 

    click here

    Monday, October 3, 2016

  •    Recent Posts Ticker Thumbnail
  • Paste above </head>

    <script>
    /*! vTicker 1.15
    http://richhollis.github.com/vticker/ | http://richhollis.github.com/vticker/license/ | based on Jubgits vTicker http://www.jugbit.com/jquery-vticker-vertical-news-ticker/ */
    (function(d){var n={speed:700,pause:4E3,showItems:1,mousePause:!0,height:0,animate:!0,margin:0,padding:0,startPaused:!1},c={moveUp:function(a,b){c.animate(a,b,"up")},moveDown:function(a,b){c.animate(a,b,"down")},animate:function(a,b,e){var c=a.itemHeight,f=a.options,k=a.element,g=k.children("ul"),l="up"===e?"li:first":"li:last";k.trigger("vticker.beforeTick");var m=g.children(l).clone(!0);0<f.height&&(c=g.children("li:first").height());c+=f.margin+2*f.padding;"down"===e&&g.css("top","-"+c+"px").prepend(m);
    if(b&&b.animate){if(a.animating)return;a.animating=!0;g.animate("up"===e?{top:"-="+c+"px"}:{top:0},f.speed,function(){d(g).children(l).remove();d(g).css("top","0px");a.animating=!1;k.trigger("vticker.afterTick")})}else g.children(l).remove(),g.css("top","0px"),k.trigger("vticker.afterTick");"up"===e&&m.appendTo(g)},nextUsePause:function(){var a=d(this).data("state"),b=a.options;a.isPaused||2>a.itemCount||f.next.call(this,{animate:b.animate})},startInterval:function(){var a=d(this).data("state"),b=
    this;a.intervalId=setInterval(function(){c.nextUsePause.call(b)},a.options.pause)},stopInterval:function(){var a=d(this).data("state");a&&(a.intervalId&&clearInterval(a.intervalId),a.intervalId=void 0)},restartInterval:function(){c.stopInterval.call(this);c.startInterval.call(this)}},f={init:function(a){f.stop.call(this);var b=jQuery.extend({},n);a=d.extend(b,a);var b=d(this),e={itemCount:b.children("ul").children("li").length,itemHeight:0,itemMargin:0,element:b,animating:!1,options:a,isPaused:a.startPaused?
    !0:!1,pausedByCode:!1};d(this).data("state",e);b.css({overflow:"hidden",position:"relative"}).children("ul").css({position:"absolute",margin:0,padding:0}).children("li").css({margin:a.margin,padding:a.padding});isNaN(a.height)||0===a.height?(b.children("ul").children("li").each(function(){var a=d(this);a.height()>e.itemHeight&&(e.itemHeight=a.height())}),b.children("ul").children("li").each(function(){d(this).height(e.itemHeight)}),b.height((e.itemHeight+(a.margin+2*a.padding))*a.showItems+a.margin)):
    b.height(a.height);var h=this;a.startPaused||c.startInterval.call(h);a.mousePause&&b.bind("mouseenter",function(){!0!==e.isPaused&&(e.pausedByCode=!0,c.stopInterval.call(h),f.pause.call(h,!0))}).bind("mouseleave",function(){if(!0!==e.isPaused||e.pausedByCode)e.pausedByCode=!1,f.pause.call(h,!1),c.startInterval.call(h)})},pause:function(a){var b=d(this).data("state");if(b){if(2>b.itemCount)return!1;b.isPaused=a;b=b.element;a?(d(this).addClass("paused"),b.trigger("vticker.pause")):(d(this).removeClass("paused"),
    b.trigger("vticker.resume"))}},next:function(a){var b=d(this).data("state");if(b){if(b.animating||2>b.itemCount)return!1;c.restartInterval.call(this);c.moveUp(b,a)}},prev:function(a){var b=d(this).data("state");if(b){if(b.animating||2>b.itemCount)return!1;c.restartInterval.call(this);c.moveDown(b,a)}},stop:function(){d(this).data("state")&&c.stopInterval.call(this)},remove:function(){var a=d(this).data("state");a&&(c.stopInterval.call(this),a=a.element,a.unbind(),a.remove())}};d.fn.vTicker=function(a){if(f[a])return f[a].apply(this,
    Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&a)d.error("Method "+a+" does not exist on jQuery.vTicker");else return f.init.apply(this,arguments)}})(jQuery);

    function getauthor(t) {
    for (var e = 0; e < t.length; e++) var a = t[e].name.$t;
    return a;
    }
    function getmeta(t) {
    var e = [];
    e[1] = "Jan", e[2] = "Feb", e[3] = "Mar", e[4] = "Apr", e[5] = "May", e[6] = "Jun", e[7] = "Jul", e[8] = "Aug", e[9] = "Sep", e[10] = "Oct", e[11] = "Nov", e[12] = "Dec";
    var a = t.substring(0, 4),
    s = t.substring(5, 7),
    r = t.substring(8, 10),
    n = e[parseInt(s, 10)] + " " + r + " " + a;
    return n;
    }
    function bloggerEverTicker(e){
    var con=document.querySelector('#ticker'),
    entries=e.feed.entry,
    item="<ul id='ticket-wrapper-inner'>"
    if(entries){
    for(var i=0;i<entries.length;i++){
    var en = entries[i];
    for (var j = 0; j < en.link.length; j++) {
    if (en.link[j].rel == 'alternate') {
    var postUrl = en.link[j].href;
    break;
    }
    }
    try{
    var Img='<img src="'+en.media$thumbnail.url+'"/>';
    }catch(e){
    var Img="";
    }
    var ti=en.title.$t,
    author=getauthor(en.author),
    date=getmeta(en.published.$t);
    item+='<li>'+Img+'<h3><a href="'+postUrl+'">'+ti+'</a></h3><div class="tickermeta"><span>'+author+'</span> - <span>'+date+'</span></div></li>';
    }
    item+='</ul>';
    con.innerHTML=item;
    }
    $('#ticker').vTicker();
    }
    $(function(){
    var e=document.createElement('script');
    e.src='http://'+$('.ticker-outer').data('domain')+'/feeds/posts/summary?alt=json&callback=bloggerEverTicker';
    e.type='text/javascript';
    document.getElementsByTagName('body')[0].appendChild(e);
    });

    </script>


    Paste above </b:skin>

    .ticker-outer{
    text-align:center;
    }
    .ticker-outer>span{
    display:inline-block;
    background:#ccc;
    padding:10px;
    font:700 13px 'segoe ui',sans-serif;
    box-shadow:0 0 10px rgba(0,0,0,0.6);
    }
    .ticker-outer>span>a{
    color:#222;
    text-decoration:none;
    }
    #ticker{
    height:50px;
    overflow:hidden;
    background:#eee;
    text-align:left;
    }
    #ticker ul{
    padding:0;
    margin:0;
    list-style:none;
    }
    #ticker ul li{
    height:50px;
    white-space:nowrap;
    }
    #ticker ul li img{
    float:left;
    width:40px;
    height:40px;
    margin:5px;
    }
    #ticker ul li h3{
    margin:0;
    font:500 18px 'segoe ui',sans-serif;
    }
    #ticker ul li h3 a{
    color:#222;
    text-decoration:none;
    line-height:30px !important;
    }
    #ticker ul li .tickermeta{
    font:400 13px 'segoe ui',sans-serif;
    line-height:20px !important;
    color:#bbb;
    }


    And.... Go to

    1. Layout
    2. Add a Gadget
    3. HTML / JavaScript

    <div class='ticker-outer' data-domain='bloggerever.com'>
    <div id="ticker">
    </div></div>



    note: BLUE text replace with your blog/site

     DEMO :   
    see on the right side

    Saturday, October 1, 2016

  •    Button Back To TOP Responsive
  • Paste Above </head>
    <link href='//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' rel='stylesheet'/>

    Paste Above </b:skin>

    #back-to-top{background:
    #E73037;color:#ffffff;padding:8px 10px;font-size:24px}
    .back-to-top{position:fixed!important;position:absolute;bottom:20px;right:20px;z-index:999}


    Paste Above </body>

    <div class='back-to-top'><a href='#' id='back-to-top' title='back to top'>
    <i class='fa fa-chevron-up'/>
    </a></div>
    <script>
    $(window).scroll(function() {
    if($(this).scrollTop() &gt; 200) {
    $(&#39;#back-to-top&#39;).fadeIn();
    } else {
    $(&#39;#back-to-top&#39;).fadeOut();
    }
    });

    $(&#39;#back-to-top&#39;).hide().click(function() {
    $(&#39;html, body&#39;).animate({scrollTop:0}, 1000);
    return false;
    });
    </script>


     DEMO : 

    scroll down and look at the bottom right corner

  •    Recent Posts Label Only Title
    1. Layout
    2. Add a Gadget
    3. HTML/JavaScript

    Paste this code


    <!-- Recent Posts by Label Start -->
    <!-- code by brought2you.blogspot.com -->
    <script type="text/javascript">
    function recentpostslist(json) {
    document.write('<ul>');
    for (var i = 0; i < json.feed.entry.length; i++)
    {
    for (var j = 0; j < json.feed.entry[i].link.length; j++) {
    if (json.feed.entry[i].link[j].rel == 'alternate') {
    break;
    }
    }
    var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bs
    var entryTitle = json.feed.entry[i].title.$t;
    var item = "<li>" + "<a href="+ entryUrl + '">' + entryTitle + "</a> </li>";
    document.write(item);
    }
    document.write('</ul>');
    }
    </script>
    <script src="/feeds/posts/summary/-/Random?max-results=5&alt=json-in-script&callback=recentpostslist"></script><span style="font-size: 80%; float:right;">Get this <a href="http://brought2you.blogspot.com/2012/03/list-recent-posts-by-label.html">widget</a></span>
    <!-- Recent Posts by Label End -->


    note : blue color text and replace it with a label number to be displayed


     DEMO : 


    look to the right