Hiển thị các bài đăng có nhãn Tutorial. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Tutorial. Hiển thị tất cả bài đăng

Thứ Năm, 13 tháng 9, 2018

Thêm tiện ích xem Thời gian và Thời tiết cho website


Chào các bạn, hôm nay mình sẽ hướng dẫn các bạn Thêm tiện ích xem Thời gian và Thời tiết cho website

HƯỚNG DẪN CÁCH LÀM:

Bước 1: Vào trang Chỉnh sửa HTML và thêm đoạn code này vào chỗ bạn muốn nó hiển thị (thường là header)
<div class='timeandweather'>
<span class='time'></span>
<span id='weather'></span>
Bước 2: Tìm thẻ ]]></b:skin> và thêm css bên dưới lên nó hoặc thêm nó vào giữa cặp thẻ <style>...</style> điều được
.time{display:inline-block;color:#ffffff;font-size:13px}
.time:before{content:"\f274";font-family:FontAwesome;margin-right:7px}
.time:after{content:" / ";margin:0 1em}
#weather{color:#ffffff;font-size:13px;}
#weather img{max-width:55px;vertical-align:middle;margin-top:-2px}
Bước 3: Tiếp đến tìm thẻ </head> và thêm đoạn js này lên trên thẻ vừa tìm
<script>
//<![CDATA[
/*! simpleWeather v3.1.0 - http://simpleweatherjs.com */
!function(t){"use strict";function e(t,e){return"f"===t?Math.round(5/9*(e-32)):Math.round(1.8*e+32)}t.extend({simpleWeather:function(i){i=t.extend({location:"",woeid:"",unit:"f",success:function(t){},error:function(t){}},i);var o=new Date,n="https://query.yahooapis.com/v1/public/yql?format=json&rnd="+o.getFullYear()+o.getMonth()+o.getDay()+o.getHours()+"&diagnostics=true&callback=?&q=";if(""!==i.location){var r="";r=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/.test(i.location)?"("+i.location+")":i.location,n+='select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="'+r+'") and u="'+i.unit+'"'}else{if(""===i.woeid)return i.error("Could not retrieve weather due to an invalid location."),!1;n+="select * from weather.forecast where woeid="+i.woeid+' and u="'+i.unit+'"'}return t.getJSON(encodeURI(n),function(t){if(null!==t&&null!==t.query&&null!==t.query.results&&"Yahoo! Weather Error"!==t.query.results.channel.description){var o,n=t.query.results.channel,r={},s=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW","N"],a="https://s.yimg.com/os/mit/media/m/weather/images/icons/l/44d-100567.png";r.title=n.item.title,r.temp=n.item.condition.temp,r.code=n.item.condition.code,r.todayCode=n.item.forecast[0].code,r.currently=n.item.condition.text,r.high=n.item.forecast[0].high,r.low=n.item.forecast[0].low,r.text=n.item.forecast[0].text,r.humidity=n.atmosphere.humidity,r.pressure=n.atmosphere.pressure,r.rising=n.atmosphere.rising,r.visibility=n.atmosphere.visibility,r.sunrise=n.astronomy.sunrise,r.sunset=n.astronomy.sunset,r.description=n.item.description,r.city=n.location.city,r.country=n.location.country,r.region=n.location.region,r.updated=n.item.pubDate,r.link=n.item.link,r.units={temp:n.units.temperature,distance:n.units.distance,pressure:n.units.pressure,speed:n.units.speed},r.wind={chill:n.wind.chill,direction:s[Math.round(n.wind.direction/22.5)],speed:n.wind.speed},n.item.condition.temp<80&&n.atmosphere.humidity<40?r.heatindex=-42.379+2.04901523*n.item.condition.temp+10.14333127*n.atmosphere.humidity-.22475541*n.item.condition.temp*n.atmosphere.humidity-6.83783*Math.pow(10,-3)*Math.pow(n.item.condition.temp,2)-5.481717*Math.pow(10,-2)*Math.pow(n.atmosphere.humidity,2)+1.22874*Math.pow(10,-3)*Math.pow(n.item.condition.temp,2)*n.atmosphere.humidity+8.5282*Math.pow(10,-4)*n.item.condition.temp*Math.pow(n.atmosphere.humidity,2)-1.99*Math.pow(10,-6)*Math.pow(n.item.condition.temp,2)*Math.pow(n.atmosphere.humidity,2):r.heatindex=n.item.condition.temp,"3200"==n.item.condition.code?(r.thumbnail=a,r.image=a):(r.thumbnail="https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+n.item.condition.code+"ds.png",r.image="https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+n.item.condition.code+"d.png"),r.alt={temp:e(i.unit,n.item.condition.temp),high:e(i.unit,n.item.forecast[0].high),low:e(i.unit,n.item.forecast[0].low)},"f"===i.unit?r.alt.unit="c":r.alt.unit="f",r.forecast=[];for(var m=0;m<n.item.forecast.length;m++)o=n.item.forecast[m],o.alt={high:e(i.unit,n.item.forecast[m].high),low:e(i.unit,n.item.forecast[m].low)},"3200"==n.item.forecast[m].code?(o.thumbnail=a,o.image=a):(o.thumbnail="https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+n.item.forecast[m].code+"ds.png",o.image="https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+n.item.forecast[m].code+"d.png"),r.forecast.push(o);i.success(r)}else i.error("There was a problem retrieving the latest weather information.")}),this}})}(jQuery);
//]]>
</script>
Bước 4: Bước cuối cùng bạn thêm đoạn js bên dưới lên trên thẻ </body>
<!-- Weather + Time -->
<script>
//<![CDATA[
$.simpleWeather({
location: 'viet nam, quang ngai',
woeid: '',
unit: 'c',
success: function(weather) {
html = '<span>' + weather.city + ' </span><img src="' + weather.thumbnail + '"><span> ' + weather.temp + '&deg;' + weather.units.temp + '</span>';
$("#weather").html(html);
},
error: function(error) {
$("#weather").html('<p>' + error + '</p>');
}
});
$.simpleWeather({
location: 'viet nam, quang ngai',
woeid: '',
unit: 'c',
success: function(weather) {
for (var i = 4; i < weather.forecast.length; i++) {
html = '<img class="weather-image" src="' + weather.image + '">' + '<span class="weather-type">' + weather.currently + '</span><span class="weather-temp"> ' + weather.temp + '&deg;' + weather.units.temp + '</span><span class="weather-date">' + weather.forecast[i].date + '</span><span class="weather-region">' + weather.city + ', ' + weather.country + '</span>';
}
html += '<span class="weather-humidity">' + weather.humidity + '%</span> ';
html += '<span class="weather-wind">' + weather.wind.speed + ' MPH</span>';

$("#weather-widget").html(html);
},
error: function(error) {
$("#weather-widget").html('<p>' + error + '</p>');
}
});
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function(){var dayName=new Array("Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy");var monName=new Array("1","2","3","4","5","6","7","8","9","10","11","12");var now=new Date();var str_time=dayName[now.getDay()]+', '+now.getDate()+'/'+monName[now.getMonth()]+'/'+now.getFullYear()+' '+now.getHours()+':'+now.getMinutes()+' GMT+7';$('.time').html(str_time);});
//]]>
</script>
Chú ý: Tìm quang ngai và thay thành nơi bạn ở.
Chúc bạn thành công!

Thứ Tư, 5 tháng 9, 2018

Bài đăng liên quan cho Blogger (Related Post Box For Blogger)

Chào các bạn, theo yêu cầu của một số bạn thì hôm nay mình sẽ hướng dẫn các bạn tạo hộp bài đăng liên quan cho blogspot nhé

HƯỚNG DẪN CÁCH LÀM:

Bước 1: Đăng nhập Blogger -> Chủ đề -> Chỉnh sửa HTML nhấn tìm ]]></b:skin> và thêm đoạn css bên dưới lên trên thẻ này
<style>
/* Related post image */
#related-box{width:300px;overflow:hidden;height:auto;position:fixed;bottom:65px;right:0;background:#fff;/*border:1px solid #ddd;*/ box-shadow:0 0 3px #CACACA;transition:all .5s;z-index:9999;font-family:'Open Sans',sans-serif}
#related-box .header{width:100%;height:34px;line-height:35px;border-top:4px solid #F88C00;color:#222;background:#fff}
#related-box .header h2{font-size:17px;text-transform:uppercase;font-weight:600;margin:0;text-align:center}
#related-box .header a{color:#222}
#related-box .tombol{position:absolute;color:#fff;top:0;left:0;font-size:18px;font-weight:400;cursor:pointer;background:#F88C00;text-align:center;width:30px;height:30px;line-height:30px;transition:all .3s ease-in-out}
#related-box .tombol a{color:#fff}
#related-box .tombol a:hover{color:#ffffff7d}
#related-box .tombol i{margin-right:0}
#related-box .item{width:300px;padding:15px;float:left}
#related-box .list{box-sizing:border-box;height:100%;overflow:hidden;width:600px;transition:all .5s}
#related-box .gambar{position:relative;float:left;width:100%;height:150px;display:block;overflow:hidden;margin:0}
#related-box .gambar a{width:100%;height:100%;position:relative;display:block;z-index:1;overflow:hidden}
#related-box .gambar img{width:100%;height:100%;display:block;object-fit:cover}
#related-box .info{padding:0 0 15px;margin:10px 0 20px}
#related-box .info a{float:left;text-transform:uppercase;font-size:17px;color:#222;font-weight:600;line-height:normal/*;border-bottom:1px solid #eee*/;text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}
#related-box .info h3{margin:0}
#related-box .navigation{float:right;position:absolute;width:auto;left:12px;bottom:12px}
#related-box .navigation a{float:left;border:1px solid rgba(0,0,0,0.2);margin:3px;font-size:12px;width:26px;height:26px;line-height:26px;text-align:center;border-radius:100%}
#related-box .navigation a:hover{background:#f88c00;color:#fff;border:1px solid rgba(0,0,0,0.24)}
#related-box .navigation i{margin-right:0}
#related-box .navigation .left{float:left!important}
#related-box .navigation .right{float:right!important}
#related-box .navigation .left,#related-box .navigation .right{width:auto!important;text-align:inherit!important}
#related-box .gambar,#related-box .info{float:left;width:100%;box-sizing:border-box;display:block}
.relatedshow{position:fixed;bottom:40px;right:-50px;transition:all .5s;z-index:9999;margin:0 10px 0 0}
.relatedshow a{color:#fff;background:#F88C00;border-radius:100%;box-shadow:0 0 10px rgba(0,0,0,0.2);float:right;height:40px;width:40px;line-height:42px;text-align:center}
.relatedshow i{margin-right:0}
.gambar a{display:block!important;background:#000;font-size:0}
.gambar a:hover img{opacity:.3!important}
.gambar{margin-right:15px;position:relative;line-height:0}
.gambar a:hover .overlay-icon:before{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}
.overlay-icon:before{content:'\f028';color:#FFF;display:block;position:absolute;top:50%;left:50%;border:3px solid #FFF;border-radius:100%;width:40px;height:40px;line-height:40px;text-align:center;font-size:18px;margin:-20px 0 0 -20px;opacity:0;-webkit-backface-visibility:hidden;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}
.gambar img{height:auto;max-width:100%;width:100%;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}
.gambar{opacity:1;-webkit-transition:all .4s ease-in-out;-moz-transition:all .4s ease-in-out;-o-transition:all .4s ease-in-out;transition:all .4s ease-in-out}
</style>
Bước 2: Tìm đến thẻ <data:post.body/> tuy nhiên kết quả sẽ cho nhiều hơn 1, vì vậy bạn cần thử từng cái (nên backup template nếu có lỗi thì còn mẫu để cập nhật lại), nhớ không lầm là cái thứ 3
Sau đó bạn dán code sau phía dưới thẻ vừa tìm được
<script type='text/javascript'>
//<![CDATA[
!function(){var a={homepage:"https://www.toishare.net",title:"Nên xem:",post:10,date:!0,scr:500,showcredit:!0};if("object"==typeof relatedbox)for(var b in relatedbox)a[b]=relatedbox[b];var c='<div class="relatedshow" style="right: 0px;"><a href="#"><i class="fa fa-plus"></i></a></div><div id="related-box" style="transform: translateX(400px);"><div class="tombol"><a href="#" class="close"><i class="fa fa-times"></i></a></div><div class="header"><h2>'+a.title+'</h2></div><div class="list">',d="object"==typeof labelArray&&labelArray.length?"/-/"+shuffle(labelArray)[0]:"",f=0;$.ajax({type:"GET",url:a.homepage+"/feeds/posts/summary"+d+"?max-results="+a.post+"&alt=json-in-script",async:!0,contentType:"application/json",dataType:"jsonp",success:function(b){var d=b.feed.entry;if(d){for(var e=0;e<d.length;e++){for(var g,h=d[e],i=0;i<h.link.length;i++)if("alternate"==h.link[i].rel){var j=h.link[i].href;break}g=void 0!==h.media$thumbnail?h.media$thumbnail.url.replace("s72-c","w"+f+"-h400-c"):"https://i.imgur.com/NmnW1Y1.jpg";var k=h.title.$t;c+='<div class="item"><div class="gambar"><a href="'+j+'"><img class="thumbpost2" src="'+g+'"/><span class="fa overlay-icon"></span></a></div><div class="info"><h3><a href="'+j+'">'+k+"</a></h3></div></div>"}var m=a.showcredit?'':"";c+='</div><div class="navigation"><div class="left"><a href="#"><i class="fa fa-chevron-left"></i></a></div><div class="right"><a href="#"><i class="fa fa-chevron-right"></i></a></div></div>'+m}$("body").append(c),$("#related-box").each(function(){function i(){$("#related-box").css({transform:"translateX(400px)"}),$(".relatedshow").css("right",0)}function j(){$("#related-box").css({transform:"translateX(0)"}),$(".relatedshow").css("display","none")}for(var b=$(this).find(".list"),c=$(this).find(".left a"),d=$(this).find(".right a"),e=0,f=0,g=!0,h=1;h<$(this).find(".item").length;h++)e+=$(this).find(".item").outerWidth();b.width(e+$(this).find(".item").outerWidth()),c.click(function(a){a.preventDefault(),0==f?f=-e:f+=300,b.css("transform","translateX("+f+"px)")}),d.click(function(a){a.preventDefault(),f==-e?f=0:f-=300,b.css("transform","translateX("+f+"px)")}),$(".relatedshow").click(function(a){a.preventDefault(),j()}),$(this).find(".close").click(function(a){a.preventDefault(),i(),g=!1}),$(window).scroll(function(){var b=$(window).scrollTop();b>a.scr&&g?j():b<a.scr&&g&&i()})})}})}();
//]]>
</script>
Code này mình lấy từ https://blogthuthuat.net/hop-bai-viet-lien-quan/ và về mod lại :3
// Tìm https://www.toishare.net và thay thành link blog của bạn nhé
Chúc bạn thành công !

Thứ Bảy, 25 tháng 8, 2018

Hướng dẫn thêm mục giới thiệu tác giả vào blogspot

Good Morning, theo yêu cầu của một số bạn thì hôm nay mình sẽ hướng dẫn các bạn thêm mục giới thiệu tác giả vào blogspot nha

HƯỚNG DẪN CÁCH LÀM:

Bước 1: Vào trang Chủ đề của blogspot -> Chỉnh sửa HTML và dán đoạn code bên dưới xuống dưới thẻ <body> hoặc trên thẻ </body> cũng đều được
<div class='popup-wrapper' id='popup'>
<div class='popup-container'>
<div class='boxinner'>
<div class='circle'/>
<div class='circle'/>
<div class='circle'/>
<div class='contentbox'>
<kepala><span id='textlogo'><data:blog.title/></span>
<a class='popup-close' href='#closed' title='Close'>&#215;</a>
</kepala>
<br/>
<div class='scrollbarbox'>
<div class='innerone'>
<div id='aboutus'>
<img expr:alt='data:blog.title' expr:title='data:blog.title' src='https://cdn1.iconfinder.com/data/icons/user-pictures/100/male3-512.png'/><br/>
<script src='/feeds/posts/default?alt=json-in-script&amp;callback=getposts'/><br/>
<p>ToiShare.Net là một blog cá nhân, nơi tôi chia sẻ các mẹo về Blogger/Blogspot, Facebook, Photoshop</p><br/>
<p>Hy vọng rằng trong tương lai blog này có thể cung cấp những đóng góp và thông tin hữu ích cho tất cả các bạn. Cảm ơn bạn!</p>
</div></div></div>
<div id='left'>
<div class='taber1'><a expr:title='data:blog.title' href='/' rel='nofollow' target='_blank'><data:blog.title/></a></div>
<div class='taber2'><a href='https://plus.google.com/+TrầnThanhBình' rel='nofollow' target='_blank' title='Follow Us On Google+'>Google+</a></div>
<div class='taber3'><a href='https://www.facebook.com/6666666.info' rel='nofollow' target='_blank' title='Follow Us On Facebook'>Facebook</a></div>
<div class='taber4'><a href='#' rel='nofollow' target='_blank' title='Follow Us On Twitter'>Twitter</a>
</div>
<div class='taber6'><a href='#' rel='nofollow' target='_blank' title='Follow Us On Codepen'>Codepen</a></div>
<div class='taber7'><a href='https://www.blogger.com/follow-blog.g?blogID=2016773409250385719' rel='nofollow' target='_blank' title='Join this blog'>Join this blog</a></div>
</div></div></div></div></div>
Bước 2: Thêm đoạn code này vào chỗ bạn muốn nó hiển thị <li class='infotoishare'><a class='popup-link' href='#popup'><i aria-hidden='true' class='fa fa-address-card'/>Info</a></li>
Ví dụ ở đây mình thêm vào menu
Bước 3: Thêm css phía dưới lên trên thẻ ]]></b:skin> hoặc thêm nó vào trong cặp thẻ <style>...</style> đều được
/* CSS Widget Info About Us */
.boxinner{z-index:99;width:100%;height:550px;position:absolute;left:50%;margin-left:-250px;background-color:#e9e8e9;top:50px;box-shadow:0 0 70px 0 rgba(0,0,0,0.1)}
.boxinner{border-radius:6px}
.contentbox{border-radius:0 0 6px 6px}
#left{border-radius:0 0 6px 0}
.contentbox{border-top:1px solid #cbcbcb;position:absolute;background-color:#fff;top:40px;right:0;left:0;bottom:0}
.circle{float:left;height:12px;width:12px;margin:14px 0 0 10px;border-radius:50%;border:1px solid #0000000f}
.circle:first-child{background:#f56252;margin-left:15px}
.circle:nth-child(2){background:#fac000}
.circle:nth-child(3){background:#42cc01}
kepala{background:#cfcfcf;height:50px;width:100%;position:inherit}
#textlogo{background:#f7f7f7;color:#120d04;padding-top:15px;text-align:center;font-weight:700;font-size:15px;position:inherit;height:70%;width:58.4%;box-sizing:initial;}
#left{background:#222;color:#fff;top:50px;bottom:0;right:0;width:250px;position:inherit}
#left a{color:#bdc3c7;}#left a:hover{color:#fff;}
.taber1,.taber2,.taber3,.taber4,.taber5,.taber6,.taber7{cursor:pointer;font-size:14px;padding:15px 25px;color:#bdc3c7;}
.taber1:hover{background:#f88c00;color:#fff}.taber2:hover{background:#e74c3c;color:#fff}.taber3:hover{background:#2980b9;color:#fff}.taber4:hover{background:#27C9E9;color:#fff}.taber5:hover{background:#3ca9d0;color:#fff}
.taber6:hover{background:#1abc9c;color:#fff}.taber7:hover{background:#f39c12;color:#fff}
#left .taber1:hover a,#left .taber2:hover a,#left .taber3:hover a,#left .taber4:hover a,#left .taber5:hover a,#left .taber6:hover a,#left .taber7:hover a{color:#fff}
#aboutus{top:50px;width:59%;padding:10px;color:#444;text-align:left;position:inherit;float:left;line-height:normal;font-size:15px}
#aboutus img{margin:10px auto 0 auto;display:table;border-radius:100%;max-width:140px;box-shadow:0 0 0 5px rgba(0,0,0,.03)}
#aboutus p{line-height:17px}
.scrollbarbox{overflow:hidden;text-align:justify;margin-top:45px}
.scrollbarbox .innerone{height:480px;overflow:auto}}
a.popup-link{border-bottom:3px solid #e2e2e2;border-radius:3px;padding:8px 40px!important;background:#fff;color:#555!important;text-align:center;letter-spacing:1px;margin-right:10px}
#popup{display:none;}
#popup:target{background:url(https://hdqwalls.com/download/mac-osx-sierra-lu-2560x1440.jpg);display:block;position:fixed;top:0;left:0;right:0;bottom:0;margin:0;z-index:999;transition:all .3s}
.popup-container{position:relative;margin:0 auto;padding:20px}
a.popup-close{position:relative;top:5px;border-radius:50px;float:right;right:5px;margin:0 auto;padding:7px;font-weight:bold;font-size:30px;text-decoration:none;line-height:1;color:#737376}
a.popup-close:hover{color:#737376}
.totalposts{margin:auto;display:table;text-align:center}
.totalposts .totalnumber{background:#00c700;color:#fff;display:inline;font-weight:700;font-size:50px;padding:2px 7px 0px 7px;border-radius:3px}
.totalposts .totallabel{display:block;text-transform:none;color:#222}
li.infotoishare{float:right!important;background:#f8f9fa}
li.infotoishare a{color:#00c700!important;padding:8px 139px!important}
li.infotoishare:hover,li.infotoishare a:hover{background:#00c700!important;color:#fff!important}
@media (min-width:768px){.popup-container{width:600px}}
@media (max-width:767px){.popup-container{width:100%}}
@media screen and (max-width: 1138px) {
#popup,.infotoishare{display:none!important}
}
Vậy là xong rồi.
Chúc bạn thành công!

Thứ Hai, 13 tháng 8, 2018

Cách thêm Light Gallery vào chủ đề blogspot

Xin chào đọc giả của Tôi Share blog, theo yêu cầu của một số bạn bảo mình chia sẻ cách thêm trình chiếu ảnh cho blogspot thì hôm nay mình sẽ viết bài hướng dẫn cách để thêm nó và code này mình lấy bên https://www.arlinadzgn.com nhé.

Các bạn có thể xem demo bên dưới

Hướng dẫn cách làm

Bước 1: Vào trang chủ đề tìm thẻ </body> và thêm toàn bộ đoạn code bên dưới lên thẻ vừa tìm được
<script src='https://cdn.rawgit.com/Arlina-Design/FlamingTree/c5d422c5/lightgallery.js'/>
<link href='https://cdn.jsdelivr.net/lightgallery/1.3.9/css/lightgallery.css' rel='stylesheet'/>
<script type='text/javascript'>
//<![CDATA[
$('#animated-thumbnail').lightGallery({thumbnail:true,getCaptionFromTitleOrAlt:true,selector:"a[imageanchor]"});
//]]>
</script>
Bước 2: Tìm tất cả đoạn <div class='post-body entry-content'
itemprop='articleBody'>
và thay hết thành đoạn này <div class='post-body entry-content' id='animated-thumbnail' itemprop='articleBody'>
Chúc bạn thành công!

Chủ Nhật, 12 tháng 8, 2018

Tạo tiện ích copy link bài viết cho blogspot

Chào các bạn hôm nay mình sẽ hướng dẫn các bạn tạo tiện ích copy link bài viết cho blogspot


Hướng dẫn cách làm

Để tạo tiện ích này, làm những yêu cầu sau:
Bước 1: Vào chỉnh sửa HTML và chèn toàn bộ đoạn Code bên dưới lên trên thẻ đóng </body>
<!-- Copy link -->
<style>
.at-button{z-index:10000000;position:fixed;right:24px;bottom:24px;background:#FFF;width:48px;height:48px;padding:12px;border-radius:100%;box-sizing:border-box;color:#666;-webkit-animation:at-ripple .6s linear infinite;animation:at-ripple .6s linear infinite}
.at-button:hover i{-webkit-transform:rotate(135deg);transform:rotate(135deg)}
.at-button i{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);transition:.3s ease}
@-webkit-keyframes at-ripple {
0%{box-shadow:0 4px 10px rgba(102,102,102,0.1),0 0 0 0 rgba(102,102,102,0.1),0 0 0 5px rgba(102,102,102,0.1),0 0 0 10px rgba(102,102,102,0.1)}
100%{box-shadow:0 4px 10px rgba(102,102,102,0.1),0 0 0 5px rgba(102,102,102,0.1),0 0 0 10px rgba(102,102,102,0.1),0 0 0 20px rgba(102,102,102,0)}
}
@keyframes at-ripple {
0%{box-shadow:0 4px 10px rgba(102,102,102,0.1),0 0 0 0 rgba(102,102,102,0.1),0 0 0 5px rgba(102,102,102,0.1),0 0 0 10px rgba(102,102,102,0.1)}
100%{box-shadow:0 4px 10px rgba(102,102,102,0.1),0 0 0 5px rgba(102,102,102,0.1),0 0 0 10px rgba(102,102,102,0.1),0 0 0 20px rgba(102,102,102,0)}
}
</style>
<a class='at-button' href='javascript:;' onclick='CopyLink()'><i class='material-icons'>link</i></a>
<!-- End -->
Bước 2: Thêm đoạn js bên dưới lên trên thẻ </head>
<script>
function copyTextToClipboard(e){var t=document.createElement(&quot;textarea&quot;);t.style.position=&quot;fixed&quot;,t.style.top=0,t.style.left=0,t.style.width=&quot;2em&quot;,t.style.height=&quot;2em&quot;,t.style.padding=0,t.style.border=&quot;none&quot;,t.style.outline=&quot;none&quot;,t.style.boxShadow=&quot;none&quot;,t.style.background=&quot;&quot;,t.value=e,document.body.appendChild(t),t.select();try{document.execCommand(&quot;copy&quot;),alert(&quot;Đã sao chép liên kết!&quot;)}catch(o){alert(&quot;Không thể sao chép liên kết!&quot;)}document.body.removeChild(t)}function CopyLink(){copyTextToClipboard(location.href)}
</script>
Demo tiện ích
Chúc bạn thành công!

Thứ Bảy, 21 tháng 7, 2018

Tạo menu Responsive cho blog của bạn

Chào các bạn hôm nay mình sẽ hướng dẫn các bạn tạo menu cho blog Responsive với tất cả các màn hình.

Hướng dẫn cách làm

Bước 1: Thêm đoạn code menu này vào chỗ bạn muốn nó hiển thị
<!-- Menu List -->
<div id='header-tail'>
<div class='menu section row' id='menu'>
<ul id='nav'>
<li><a href='/'><i class='fa fa-home'/> Home</a></li>
<li class='hasSub'>
<a href='#'>
<i class='fa fa-lightbulb-o'/> THỦ THUẬT</a>
<ul id='sub-menus'>
<li class='menu-items'>
<a href='/search/label/Facebook?&amp;max-results=9'>Thủ thuật Facebook </a>
</li>
<li class='menu-items'>
<a href='/search/label/Blogspot?&amp;max-results=9'>Thủ thuật Blogspot </a>
</li>
</ul>
</li>
<li class='hasSub'>
<a href='#'>
<i class='fa fa-picture-o'/> HÌNH ẢNH</a>
<ul id='sub-menus'>
<li class='menu-items'>
<a href='/search/label/Ảnh%20Đại%20Diện'>Ảnh đại diện</a>
</li>
<li class='menu-items'>
<a href='/search/label/Ảnh%20Bìa%20Facebook'>Ảnh bìa Facebook</a>
</li>
<li class='menu-items'>
<a href='/search/label/12%20Cung%20Hoàng%20Đạo'>12 cung hoàng đạo</a>
</li>
</ul>
</li>
<li class='hasSub'>
<a href='#'>
<i class='fas fa-cog'/> CÔNG CỤ</a>
<ul id='sub-menus'>
<li class='menu-items'>
<a href='/p/photoshop.html'>Photoshop online </a>
</li>
<li class='menu-items'>
<a href='/p/font-awesome.html'>Font Awesome </a>
</li>
<li class='menu-items'>
<a href='/p/viet-chu-gach-ngang_22.html'>Status gạch ngang </a>
</li>
<li class='menu-items'>
<a href='/p/viet-chu-nguoc.html'>Status chữ ngược </a>
</li>
<li class='menu-items'>
<a href='/p/html-editor.html'>Kiểm tra Code </a>
</li>
<li class='menu-items'>
<a href='/p/nen-css.html'>Nén CSS </a>
</li>
<li class='menu-items'>
<a href='/p/ma-hoa-html.html'>Mã hóa Html </a>
</li>
</ul>
</li>
<li class='hasSub mega-menu'><a href='#add'><i class='fas fa-ellipsis-h'/></a>
<ul class='sub-menu1' style='width:450px;background:#fff'>
<div class='colst1'>
<li class='stb'><a href='/search/label/Blogger?&amp;max-results=9'>Template blogspot</a></li>
<li><a href='/search/label/Blogger?&amp;max-results=9'>Template blogger</a></li>
</div>
<div class='colst2'>
<li class='stb'><a href='#'>Thủ thuật blogger</a></li>
<li><a href='/search/label/Blogger?&amp;max-results=9'>Thủ thuật blogspot</a></li>
</div>
<div class='colst3'>
<li class='stb'><a href='#'>Hướng dẫn</a></li>
<li><a href='/search/label/Blogger?&amp;max-results=9'>Fix lỗi blogspot</a></li>
</div>
</ul>
</li>
</ul>
</div>
</div>
Bước 2: Thêm đoạn JS này lên trên thẻ </body> cho nó Responsive
<script type='text/javascript'>
//<![CDATA[
// Sub menu
(function(c){c.fn.hoverTimeout=function(d,e,f,g){return this.each(function(){var a=null,b=c(this);b.hover(function(){clearTimeout(a);a=setTimeout(function(){e.call(b)},d)},function(){clearTimeout(a);a=setTimeout(function(){g.call(b)},f)})})}})(jQuery);
(function(e){e.fn.replaceText=function(t,n,r){return this.each(function(){var i=this.firstChild,s,o,u=[];if(i){do{if(i.nodeType===3){s=i.nodeValue;o=s.replace(t,n);if(o!==s){if(!r&&/</.test(o)){e(i).before(o);u.push(i)}else{i.nodeValue=o}}}}while(i=i.nextSibling)}u.length&&e(u).remove()})}})(jQuery);
window.selectnav=function(){"use strict";var e=function(e,t){function c(e){var t;if(!e)e=window.event;if(e.target)t=e.target;else if(e.srcElement)t=e.srcElement;if(t.nodeType===3)t=t.parentNode;if(t.value)window.location.href=t.value}function h(e){var t=e.nodeName.toLowerCase();return t==="ul"||t==="ol"}function p(e){for(var t=1;document.getElementById("selectnav"+t);t++);return e?"selectnav"+t:"selectnav"+(t-1)}function d(e){a++;var t=e.children.length,n="",l="",c=a-1;if(!t){return}if(c){while(c--){l+=o}l+=" "}for(var v=0;v<t;v++){var m=e.children[v].children[0];if(typeof m!=="undefined"){var g=m.innerText||m.textContent;var y="";if(r){y=m.className.search(r)!==-1||m.parentNode.className.search(r)!==-1?f:""}if(i&&!y){y=m.href===document.URL?f:""}n+='<option value="'+m.href+'" '+y+">"+l+g+"</option>";if(s){var b=e.children[v].children[1];if(b&&h(b)){n+=d(b)}}}}if(a===1&&u){n='<option value="">'+u+"</option>"+n}if(a===1){n='<select class="selectnav" id="'+p(true)+'">'+n+"</select>"}a--;return n}e=document.getElementById(e);if(!e){return}if(!h(e)){return}if(!("insertAdjacentHTML"in window.document.documentElement)){return}document.documentElement.className+=" js";var n=t||{},r=n.activeclass||"active",i=typeof n.autoselect==="boolean"?n.autoselect:true,s=typeof n.nested==="boolean"?n.nested:true,o=n.indent||"›",u=n.label||"MENU",a=0,f=" selected ";e.insertAdjacentHTML("afterend",d(e));var l=document.getElementById(p());if(l.addEventListener){l.addEventListener("change",c)}if(l.attachEvent){l.attachEvent("onchange",c)}return l};return function(t,n){e(t,n)}}();$(document).ready(function(){selectnav('nav');selectnav('nav1');selectnav('nav3');});
$(document).ready(function(){$("ul#sub-menus").parent("li").addClass("hasSub");$("#header-search .search-icon").click(function(){var e=$("#header-search input");if(e.is(":hidden")){e.fadeIn(300);$(this).removeClass("icon-search");$(this).addClass("icon-cancel");$("#menu").hide()}else{e.fadeOut(300);$(this).removeClass("icon-cancel");$(this).addClass("icon-search");$("#menu").show()}return false});$(document).bind("click",function(e){if($(e.target).parents("#header-search").length===0){$("#header-search input").fadeOut(300);$("#header-search .search-icn").removeClass("icon-cancel");$("#header-search .search-icn").addClass("icon-search");$("#menu").show()}});$(".menu li").each(function(){$(this).hoverTimeout(0,function(){$(this).children("ul").slideDown()},0,function(){$(this).children("ul").hide()})});var e="[";var t="]";$(".menu li *").replaceText(e,'<span class="msubtitle">');$(".menu li *").replaceText(t,"</span>");$(".menu #nav").show()});
//]]>
</script>
Bước 3: Thêm CSS này lên trên thẻ ]]></b:skin>
#header-tail{position:relative;float:left;width:100%;background:#fff;border-top:1px solid #eee;border-bottom:1px solid #eee;line-height:1.66}
.menu #nav{display:none}
.selectnav{display:none}
.selectnav{font:normal normal 13px Arial, Tahoma, Helvetica, FreeSans, sans-serif;border:0}
.sub-menu{display:none}
#menu li,#menu ul{transition:all 0s ease;-webkit-transition:all 0s ease;-moz-transition:all 0s ease;-o-transition:all 0s ease}
.menu ul li{float:left;padding:5px 0;display:inline;position:relative}
.menu ul li a{text-transform:uppercase;font-size:14px;color:#222;font-weight:500;padding:0 10px;display:block;height:35px;margin:0;position:relative;line-height:34px;}
.menu ul li a:hover{color:#3b5998}
.menu ul li ul li{padding:0;margin:0;display:block;float:none;background-color:#fff}
.menu ul li ul a:hover{color:#222}
.menu ul .hasSub a{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;-webkit-box-orient:vertical;padding-right:30px}
.hasSub>a:after{right:11px}
.hasSub>a:after{content:'\f101';font-family:'Font Awesome 5 Solid';top:0px;position:absolute;color:#222;font-size:14px}
.mega-menu a:after{display:none}
.hasSub>a:after
.hasSub ul a:after{content:'';line-height:0}
.has-Sub:after{position:absolute;right:7px;top:50%;display:inline-block;content:'';width:0;height:0;border:4px solid transparent;border-top:4px solid #bbb}
.menu ul li ul{box-shadow:0 3px 10px 1px rgba(0,0,0,0.14);border-top:2px solid #3c8dbc;position:absolute;visibility:hidden;z-index:999;padding-top:0px;display:none;width:200px;-moz-transform:inherit;-o-transform:scale(0.7);-webkit-transform:scale(0.7);transform:scale(0.7);transition:all .3s ease-in-out!important;display:block!important;opacity:0;margin-top:3px}
.hasSub:hover>ul{visibility:visible;opacity:1;-moz-transform:scale(1.0);-o-transform:scale(1.0);-webkit-transform:scale(1.0);transform:scale(1.0)}
.menu ul li ul a{text-transform:none;color:#222;height:auto;line-height:16px;line-height:35px;height:35px;font-size:14px;font-weight:400}
.menu ul .mega-menu a{padding:0 11.4px!important}
.mega-menu li .hasSub>a:after{display:none}
.colst1,.colst2,.colst3{width:33.3333333%;padding:0 10px}
.colst1{float:left}
.colst2,.colst3{float:right}
.iconmn{margin:0 5px 0 0}
.stb{border-bottom:1px dotted rgba(0,0,0,0.15)}
@media screen and (max-width: 980px) {
#header-tail{background:#dddfe2;border:0}
.menu.section.row{width:100%!important}
.menu #nav{display:none!important}
.selectnav{display:block!important}
.menu .selectnav{float:left;width:100%;box-sizing:border-box;background-color:#f4f4f4;color:#222;border:2px solid #dddfe2!important;border-radius:3px;position:relative;top:0;height:45.3px;padding:10px}
}
Chúc bạn thành công!

Thứ Ba, 17 tháng 7, 2018

Tạo hộp Search Live blogspot Version 2

Chào các bạn, mình đã trở lại rồi đây. Và hôm nay mình sẽ chia sẻ đến các bạn đoạn cách tạo hộp search live cho blogspot, mẫu này khác hoàn toàn bản share trước đó

HƯỚNG DẪN CÁCH LÀM:

B1: Vào chỉnh sửa HTML và thêm đoạn code phía dưới lên trên thẻ </body> hoặc dưới thẻ <body> cũng được
<!-- Search live -->
<div class='live-search'>
<form class='searchmein' id='search'>
<div class='input'>
<input class='search' onblur='if(this.value==&apos;&apos;)this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value=&apos;&apos;;' type='search' value='Nhập từ khoá cần tìm...'/>
<button class='submit fa fa-search' type='submit' value=''/>
</div>
<button class='fa fa-times' id='close' type='reset' value=''/>
</form>
<div class='search-content'>
<div class='search-result'>
<span/>
</div>
<div class='more-result'>Tải thêm</div>
</div>
</div>
B2: Tìm đoạn </head> và thêm code này lên trên nó
<script type='text/javascript'>
//<![CDATA[
var mql=window.matchMedia("screen and (min-width: 60em)");if(mql.matches){$(function(){$(".searchbutton").on("click",function(){$(".live-search").addClass("active").find(".search").focus()});$(".live-search").on("click",function(){$(this).find(".search").focus()});$("#close").on("click",function(){$(".live-search").removeClass("active")})})};function findit(){var e=$(".search").val(),t=$(".search-item").length+1;if(e.length>=1){$(".search-content").show(),$(".search-filter").attr("data-query",e),$(".search-result span").show().html("Đang tìm kiếm ...");var r="/feeds/posts/default?max-results=12&start-index="+t+"&alt=json&q="+e;$.ajax({type:"GET",url:r,async:!0,contentType:"application/json",dataType:"jsonp",success:function(t){$(".more-result").hide(),doSearch(t,e)}})}else $(".search-content").hide()}function doSearch(e,t){if(e.feed.entry){for(var r=0;r<e.feed.entry.length;r++){for(var n=0;n<e.feed.entry[r].link.length;n++)if("alternate"==e.feed.entry[r].link[n].rel){var a=e.feed.entry[r].link[n].href;break}try{var s=e.feed.entry[r].media$thumbnail.url}catch(i){var s="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUTRYqUF9h7VRKvKr4LGeLd326a6cQfAFwfUQCuUlFez0cliRDg6ig_pP3hrm6jqmK-JXsH_EMxNLFRSnmp31EiL6aACGtsp1T955deeL0oYnvWnibJZMHhR1xKT8bkr1iFFo7I28K_4Iy/s1600/default.png"}var c=e.feed.entry[r].title.$t,h='<div class="search-item"><img src="'+s+'"/><a href="'+a+'" target="_blank">'+c+"</a></div>";$(".search-result").append(h)}$(".search-result span").hide(function(){$(".queryword").html("Show results for:<b>"+t+"</b>"),$(".more-result").show()})}else $(".search-result span").show().html("Không có kết quả"),$(".more-result").hide()}$(".searchmein").submit(function(){return $(".search-item").remove(),findit(),!1}),$(".close-search").click(function(){$(".search-content").hide()}),$(".more-result").click(function(){$(".more-result").hide(),findit()});
//]]>
</script>
B3: Thêm css này lên trên thẻ ]]></b:skin>
input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}
.live-search{position:fixed;overflow:auto;top:10%;left:20%;right:20%;bottom:10%;background:rgba(255,255,255,.99);box-shadow:0 2px 5px rgba(0,0,0,.15);opacity:0;visibility:hidden;transform:scale(1.1);margin:auto;max-width:720px;-webkit-backface-visibility:hidden;-webkit-font-smoothing:antialiased;z-index:1003;transition:transform .6s cubic-bezier(.175,.885,.32,1.275),opacity .3s,visibility .3s}
.live-search.active{opacity:1;visibility:visible;transform:scale(1.0);}
.live-search .searchmein{width:90%;margin:15px auto;padding:10px 0;outline:none;display:block}
#search .input{background:rgba(0,0,0,.01);width:95%;height:40px;margin:20px auto;padding:0 0 0 20px;max-width:1000px;box-shadow:0 0 0 1px rgba(0,0,0,.1);border-radius:3px;transition:all .3s ease-out}
#search .input:active,#search .input:hover{box-shadow:0 0 0 1px rgba(0,0,0,.2)}
#search .input .search{float:left;width:calc(100% - 140px);height:40px;padding:0;margin:0;border:0;outline:0;background:none;font-size:16px;color:rgba(0,0,0,.45);line-height:40px;letter-spacing:1px;transition:all .3s ease-out}
#search .input .submit{display:inline-block;float:right;cursor:pointer;width:14%;height:40px;padding:0;margin:0;border:0;outline:0;background:#30a8e6;font-size:16px;color:rgba(255,255,255,1);text-align:center;line-height:40px;border-radius:0 3px 3px 0;transition:all .3s ease-out}
#search .input .search:focus,#search .input .search:active, #search .input .search:hover{color:rgba(0,0,0,.85);}
#search .input .submit:focus,#search .input .submit:hover {background:#2c9bd5;}
#search #close{cursor:pointer;position:absolute;top:0;right:0;width:45px;height:45px;padding:0;margin:0;border:0;outline:0;font-weight:normal;font-family:fontawesome;background:transparent;color:rgba(0,0,0,.25);text-align:center;line-height:45px}
#search #close:hover {color:rgba(0,0,0,.6);}
.search-content{z-index:6;display:none;position:relative}
.live-search .search:focus {outline:none;}
.search-result{padding:15px;width:90%;margin:0 auto 15px}
.search-result .search-item{overflow:auto;padding:15px 0;border-bottom:1px solid rgba(0,0,0,.07)}
.search-item img{width:60px;height:60px;float:left;border-radius:4px}
.search-item a{width:calc(100% - 80px);float:right;display:block;text-decoration:none}
.search-item a:hover{color:#069;}
.more-result{display:none;cursor:pointer;background:#fff;color:#178dc8;padding:8px;margin:20px auto 40px;max-width:100px;font-size:75%;text-align:center;text-transform:uppercase;border-radius:3px;line-height:normal;letter-spacing:1px;border:1px solid #73bfe5;transition:all .3s ease-out}
.more-result:hover{background:#178dc8;color:#fff;border-color:transparent}
.more-result a{text-decoration:none;color:#fff;}
.more-result:hover a,.more-result a:hover{color:#fff;}
.queryword{font-weight:700}
B4: Thêm đoạn code phía dưới vào menu của blog
<li class='searchbutton' title='Tìm kiếm'></li>
Các bạn có thể xem demo Tại đây nhé
Chúc bạn thành công!

Thứ Tư, 23 tháng 5, 2018

Tạo tiện ích nghe nhạc cho trang web

Xin chào tất cả các bạn hôm nay mình sẽ hướng dẫn các bạn tích hợp tiện ích nghe nhạc vào trang web của các bạn

Hướng dẫn cách làm:

Tìm thẻ </body> và dán toàn bộ đoạn code bên dưới lên trên thẻ vừa tìm
<!-- star music-box -->
<style>
.music-box{position:fixed;width:300px;height:160px;z-index:120;bottom:30px;left:30px}
@media (max-width: 991px) {
.music-box{width:250px;height:120px;left:auto;left:30px}
}
.music-box .music-holder{width:100%;height:100%;border:2px solid #eee;position:absolute;left:0;top:-30px;visibility:hidden;opacity:0;-webkit-transition:all .5s ease-out;-o-transition:all .5s ease-out;transition:all .5s ease-out}
.music-box .music-holder iframe{width:100%;height:100%}
.music-box button{background:rgba(0,0,0,0.1);width:40px;height:40px;line-height:37px;font-size:18px;font-size:1rem;color:#5e9a8e;border:1px solid #e6e6e6;outline:0;padding:0;margin:0;position:absolute;left:0;bottom:0;-webkit-border-radius:50%;-moz-border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;border-radius:50%}
@media (max-width: 991px) {
.music-box button{left:auto;left:0}
}
.music-box .toggle-music-box{top:-50px;visibility:visible;opacity:1}
</style>
<div class='music-box'>
<button class='music-box-toggle-btn'>
<a title='Play music'><i class='fa fa-music'/></a>
</button>

<div class='music-holder'>
<iframe src='https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/342591097&amp;amp;auto_play=true&amp;amp;hide_related=false&amp;amp;show_comments=true&amp;amp;show_user=true&amp;amp;show_reposts=false&amp;amp;visual=true'/>
</div>
</div>
<script type='text/javascript'>
//<![CDATA[
if($(".music-box").length) {var musicBtn = $(".music-box-toggle-btn"),musicBox = $(".music-holder");musicBtn.on("click", function() {musicBox.toggleClass("toggle-music-box");return false;})}
//]]>
</script>
<!-- end music box -->
Chú ý: tracks/342591097 bạn thay thành link nhạc và hãy lưu ý rằng chỉ lấy đoạn tracks/.../
Chúc bạn thành công!

Thêm label dạng tab cho blogspot


Xin chào các bạn hôm nay mình sẽ chia sẻ đến các bạn 1 cách thêm label dạng tab cho blogspot

Hướng dẫn cách làm

Bước 1: Tìm thẻ ]]></b:skin> và dán đoạn css phía dưới lên trên thẻ vừa tìm được
.tabs{background:transparent;width:100%;max-width:100%;float:none;list-style:none;padding:0;margin-bottom:15px;display:table;overflow:hidden}
.tabs:after{content:'display:table;clear:both}
.tabs input[type=radio]{display:none}
.tabs label{display:inline-block;border-radius:2px 2px 0 0;background-color:#fff;padding:10px 20px;border:2px solid #f2f2f2;border-bottom:0;font-size:16px;font-weight:700;color:#8B949D}
.tabs label:hover{background:#f2f2f2;border-color:transparent;color:#8B949D;cursor:pointer}
.tabs label:nth-of-type(1){}
.tabs label i{padding:5px;margin-right:0}
.tab-content{background:#fff;display:none;width:100%;float:left}
.tabs [id^="tab"]:checked + label{color:#fff;background:#8B949D}
#tab1:checked ~ #tab-content1,#tab2:checked ~ #tab-content2,#tab3:checked ~ #tab-content3{display:block}
.tabs [id^="tab"]:checked + label{color:#fff!important;border-color:transparent;background-color:#8b949d}
.tabs-posts{background:transparent;display:block;border-bottom:2px solid #8B949D;height:50px}
.title-post2,.title-post1,.title-post3,.title-post4{font-size:18px;padding:10px 15px;font-weight:400;text-transform:uppercase;text-align:left;color:#fff;line-height:normal;margin:0}
.title-post2{background:#1ABC9C}
#widget-22{box-shadow:#1ABC9C inset}
#widget-22 .featuredPost a:hover{color:#1ABC9C}
#widget-2{box-shadow:0 0 0 1px #f90 inset}
#widget-2 .featuredPost a:hover{color:#f90}
.title-post3{background:#FF4000}
.title-post4{background:#8E44AD}
.readmore{float:right;text-transform:none}
.readmore a,.readmore a:hover{color:#fff!important}
.widget-home{margin:0 0 15px}
.widget-home a{color:#4F5357;text-decoration:none;line-height:normal}
.widget-home a:hover{color:#8B949D}
.widget-homewrap{margin:15px;overflow:hidden}
.widget-home img{float:left;clear:both;object-fit:cover;transition:.33s;margin:0 0 6px;border-radius:3px}
#widget-00{box-shadow:0 0 0 1px rgba(234,25,25,0.77) inset}
#widget-00 .featuredPost a:hover{color:rgba(234,25,25,0.77)}
#widget-0{box-shadow:0 0 0 1px #f90 inset}
#widget-0 .featuredPost a:hover{color:#f90}
.widgetsplitone{width:100%;padding:0;margin:0;overflow:hidden}
.widgetsplitone_left{width:52.5%;padding:0;margin:0;float:left;text-align:left}
.widgetsplitone_right{width:45%;padding:0 0 0 10px;margin:0;float:right}
.imagefeatured{height:264px}
.featuredPost{margin:0;height:90px}
.featuredPost img{margin-right:10px}
.featuredPost a{font-size:16px;font-weight:700}
h5.posttitle{font-size:18px;margin:5px 0;font-weight:700}
h5.posttitle a{color:#4F5357}
.contentstyle{font-size:13px;padding:0 0 10px;color:#8b949d;line-height:170%}
@media screen and (max-width:600px) {
.widgetsplitone_right{width:100%;margin:15px 0 0;padding:0;float:left}
.widgetsplitone_left{width:100%}
.tabs label span{display:none}
.tabs label i{display:block}
}
Bước 2: Tiếp theo bạn hãy tìm thẻ </head> và dán đoạn js dưới lên trên nó
<!-- Post Home -->
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(t,e){for(var s=t.split("<"),i=0;i<s.length;i++)-1!=s[i].indexOf(">")&&(s[i]=s[i].substring(s[i].indexOf(">")+1,s[i].length));return s=s.join(""),s=s.substring(0,e-1)}function showrecentposts1(t){j=showRandomImg?Math.floor((imgr.length+1)*Math.random()):0,img=new Array,numposts5<=t.feed.entry.length?maxpost=numposts1:maxpost=t.feed.entry.length;for(var e=0;e<maxpost;e++){var i,r,n=t.feed.entry[e],l=n.title.$t;if(e==t.feed.entry.length)break;for(var o=0;o<n.link.length;o++)if("alternate"==n.link[o].rel){r=n.link[o].href;break}for(var o=0;o<n.link.length;o++)if("replies"==n.link[o].rel&&"text/html"==n.link[o].type){i=n.link[o].title.split(" ")[0];break}if("content"in n)var m=n.content.$t;else if("summary"in n)var m=n.summary.$t;else var m="";postdate=n.published.$t,j>imgr.length-1&&(j=0),img[e]=imgr[j],s=m,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),-1!=a&&-1!=b&&-1!=c&&""!=d&&(img[e]=d);for(var g=[1,2,3,4,5,6,7,8,9,10,11,12],p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f=(postdate.split("-")[2].substring(0,2),postdate.split("-")[1]),h=(postdate.split("-")[0],0);h<g.length;h++)if(parseInt(f)==g[h]){f=p[h];break}if(0==e){var u='<div class="widgetsplitone_left"><a href="'+r+'"><img width="375" height="262" class="imagefeatured wp-post-image" src="'+img[e]+'"/></a><div class="clear"></div><h5 class="posttitle"><a href="'+r+'">'+l+'</a></h5><div class="contentstyle"><p>'+removeHtmlTag(m,summaryPost)+'...</p></div><div class="clear"></div></div><div class="widgetsplitone_right">';document.write(u)}if(e>0&&e<maxpost){var u='<a href="'+r+'"><img style="margin-right:10px" class="imagewidgetthumb wp-post-image" height="63" src="'+img[e]+'" width="90"/></a><div class="featuredPost"><a href="'+r+'">'+l+"</a></div>";document.write(u)}j++}document.write("</div>")}function showrecentposts3(t){j=showRandomImg?Math.floor((imgr.length+1)*Math.random()):0,img=new Array;for(var e=0;10>e;e++){var i,r,n=t.feed.entry[e],l=n.title.$t;if(e==t.feed.entry.length)break;for(var o=0;o<n.link.length;o++)if("alternate"==n.link[o].rel){r=n.link[o].href;break}for(var o=0;o<n.link.length;o++)if("replies"==n.link[o].rel&&"text/html"==n.link[o].type){i=n.link[o].title.split(" ")[0];break}if("content"in n)var m=n.content.$t;else if("summary"in n)var m=n.summary.$t;else var m="";postdate=n.published.$t,j>imgr.length-1&&(j=0),img[e]=imgr[j],s=m,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),-1!=a&&-1!=b&&-1!=c&&""!=d&&(img[e]=d);for(var g=[1,2,3,4,5,6,7,8,9,10,11,12],p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f=(postdate.split("-")[2].substring(0,2),postdate.split("-")[1]),h=(postdate.split("-")[0],0);h<g.length;h++)if(parseInt(f)==g[h]){f=p[h];break}var u='<li><a href="'+r+'">'+l+"</a></li>";document.write(u),j++}}function showrecentposts6(t){j=showRandomImg?Math.floor((imgr.length+1)*Math.random()):0,img=new Array;for(var e=0;e<numposts;e++){var i,r,n=t.feed.entry[e],l=n.title.$t;if(e==t.feed.entry.length)break;for(var o=0;o<n.link.length;o++)if("alternate"==n.link[o].rel){r=n.link[o].href;break}for(var o=0;o<n.link.length;o++)if("replies"==n.link[o].rel&&"text/html"==n.link[o].type){i=n.link[o].title.split(" ")[0];break}if("content"in n)var m=n.content.$t;else if("summary"in n)var m=n.summary.$t;else var m="";postdate=n.published.$t,j>imgr.length-1&&(j=0),img[e]=imgr[j],s=m,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),-1!=a&&-1!=b&&-1!=c&&""!=d&&(img[e]=d);for(var g=[1,2,3,4,5,6,7,8,9,10,11,12],p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f=(postdate.split("-")[2].substring(0,2),postdate.split("-")[1]),h=(postdate.split("-")[0],0);h<g.length;h++)if(parseInt(f)==g[h]){f=p[h];break}var u='<a href="'+r+'"><img width="266" height="139" class="imagefeatured wp-post-image" src="'+img[e]+'"/></a><div class="clear"></div><h5 class="posttitle"><a href="'+r+'">'+l+'</a></h5><div class="contentstyle"><p>'+removeHtmlTag(m,summaryPost)+'...</p></div><div class="clear"></div>';document.write(u),j++}}imgr=new Array,imgr[0]="#",showRandomImg=!0,aBold=!0,summaryPost=170,summaryPost1=80,summaryTitle=15,numposts=1,numposts1=5,numposts2=4,numposts3=6,numposts4=1,numposts5=6,numposts6=10,numposts7=10,numposts8=6;function removeHtmlTag(a,b){for(var c=a.split("<"),d=0;d<c.length;d++)-1!=c[d].indexOf(">")&&(c[d]=c[d].substring(c[d].indexOf(">")+1,c[d].length));return c=c.join(""),c=c.substring(0,b-1)}function showrecentposts(e){j=showRandomImg?Math.floor((imgr.length+1)*Math.random()):0,img=new Array,document.write("<ul>");for(var f=0;f<numposts1;f++){var i,k,g=e.feed.entry[f],h=g.title.$t;if(f==e.feed.entry.length)break;for(var l=0;l<g.link.length;l++)if("alternate"==g.link[l].rel){k=g.link[l].href;break}for(var l=0;l<g.link.length;l++)if("replies"==g.link[l].rel&&"text/html"==g.link[l].type){i=g.link[l].title.split(" ")[0];break}if("content"in g)var m=g.content.$t;else if("summary"in g)var m=g.summary.$t;else var m="";postdate=g.published.$t,j>imgr.length-1&&(j=0),img[f]=imgr[j],s=m,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),-1!=a&&-1!=b&&-1!=c&&""!=d&&(img[f]=d);for(var n=[1,2,3,4,5,6,7,8,9,10,11,12],o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],q=(postdate.split("-")[2].substring(0,2),postdate.split("-")[1]),t=(postdate.split("-")[0],0);t<n.length;t++)if(parseInt(q)==n[t]){q=o[t];break}var v='<li class="car"><div class="thumb"><a href="'+k+'"><img width="150" height="100" class="alignnone" src="'+img[f]+'"/></a></div><p><a class="slider_title" href="'+k+'">'+h+"</a></p></li>";document.write(v),j++}document.write("</ul>")}imgr=new Array,imgr[0]="http://i.imgur.com/jw3ihv1.png",showRandomImg=!0,aBold=!0,summaryPost=140,summaryTitle=25,numposts1=6,label1="news";
//]]>
</script>
Bước 3: Cuối cùng bạn hãy thêm đoạn code này vào chỗ bạn muốn nó hiển thị (thường là dưới header)
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- Post Home -->
<div class='tabs'>
<div class='tabs-posts'>
<input checked='' id='tab1' name='tabs' type='radio'/>
<label for='tab1'><i class='fa fa-rss'/> <span>Bài mới</span>
</label>
<input id='tab2' name='tabs' type='radio'/>
<label for='tab2'><i class='fa fa-html5'/> <span>Blogger</span>
</label>
<input id='tab3' name='tabs' type='radio'/>
<label for='tab3'><i class='fa fa-file-code-o'/> <span>Template Blogger</span>
</label>
<div class='clear' style='margin-bottom:20px'/>
<!-- Tab 1 -->
<div class='tab-content' id='tab-content1'>
<b:section id='tab1' preferred='yes'>
<b:widget id='HTML63' locked='false' title='All Bài Viết' type='HTML' version='1'>
<b:widget-settings>
<b:widget-setting name='content'><![CDATA[<script> document.write("<script src=\"/feeds/posts/default?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts1\"><\/script>"); </script>]]></b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<div class='widget-home'>
<div class='widget-homewrap'>
<div class='widget-homesplitone'>
<data:content/>
</div></div></div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>
</div>
<!-- Tab 2 -->
<div class='tab-content' id='tab-content2'>
<b:section id='tab2' preferred='yes'>
<b:widget id='HTML64' locked='false' title='Blogger' type='HTML' version='1'>
<b:widget-settings>
<b:widget-setting name='content'><![CDATA[<script> document.write("<script src=\"/feeds/posts/default/-/Blogger?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts1\"><\/script>"); </script>]]></b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<div class='widget-home'>
<div class='widget-homewrap'>
<div class='widget-homesplitone'>
<data:content/>
</div></div></div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>
</div>
<!-- Tab 3 -->
<div class='tab-content' id='tab-content3'>
<b:section id='tab3' preferred='yes'>
<b:widget id='HTML65' locked='false' title='Template Blogger' type='HTML' version='1'>
<b:widget-settings>
<b:widget-setting name='content'><![CDATA[<script> document.write("<script src=\"/feeds/posts/default/-/Template%20Blogger?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts1\"><\/script>"); </script>]]></b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<div class='widget-home'>
<div class='widget-homewrap'>
<div class='widget-homesplitone'>
<data:content/>
</div></div></div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>
</div>
</div>
</div>
</b:if>
* Phần được tô đỏ các bạn thay thành tên nhãn cần hiện nhé
Chúc bạn thành công!