Phân trang có đánh số cho blogspot
Chào các bạn!
Phân trang cho blog vô cùng quan trọng vì giúp độc giả tiếp cận bài viết nhanh hơn, hơn nữa hiện nay một số Template chưa hỗ trợ phân trang đánh số.
Hôm nay toptienich share các bạn cách phân trang blog có đánh số với demo như hình trên nhé!
Bước 1: Đăng nhập vào blogger
Bước 2: Chọn Mẫu.
Bước 3: Chọn chỉnh sửa HTML.
Bước 4: Tìm thẻ ]]></b:skin>
Bước 5: Coppy rồi dán đoạn mã sau lên trước ]]></b:skin>
.showpageArea {
color: #666666;
margin: 10px 5px 3px 5px;
padding: 0px;
float: left;
display: inline;
font-size:12px;
}
.showpageArea a {
background: #ffffff;
padding: 4px 7px;
margin: 0px 5px 0px 0px;
text-decoration: none;
border: 1px solid #9E0909;
color: #666666;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display: inline;
float: left;
}
.showpageNum a {
background: #ffffff;
padding: 4px 7px;
margin: 0px 5px 0px 0px;
text-decoration: none;
border: 1px solid #9E0909;
color: #666666;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display: inline;
float: left;
}
.showpageNum a:hover {
background: #FAE2E2 !important;
text-decoration: none;
border: 1px solid #9E0909 !important;
}
.showpagePoint {
font-weight: bold;
background: #FAE2E2;
padding: 4px 7px;
margin: 0px 5px 0px 0px;
text-decoration: none;
border: 1px solid #9E0909;
color: #666666;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display: inline;
float: left;
}
.showpageOf {
background: #ffffff;
padding: 4px 7px;
margin: 0px 5px 0px 0px;
text-decoration: none;
border: 1px solid #9E0909;
color: #666666;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display: inline;
float: left;
}
.showpage a {
background: #ffffff;
padding: 4px 7px;
margin: 0px 5px 0px 0px;
text-decoration: none;
border: 1px solid #B9A2A2;
color: #674D4D;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display: inline;
float: left;
}
.showpage a:hover {
background: #FCE4E4 !important;
text-decoration: none;
border: 1px solid #9E0909 !important;
}
.showpageNum a:link,.showpage a:link {
background: #ffffff;
padding: 4px 7px;
margin: 0px 5px 0px 0px;
text-decoration: none;
border: 1px solid #9E0909;
color: #666666;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display: inline;
float: left;
}
Bước 6: Dán đoạn mã sau lên trên (trước) thẻ đóng </body>
<script type="text/javascript">
var home_page="/";
var urlactivepage=location.href;
var postperpage=7;
var numshowpage=4;
var upPageWord ='Prev';
var downPageWord ='Next';
</script>
<script src="http://bplugins.googlecode.com/files/pagenumbers.js" type="text/javascript"></script>
Bước 7: Lưu template.