DEMO
Việc áp dụng thủ thuật này có liên quan đến thủ thuật tạo số đếm nhận xét vì thế kết hợp hai thủ thuật lại với nhau để đơn giản hóa code, theo các bước sau đây:
Bước 1. Đăng nhập Blogger, vào Design >> Edit Template, chọn Expand Widget Templates. Đặt kịch bản gán lớp nhận xét chẳn và lẻ vào trước thẻ </head>.
<script type='text/javascript'>
//<![CDATA[
function counterComments(strx) {
var therest;
therest = CommentsCounter % 2;
if (therest == 0) {
document.getElementById(strx).className='evenComments';
} else {
document.getElementById(strx).className='oddComments';
}
}
//]]>
</script>
Bước 2. Tìm dòng <b:loop values='data:post.comments' var='comment'>
Và thay nó bằng đoạn code bên dưới:
<!-- đếm nhận xét từ Zero -->
<script type='text/javascript'>var CommentsCounter=0;</script>
<b:loop values='data:post.comments' var='comment'>
<!-- gắn ID cho từng nhận xét -->
<div class='' expr:id='data:comment.id'>
Tiếp tục tìm dòng code: <data:commentPostedByMsg/> (dòng này hiển thị chữ says/said/nói, tùy theo Template bạn có thể đặt đoạn code bên dưới theo ý muốn) rồi chèn bên dưới nó bằng đoạn code sau:
<span class='comment-counter'>
<a expr:href='"#comment-" + data:comment.id' title='Comment Link'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter)
</script>
</a>
</span>
Tiếp theo tìm đến thẻ đóng </b:loop> cho thẻ <b:loop values='data:post.comments' var='comment'> rồi đặt trước nó bằng đoạn code bên dưới:
<!-- thiết lập lớp cho nhận xét -->
<script type='text/javascript'>
counterComments('<data:comment.id/>')
</script>
</div>
Bước 3. Đặt code CSS vào trước dòng ]]></b:skin>.
- /* số đếm nhận xét */
- .comment-counter {
- float: right;
- display: block;
- width: 40px;
- margin-top: -30px;
- text-align: right;
- font-family: 'Century Gothic','Lucida Grande',Arial,Helvetica,Sans-Serif;
- font-size: 28px;
- font-weight: normal;
- }
- .comment-counter a:link, .comment-counter a:visited {color: #445566 !important;}
- .comment-counter a:hover, .comment-counter a:active {color: #FF9933 !important;}
- /* thuộc tính phân biệt nhận xét chẳn và lẻ */
- .evenComments { /* nhận xét chẳn */
- margin: 10px 0px;
- padding: 5px 20px 0px;
- background-color: #F0F0F9;
- border:1px solid #DDD;
- }
- .oddComments { /* nhận xét lẻ */
- margin: 10px 0px;
- padding: 5px 20px 0px;
- background-color: #F0F8FF;
- border:1px solid #DDD;
- }
Về style cho CSS bạn có thể tự tùy biến và vận dụng linh hoạt cho blogspot của mình. Lưu Template là hoàn thành.
mont blanc
ReplyDeletereal madrid jersey
rolex watches
air jordan 13
cartier watches
tiffany and co jewelry
north face jackets
michael kors outlet
babyliss hair dryer
nhl jerseys wholesale
san antonio spurs jerseys
oakley sunglasses
minnesota vikings jerseys
hollister clothing
kate spade outlet
swarovski jewelry
ghd hair straighteners
toms shoes
new england patriots jerseys
lacoste polo shirts
instyler ionic styler
mac cosmetics
puma shoes
timberland boots
true religion sale
futbol baratas
kobe 9 shoes
adidas wings
new york knicks jersey
adidas wings
ferragamo shoes
michael kors outlet
tory burch flats
mont blanc pens for sale
herve leger sale
los angeles clippers jerseys
seattle seahawks jerseys
zheng123 7.16
nike running shoes, rolex, rolex replica, watches for men, juicy couture handbags, nike free run 5.0, louis vuitton outlet stores, polo ralph lauren, nike huaraches, p90x workout schedule, air jordan shoes, ralph lauren outlet online, air max thea, cheap michael kors, mcm backpack, pandora jewellery australia, ugg boots clearance, burberry, lululemon australia, ugg boots clearance, dre headphones, cheap michael kors, ray bans, nike free 5.2, louis vuitton canada, cheap nfl jerseys, oakley outlet, new balance, uggs, ralph lauren, abercrombie kids, bottega veneta, air jordans, oakley sunglasses, rayban, lululemon outlet, the north face, indoor soccer shoes, cheap eyeglasses online, dre headphones, christian louboutin, jordans, prada sneakers, p90x workout sheets, ray ban, nike mercurial superfly, free running, eyeglasses frames
ReplyDeleteThat is, those tall and upper body stephen curry under armour shoes, tendon bright and adult men who uplift, are also looking over, with a smile. They are the strongest man in the village, are hunting and the guardian of the village's most important force,
ReplyDeletealso in forging body, unknown monster was holding the bones of the skeleton polished stick, Under Armour Curry 1 was also holding a black metal casting into a broadsword, forced dancing, wind thunder.
The living environment is extremely poor, more poisonous prehistoric beast, for food, in order to survive, many stephen curry under armour shoes still minors on premature mortality in the wilderness, you want to live, only strong relies instead.
"Nike lebron 13 record the moment, nine plus three non-partisan opposition candidate,
Mr competition, lebron 13 low are a major killer, reduce the number of immigrants;
2, ahead of the release of the provident fund; 3, the transparency of open government overseas investment; 4, increase the annual release of personal government surplus;.
5, increase the number of parliament of the opposition,nike lebron 12 low in order to supervise the rights of the government's overly centralized and some piecemeal proposals, too extreme,
not a multi-Syrian "capable breath summary Side explained his observations, beckoned, let hawkers also gave him a cup of coffee.
"Onecup, eathere coffee C include loose!"
"Toss a few decades, Nike lebron 13 still these ideas, new ideas much,
I have heard political parties presented residents can buy a HDB flat, living one, rent one, to the Housing Endowment,
which is also a good idea . "another nike lebron 12 low inserted the sentence, not his age, but the five-year-old should have to show obvious signs to read music on his forehead,
even treble symbol sprouts are fresh.
New air max suddenly realized: "You see my memory, said how so familiar, turned out to be yi yi Wei Wei, I do not know if you remember many years ago,