Widget Postingan Dikomentari

by dafin defandaky

HTML

<div id='sidebar'>
    <h2>Dikomentari</h2>
<script type="text/javascript">
    function getYpipePP(feed) {
    document.write('<ul style="list-style:none; ">');
    var i;
    for (i = 0; i < feed.count ; i++)
    {
    var href = "'" + feed.value.items[i].link + "'";
    var pTitle = feed.value.items[i].title;
    var pComment = + feed.value.items[i].commentcount;
    var pList = '<li style="clear:both"> <div class="commentbubble">' +pComment +  "&#160;&#160;</div>" +  "<a href="+ href + '" target="_blank">' + pTitle ;
    document.write(pList);
    //to remove comment count delete this line
    document.write('</a></li>');
    }
    document.write('</ul>');
    }
    </script>
    <script src="http://pipes.yahoo.com/pipes/pipe.run?
     YourBlogUrl=http://defandaky.blogspot.com
    &ShowHowMany=7
    &_id=390e906036f48772b2ed4b5d837af4cd
    &_callback=getYpipePP
    &_render=json"
    type="text/javascript"></script>
</div>

CSS

/* Most Commented Widget */
.commentbubble {background: #016e78;width: 20px;float: right;margin-top:0px;margin-left:10px;font-weight: 400;font-family: georgia,Helvetica;font-size:10px;padding:2px 4px 2px;color: #FFF;position: relative;border-radius:2px;text-align:center }
.commentbubble:after {content: &#39; &#39;;position: absolute;width: 0;height: 0;right: 0;top: 100%;border-width: 5px 8px;border-style: solid;border-color: #016e78 #016e78 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);top: 29px;right: 6px;}
#sidebar {width:300px;margin:0 auto}
#sidebar h2{margin:0;color:#fff;text-transform: uppercase;padding:10px 15px;background:#252525}
#sidebar ul {background:#33adb8;  margin: 0 !important;  padding:0 !important;  }
#sidebar ul li {list-style: none;border-bottom: 1px dashed #dedede;padding:14px 10px  15px 10px; line-height:14px;}
#sidebar a:hover{color:#369}
#sidebar a:link, #sidebar a:visited, #sidebar a:active {font-size:13px; color:#fff;font-weight:400;text-decoration:none}