Để thêm widget này vào blog bạn chỉ việc làm theo các bước hướng dẫn đơn giản bên dưới. Ngoài ra, bạn cũng có thể áp dụng cho WordPress, Joomla and etc
Vào Blogger.com >> Mẫu >> Chỉnh sửa HTML
Trong Template bạn tìm ]]></b
Code:
.tvlsocial-container{font-size:13px;color:#666;font-family:arial,sans-serif;line-height:25px}
.tvlsocial-container a,.tvlsocial-container a:visited{color:#45BAF5;text-decoration:none}
.count{font-weight:bold}
.row{position:relative;width:320px;margin:20px 0;height:100px}
.col_4{float:left;margin-right:15px;text-align:center}
.box{width:130px;height:100px;margin:auto;border:1px solid #E5E7EB;background:#F1F3F8;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}
.cell_1{width:30px;height:80px;position:relative;float:left;margin:auto}
.cell_2{font-size:30px;height:80px;text-align:center;line-height:80px;font-family:arial,sans-serif;font-smooth:always;position:relative;margin:auto;color:#333}
.cell_3{height:20px;width:132px;float:left;margin:auto;line-height:20px;font-size:12px;color:#999;background:#ccc;margin-left:-1px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}
.icon{width:40px;height:40px;margin-top:17px;border:none}
.facebook-blue{background-color:#5074BF;background-image:-moz-linear-gradient(top,#88AEFC,#3B5998);background-image:-ms-linear-gradient(top,#88AEFC,#3B5998);background-image:-webkit-gradient(linear,0 0,0 100%,from(#88AEFC),to(#3B5998));background-image:-webkit-linear-gradient(top,#88AEFC,#3B5998);background-image:-o-linear-gradient(top,#88AEFC,#3B5998);background-image:linear-gradient(top,#88AEFC,#3B5998);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88AEFC',endColorstr='#3B5998');border-color:#23487E;color:#fff;text-shadow:0 1px 1px rgba(60,60,60,0.75)}
.orange_tvl{background-color:#ff8736;background-image:-moz-linear-gradient(top,#fab484,#fc7b23);background-image:-ms-linear-gradient(top,#fab484,#fc7b23);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fab484),to(#fc7b23));background-image:-webkit-linear-gradient(top,#fab484,#fc7b23);background-image:-o-linear-gradient(top,#fab484,#fc7b23);background-image:linear-gradient(top,#fab484,#fc7b23);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fab484',endColorstr='#fc7b23');border-color:#fc7b23;color:#fff;text-shadow:0 1px 1px rgba(60,60,60,0.75)}
#mycontent{display:none}
Blogger >> Bố cục >> Thêm tiện ích HTML/Javascript.
Dán đoạn code bên dưới vào khung soạn thảo.
Code:
<script>
$(document).ready(function(){
$('#shared').tvlsocialcount({
'service':'facebook',
'countof':'shares',
'query':'http://www.trollvl.com',
'callback':'formatCount'
});
$('#fblikes').tvlsocialcount({
'service':'facebook',
'countof':'likes',
'query':'giaitri123vn',
'callback':'formatCount'
});
});
function formatCount(element,count)
{var display_count='';
count=parseInt(count,10);
if(count>1000000)
{count=count/1000000;
count=count.toFixed(1);
display_count=count+'m';}
else if(count>1000)
{count=count/1000;
count=count.toFixed(1);
display_count=count+'k';}
else{display_count=count;}
element.html(display_count);}
</script>
<div class="tvlsocial-container">
<div class="row">

No comments:
Post a Comment