Quảng Cáo/ Thông Báo của lớp báo k32

Tổng số Khách

Thứ Tư, 12 tháng 9, 2012

Recent post cho trang chủ blogger style 2


Hôm nay namkna giới thiệu thêm cho các bạn một mẫu recent post mới để trang trí cho trang chủ của blog. Tiện ích đơn giản, load nhanh và dễ áp dụng. Tiện ích bao gồm một khung bài viết mới nhất tổng quát trên cùng, và các khung bài viết mới nhất cho từng nhãn bên dưới. Blog của bạn sẽ mang phong cách Magazine (báo trí), travel (du lịc) hoặc chuyên nghiệp hơn.


»Một số đặc điểm nổi bật của Recent post hompage Magazine style 2?

- Giao diện đẹp, bắt mắt.
- Khả năng tùy biến cao thông qua CSS và đoạn scipts mở (chưa mã hóa - endcode)
- Sử dụng 1 file javascripts duy nhất cho tất cả các nhãn nhằm hạn chế ảnh hưởng tới tốc độ load của blog khi sử dụng scripts.

Hãy xem demo hoặc ảnh minh họa đẻ thấy rõ hơn nha.:

View demo


» Bước 1: Ẩn bài viết ở trang chủ

-Việc ẩn bài viết ở trang chủ để tiện ích recen post hoạt động độc lập giúp blog của bạn nhìn chuyên nghiệp hơn.
- Để ẩn bài viết ở trang chủ bạn tham khảo bài viết sau:

» Bước 2: Thêm Recent post home page

1- Đăng nhập vào blog
2- CHọn Mẫu (Template)
3- CHọn chỉnh sửa HTML (Edit HTML)
4- THêm đoạn mã bên dưới vào trước thẻ </head>
<script type='text/javascript'>
//<![CDATA[
imgr = new Array();
imgr[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhapTGwCR3FWqPw5X_Qgg7A3QpFz-SEAYvxurPMaqiTF0BJ3g6EoxnqhbYLvGh7QllNx-A7ufgiRh_aX-0cYmQA8iScggzZO9xDjx2xUKSD2_KxSUUxOBVj0vRJfe0HDjfwCs5IyMc8loiU/s1600/noimage-namkna-blogspot-com.png";
showRandomImg = true;

aBold = true;

summaryPost = 140;
summaryPost1= 80;
summaryTitle = 35;

numposts = 1;
numposts1 =5;
numposts2 =4;
numposts3 = 6;
numposts4 = 1;
numposts5 = 6;
numposts6 = 10;
numposts7 = 10;
numposts8= 6;



function removeHtmlTag(strx,chop){
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
s = s.join("");
s = s.substring(0,chop-1);
return s;
}


function showrecentposts1(json) {
j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0;
img = new Array();
if (numposts5 <= json.feed.entry.length) {
maxpost = numposts1;
}
else
{
maxpost=json.feed.entry.length;
}

for (var i = 0; i < maxpost; i++) {
var entry = json.feed.entry[i];
var posttitle = entry.title.$t;
var pcm;
var posturl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}

for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') {
pcm = entry.link[k].title.split(" ")[0];
break;
}
}

if ("content" in entry) {
var postcontent = entry.content.$t;}
else
if ("summary" in entry) {
var postcontent = entry.summary.$t;}
else var postcontent = "";

postdate = entry.published.$t;

if(j>imgr.length-1) j=0;
img[i] = imgr[j];

s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);

if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;

//cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : '';


var month = [1,2,3,4,5,6,7,8,9,10,11,12];
var month2 = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

var day = postdate.split("-")[2].substring(0,2);
var m = postdate.split("-")[1];
var y = postdate.split("-")[0];

for(var u2=0;u2<month.length;u2++){
if(parseInt(m)==month[u2]) {
m = month2[u2] ; break;
}
}

var daystr = day+ ' ' + m + ' ' + y ;
if (i==0) {
var trtd = '<div class="widgetsplitone_left"><a href="'+posturl+'"><img width="278" height="139" class="imagefeatured wp-post-image" src="'+img[i]+'"/></a><div class="clear"></div><h5 class="posttitle"><a href="'+posturl+'">'+posttitle+'</a></h5><div class="contentstyle"><p>'+removeHtmlTag(postcontent,summaryPost)+'(...)</p></div><div class="clear"></div></div><div class="widgetsplitone_right">';
document.write(trtd);
}
if ((i>0)&&(i<maxpost)) {
var trtd = '<a href="'+posturl+'"><img class="imagewidgetthumb wp-post-image" height="40" src="'+img[i]+'" width="60"/></a><div class="featuredPost"><b><a href="'+posturl+'">'+posttitle+'</a></b><div class="borderfix"></div></div>';
document.write(trtd);
}
j++;
}
document.write('</div>');
}

function showrecentposts3(json) {
j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0;
img = new Array();

for (var i = 0; i < 10; i++) {
var entry = json.feed.entry[i];
var posttitle = entry.title.$t;
var pcm;
var posturl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}

for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') {
pcm = entry.link[k].title.split(" ")[0];
break;
}
}

if ("content" in entry) {
var postcontent = entry.content.$t;}
else
if ("summary" in entry) {
var postcontent = entry.summary.$t;}
else var postcontent = "";

postdate = entry.published.$t;

if(j>imgr.length-1) j=0;
img[i] = imgr[j];

s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);

if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;

//cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : '';


var month = [1,2,3,4,5,6,7,8,9,10,11,12];
var month2 = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

var day = postdate.split("-")[2].substring(0,2);
var m = postdate.split("-")[1];
var y = postdate.split("-")[0];

for(var u2=0;u2<month.length;u2++){
if(parseInt(m)==month[u2]) {
m = month2[u2] ; break;
}
}

var daystr = day+ ' ' + m + ' ' + y ;
var trtd = '<li><a href="'+posturl+'">'+posttitle+'</a></li>';
document.write(trtd);


j++;
}

}

function showrecentposts6(json) {
j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0;
img = new Array();

for (var i = 0; i < numposts; i++) {
var entry = json.feed.entry[i];
var posttitle = entry.title.$t;
var pcm;
var posturl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}

for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') {
pcm = entry.link[k].title.split(" ")[0];
break;
}
}

if ("content" in entry) {
var postcontent = entry.content.$t;}
else
if ("summary" in entry) {
var postcontent = entry.summary.$t;}
else var postcontent = "";

postdate = entry.published.$t;

if(j>imgr.length-1) j=0;
img[i] = imgr[j];

s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);

if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;

//cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : '';


var month = [1,2,3,4,5,6,7,8,9,10,11,12];
var month2 = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

var day = postdate.split("-")[2].substring(0,2);
var m = postdate.split("-")[1];
var y = postdate.split("-")[0];

for(var u2=0;u2<month.length;u2++){
if(parseInt(m)==month[u2]) {
m = month2[u2] ; break;
}
}

var daystr = day+ ' ' + m + ' ' + y ;

var trtd = '<a href="'+posturl+'"><img width="266" height="139" class="imagefeatured wp-post-image" src="'+img[i]+'"/></a><div class="clear"></div><h5 class="posttitle"><a href="'+posturl+'">'+posttitle+'</a></h5><div class="contentstyle"><p>'+removeHtmlTag(postcontent,summaryPost)+'(...)</p></div><div class="clear"></div>';
document.write(trtd);

j++;
}

}


//]]>
</script>
5- Thêm đoạn mã bên dưới vào trước thẻ ]]></b:skin>
/* --------Widgets---------------------*/
.widget {
margin: 0px 0px 10px 0px;
overflow: hidden;
}
.widget a,
.widget a:visited {
color: #00CD00;
text-decoration: none;
}
.widget a:hover {
color: #FF7000;
}
.widgetwrap {
padding: 10px;
border-left: 1px solid #F4F4F4;
border-right: 1px solid #F4F4F4;
border-bottom: 1px solid #F4F4F4;
overflow: hidden;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
.widgetwrap ul {
list-style-type: none;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
.widgetwrap ul li {
background: transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigJAk8qZjoDikAHzKkfYmQBLvi7w-_QUM1LSuH6aDv2c7pk8SuHQihFMWe4DZQOIlCZhFYO0Gx_Lctzgb4AsGiVKQS991F6U6lYYIjO7-G_QrVzDGtHp34B-b2JKd9uAZZAkEpuXHxnCZR/s1600/bullet-namkna-blogspot-com.gif) no-repeat 0px 5px;
margin: 0px 0px 4px 0px;
padding: 0px 0px 0px 13px;
}
.widgetwrap li a,
.widgetwrap li a:link,
.widgetwrap li a:visited {
color: #000000;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
.widgetwrap li a:hover,
.widgetwrap li a:active {
color: #FF7000;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
.widgetwrapalt {
padding: 10px;
border: 1px solid #F4F4F4;
overflow: hidden;
border-radius: 3px;
}
.widgetsplitone {
width: 558px;
padding: 0px;
margin: 0px;
overflow: hidden;
}
.widgetsplitone_left {
width: 313px;
padding: 0px;
margin: 0px 10px 0px 0px;
float: left;
}
.widgetsplitone_right {
width: 222px;
padding: 0px;
margin: 0px 0px 0px 10px;
float: right;
}
h3.widget {
line-height: 14px;
font-size: 12px;
font-weight: bold;
font-family: Tahoma;
color: #363636;
letter-spacing: normal;
padding: 5px 11px 5px 11px;
margin: 0px 0px 0px 0px;
display: block;
background: #F5F5F5;
}
h3.widget a,
h3.widget a:visited {
color: #000;
text-decoration: none;
}
h3.widget a:hover {
color: #ccc;
}
.main-w_w_right {
float: left;
margin-top: 0px;
padding: 0;
width: 290px;
}
Trong đó:
  • width: 558px; Là độ rộng của khung recent comment chính
  • width: 313px; là độ rộng của khung bên trái
  • width: 222px; là độ rộng của khung bên phải.
  • 2 số 313px +222px phải nhỏ hơn 558px
  • width: 290px; là độ rộng của 2 khung dưới cùng (Số này phải nhỏ hơn 558px/2)
  • color: #00CD00; là màu chữ tiêu đề khi chưa dê chuột vào.
  • color: #FF7000; là màu chữ tiêu đề khi dê chuột vào.
  • background: #F5F5F5; là màu nền của phần tên nhãn (phần màu xám trong hình minh họa hoặc blog demo).
  • color: #363636; là mãu chữ của tên nhãn.
  • font-size: 12px; là Font chữ tên nhãn.
  • Hãy sử dụng công cụ lấy mã màu của namkna để thay đổi mã màu của bạn nha: Color conveter.
6- Tìm đoạn mã bài viết như bên dưới:
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Bài đăng trên Blog' type='Blog'/>
</b:section>
- Và dán ngay sau nó đoạn code bên dưới.
<!-- Recent Posts -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>

<div class='widget'><h3 class='widget'>Recent Posts</h3>
<div class='widgetwrap'>
<div class='widgetsplitone'>
<script>
document.write(&quot;&lt;script src=\&quot;/feeds/posts/default?max-results=&quot;+numposts1+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts1\&quot;&gt;&lt;\/script&gt;&quot;);
</script>
</div>
</div>
</div>

<!-- Nhãn 1 -->
<div class='widget'><h3 class='widget'>Mô tả nhãn 1</h3>
<div class='widgetwrap'>
<div class='widgetsplitone'>
<script>
document.write(&quot;&lt;script src=\&quot;/feeds/posts/default/-/Tên nhãn 1?max-results=&quot;+numposts1+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts1\&quot;&gt;&lt;\/script&gt;&quot;);
</script>
</div>
</div>
</div>


<!-- Nhãn 2 -->
<div class='widget'><h3 class='widget'>Mô tả nhãn 2</h3>
<div class='widgetwrap'>
<div class='widgetsplitone'>
<script>
document.write(&quot;&lt;script src=\&quot;/feeds/posts/default/-/Tên nhãn 2?max-results=&quot;+numposts1+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts1\&quot;&gt;&lt;\/script&gt;&quot;);
</script>
</div>
</div>
</div>

<!--Nhãn 3 -->
<div class='widget'><h3 class='widget'>Mô tả nhãn 3</h3>
<div class='widgetwrap'>
<div class='widgetsplitone'>
<script>
document.write(&quot;&lt;script src=\&quot;/feeds/posts/default/-/Tên nhãn 3?max-results=&quot;+numposts1+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts1\&quot;&gt;&lt;\/script&gt;&quot;);
</script>
</div>
</div>
</div>

<!-- Nhãn 4 -->
<div class='widget'><h3 class='widget'>Mô tả nhãn 4</h3>
<div class='widgetwrap'>
<div class='widgetsplitone'>
<script>
document.write(&quot;&lt;script src=\&quot;/feeds/posts/default/-/Tên nhãn 4?max-results=&quot;+numposts1+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts1\&quot;&gt;&lt;\/script&gt;&quot;);
</script>
</div>
</div>
</div>

<!-- Khung them thu cong -->
<div class='main-w_w_right'>
<div class='widget'><h3 class='widget'>Blogger Templates</h3>
<div class='widgetwrap'>
<script>document.write(&quot;&lt;script src=\&quot;http://quangvietmkt.blogspot.com/feeds/posts/default?max-results=&quot;+numposts+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts6\&quot;&gt;&lt;\/script&gt;&quot;);</script>
</div>
</div>
</div>
<div class='main-w_w_right'>
<div class='widget'><h3 class='widget'>Wallpapers</h3>
<div class='widgetwrap'>
<script>document.write(&quot;&lt;script src=\&quot;http://viettin365.com/feeds/posts/default?max-results=&quot;+numposts+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts6\&quot;&gt;&lt;\/script&gt;&quot;);</script>
</div>
</div>
</div>
</b:if>
Trong đó:
  • Thay Mô tả 1,2,3,4 thành mô tả nhãn bạn muốn hiển thị recent post
  • Thay tên nhãn 1,2,3,4 thành tên nhãn bạn muốn hiển thị recent post
  • Thay:  http://viettin365.com/ thành URL blog của bạn. Nếu muốn bỏ 2 ô cuối cùng bạn chỉ việc xóa phần màu xanh.
7- Lưu mẫu lại và xem kết quả nha.

Thứ Ba, 11 tháng 9, 2012

Bảng mã màu thập lục đẹp cho Blogger


Bảng mã màu thập lục này có ưu điểm hơn so với Mã màu tùy biếnở chỗ các bạn không cần phải điều chỉnh gì mà chỉ cần chọn mã màu mà mình ưng ý sau đó dán vào các Code của Blog mà bạn muốn.
Mình có một chuyên mục viết về các thủ thuật Blogspot và Yahoo 360 Plussdo vậy bảng mã màu bên dưới hi vọng có thể đáp ứng ddwuwocj yêu cầu của các bạn. 

Tên màuMãMàu
Black#000000
Grey0#150517
Grey18#250517
Grey21#2B1B17
Grey23#302217
Grey24#302226
Grey25#342826
Grey26#34282C
Grey27#382D2C
Grey28#3b3131
Grey29#3E3535
Grey30#413839
Grey31#41383C
Grey32#463E3F
Grey34#4A4344
Grey35#4C4646
Grey36#4E4848
Grey37#504A4B
Grey38#544E4F
Grey39#565051
Grey40#595454
Grey41#5C5858
Grey42#5F5A59
Grey43#625D5D
Grey44#646060
Grey45#666362
Grey46#696565
Grey47#6D6968
Grey48#6E6A6B
Grey49#726E6D
Grey50#747170
Grey#736F6E
Slate Grey4#616D7E
Slate Grey#657383
Light Steel Blue4#646D7E
Light Slate Grey#6D7B8D
Cadet Blue4#4C787E
Dark Slate Grey4#4C7D7E
Thistle4#806D7E
Medium Slate Blue#5E5A80
Medium Purple4#4E387E
Midnight Blue#151B54
Dark Slate Blue#2B3856
Dark Slate Grey#25383C
Dim Grey#463E41
Cornflower Blue#151B8D
Royal Blue4#15317E
Slate Blue4#342D7E
Royal Blue#2B60DE
Royal Blue1#306EFF
Royal Blue2#2B65EC
Royal Blue3#2554C7
Deep Sky Blue#3BB9FF
Deep Sky Blue2#38ACEC
Slate Blue#357EC7
Deep Sky Blue3#3090C7
Deep Sky Blue4#25587E
Dodger Blue#1589FF
Dodger Blue2#157DEC
Dodger Blue3#1569C7
Dodger Blue4#153E7E
Steel Blue4#2B547E
Steel Blue#4863A0
Slate Blue2#6960EC
Violet#8D38C9
Medium Purple3#7A5DC7
Medium Purple#8467D7
Medium Purple2#9172EC
Medium Purple1#9E7BFF
Light Steel Blue#728FCE
Steel Blue3#488AC7
Steel Blue2#56A5EC
Steel Blue1#5CB3FF
Sky Blue3#659EC7
Sky Blue4#41627E
Slate Blue#737CA1
Slate Grey3#98AFC7
Violet Red#F6358A
Violet Red2#E4317F
Deep Pink#F52887
Deep Pink2#E4287C
Deep Pink3#C12267
Deep Pink4#7D053F
Medium Violet Red#CA226B
Violet Red3#C12869
Firebrick#800517
Violet Red4#7D0541
Maroon4#7D0552
Maroon#810541
Maroon3#C12283
Maroon2#E3319D
Maroon1#F535AA
Magenta#FF00FF
Magenta1#F433FF
Magenta2#E238EC
Magenta3#C031C7
Medium Orchid#B048B5
Medium Orchid1#D462FF
Medium Orchid2#C45AEC
Medium Orchid3#A74AC7
Medium Orchid4#6A287E
Purple#8E35EF
Purple1#893BFF
Purple2#7F38EC
Purple3#6C2DC7
Purple4#461B7E
Dark Orchid4#571B7E
Dark Orchid#7D1B7E
Dark Violet#842DCE
Dark Orchid3#8B31C7
Dark Orchid2#A23BEC
Dark Orchid1#B041FF
Plum4#7E587E
Pale Violet Red#D16587
Pale Violet Red1#F778A1
Pale Violet Red2#E56E94
Pale Violet Red3#C25A7C
Pale Violet Red4#7E354D
Plum#B93B8F
Plum1#F9B7FF
Plum2#E6A9EC
Plum3#C38EC7
Thistle#D2B9D3
Thistle3#C6AEC7
Lavendar Blush2#EBDDE2
Lavendar Blush3#C8BBBE
Thistle2#E9CFEC
Thistle1#FCDFFF
Lavendar#E3E4FA
Lavendar Blush#FDEEF4
Light Steel Blue1#C6DEFF
Light Blue#ADDFFF
Light Blue1#BDEDFF
Light Cyan#E0FFFF
Slate Grey1#C2DFFF
Slate Grey2#B4CFEC
Light Steel Blue2#B7CEEC
Turquoise1#52F3FF
Cyan#00FFFF
Cyan1#57FEFF
Cyan2#50EBEC
Turquoise2#4EE2EC
Medium Turquoise#48CCCD
Turquoise#43C6DB
Dark Slate Grey1#9AFEFF
Dark Slate Grey2#8EEBEC
Dark Slate Grey3#78C7C7
Cyan3#46C7C7
Turquoise3#43BFC7
Cadet Blue3#77BFC7
Pale Turquoise3#92C7C7
Light Blue2#AFDCEC
Dark Turquoise#3B9C9C
Cyan4#307D7E
Light Sea Green#3EA99F
Light Sky Blue#82CAFA
Light Sky Blue2#A0CFEC
Light Sky Blue3#87AFC7
Sky Blue#82CAFF
Sky Blue2#B0E2FF
Light Sky Blue4#566D7E
Sky Blue#6698FF
Light Slate Blue#736AFF
Light Cyan2#CFECEC
Light Cyan3#AFC7C7
Light Cyan4#717D7D
Light Blue3#95B9C7
Light Blue4#5E767E
Pale Turquoise4#5E7D7E
Dark Sea Green4#617C58
Medium Aquamarine#348781
Medium Sea Green#306754
Sea Green#4E8975
Dark Green#254117
Sea Green4#387C44
Forest Green#4E9258
Medium Forest Green#347235
Spring Green4#347C2C
Dark Olive Green4#667C26
Chartreuse4#437C17
Green4#347C17
Medium Spring Green#348017
Spring Green#4AA02C
Lime Green#41A317
Spring Green#4AA02C
Dark Sea Green#8BB381
Dark Sea Green3#99C68E
Green3#4CC417
Chartreuse3#6CC417
Yellow Green#52D017
Spring Green3#4CC552
Sea Green3#54C571
Spring Green2#57E964
Spring Green1#5EFB6E
Sea Green2#64E986
Sea Green1#6AFB92
Dark Sea Green2#B5EAAA
Dark Sea Green1#C3FDB8
Green#00FF00
Lawn Green#87F717
Green1#5FFB17
Green2#59E817
Chartreuse2#7FE817
Chartreuse#8AFB17
Green Yellow#B1FB17
Dark Olive Green1#CCFB5D
Dark Olive Green2#BCE954
Dark Olive Green3#A0C544
Yellow#FFFF00
Yellow1#FFFC17
Khaki1#FFF380
Khaki2#EDE275
Goldenrod#EDDA74
Gold2#EAC117
Gold1#FDD017
Goldenrod1#FBB917
Goldenrod2#E9AB17
Gold#D4A017
Gold3#C7A317
Goldenrod3#C68E17
Dark Goldenrod#AF7817
Khaki#ADA96E
Khaki3#C9BE62
Khaki4#827839
Dark Goldenrod1#FBB117
Dark Goldenrod2#E8A317
Dark Goldenrod3#C58917
Sienna1#F87431
Sienna2#E66C2C
Dark Orange#F88017
Dark Orange1#F87217
Dark Orange2#E56717
Dark Orange3#C35617
Sienna3#C35817
Sienna#8A4117
Sienna4#7E3517
Indian Red4#7E2217
Dark Orange3#7E3117
Salmon4#7E3817
Dark Goldenrod4#7F5217
Gold4#806517
Goldenrod4#805817
Light Salmon4#7F462C
Chocolate#C85A17
Coral3#C34A2C
Coral2#E55B3C
Coral#F76541
Dark Salmon#E18B6B
Salmon1#F88158
Salmon2#E67451
Salmon3#C36241
Light Salmon3#C47451
Light Salmon2#E78A61
Light Salmon#F9966B
Sandy Brown#EE9A4D
Hot Pink#F660AB
Hot Pink1#F665AB
Hot Pink2#E45E9D
Hot Pink3#C25283
Hot Pink4#7D2252
Light Coral#E77471
Indian Red1#F75D59
Indian Red2#E55451
Indian Red3#C24641
Red#FF0000
Red1#F62217
Red2#E41B17
Firebrick1#F62817
Firebrick2#E42217
Firebrick3#C11B17
Pink#FAAFBE
Rosy Brown1#FBBBB9
Rosy Brown2#E8ADAA
Pink2#E7A1B0
Light Pink#FAAFBA
Light Pink1#F9A7B0
Light Pink2#E799A3
Pink3#C48793
Rosy Brown3#C5908E
Rosy Brown#B38481
Light Pink3#C48189
Rosy Brown4#7F5A58
Light Pink4#7F4E52
Pink4#7F525D
Lavendar Blush4#817679
Light Goldenrod4#817339
Lemon Chiffon4#827B60
Lemon Chiffon3#C9C299
Light Goldenrod3#C8B560
Light Golden2#ECD672
Light Goldenrod#ECD872
Light Goldenrod1#FFE87C
Lemon Chiffon2#ECE5B6
Lemon Chiffon#FFF8C6
Light Goldenrod Yellow#FAF8CC

Chúc các bạn cso một Blog thật đẹp!

Thứ Bảy, 8 tháng 9, 2012

Floating Social Bookmark trượt đẹp cho blogspot


Tiện ích (widget) này bao gồm các liên kết đến các mạng xã hội nổi tiếng hiện nay như: Facebook, Twiter, Google+, Pinterest, Youtobe và có một liên kết rss feed giúp độc giả theo dõi các bài viết của bạn. Bình thường tiện ích này ẩn chỉ hiện các button của các mạng xã hội, và các liên kết sẽ hiện ra từ từ khi ta di chuột vào các icon đó. Để giảm thiểu tối đa việc sử dụng các file javascrip do vậy namkna sẽ sử dụng các mã CSS và hiệu ứng css spriter với một hình ảnh icon duy nhấtcho các mạng xã hội để giảm requet kết hợp với thư viện Jquery do cậy rất mượn mà không gấy ảnh hưởng đến mức độ tương tác của trang web.


Các bạn có thể xem ảnh minh họa hoặc blog demo để thấy rõ hơn.

VIEW DEMO

» Cách thêm Floating Social Bookmark cho blogspot!

1. Đăng nhập vào tài khoản Blogger
2. Vào phần Mẫu (Template)
3. Chọn chỉnh sửa HTML (Edit HTML)
4. Thêm đoạn mã bên dưới vào sau thẻ ]]></b:skin>:
.social-buttons {
position: fixed;
top: 130px;
width: 45px;
z-index: 9999;
}
.button-left {
left: 0;
}
.button-right {
right: 0;
}
.social-buttons #twitter-btn .social-icon,
.social-buttons #facebook-btn .social-icon,
.social-buttons #google-btn .social-icon,
.social-buttons #rss-btn .social-icon,
.social-buttons #pinterest-btn .social-icon,
.social-buttons #youtube-btn .social-icon {
background-color: #33353B;
background-image: url(
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-5Xv0zzywjFhXyaHf0RkXPt_684T-hv7lOTtIHs6xJQgSbZvfNTh26z7G5yUp1zbjP2ExRk7emcN_VL8G5EXlzJCVeGFXox2tIxDkNCehR43tULiVCZmfhyphenhyphenyePVroSJU-G2GtpUAZIPwn/s500/cooltext987481804.png);
}
.button-left #facebook-btn span {
background-position: right 10px;
}
.button-left #twitter-btn span {
background-position: right -35px;
}
.button-left #google-btn span {
background-position: right -127px;
}
.button-left #rss-btn span {
background-position: right -80px;
}
.button-left #pinterest-btn span {
background-position: 11px -177px;
}
.button-left #youtube-btn span {
background-position: 11px -223px;
}
.button-right #facebook-btn span {
background-position: 12px 10px;
}
.button-right #twitter-btn span {
background-position: 11px -35px;
}
.button-right #google-btn span {
background-position: 10px -127px;
}
.button-right #rss-btn span {
background-position: 11px -80px;
}
.button-right #pinterest-btn span {
background-position: 11px -177px;
}
.button-right #youtube-btn span {
background-position: 11px -223px;
}
.social-buttons #facebook-btn:hover .social-icon {
background-color: #3B5998;
}
.social-buttons #twitter-btn:hover .social-icon {
background-color: #62BDB2;
}
.social-buttons #google-btn:hover .social-icon {
background-color: #DB4A39;
}
.social-buttons #rss-btn:hover .social-icon {
background-color: #FF8B0F;
}
.social-buttons #pinterest-btn:hover .social-icon {
background-color: #D43638;
}
.social-buttons #youtube-btn:hover .social-icon {
background-color: #C4302B;
}
.social-buttons a:hover .social-text {
display: block;
}
.button-left .social-icon {
-moz-transition: background-color 0.4s ease-in 0s;
-webkit-transition: background-color 0.4s ease-in 0s;
background-repeat: no-repeat;
display: block;
float: left;
height: 43px;
margin-bottom: 2px;
width: 43px;
}
.button-left .social-text {
display: none;
float: right;
font-size: 1em;
font-weight: bold;
margin: 11px 40px 11px 0px;
white-space: nowrap;
}
.button-right .social-icon {
-moz-transition: background-color 0.4s ease-in 0s;
-webkit-transition: background-color 0.4s ease-in 0s;
background-repeat: no-repeat;
display: block;
float: right;
height: 43px;
margin-bottom: 2px;
width: 43px;
}
.button-right .social-text {
display: none;
float: left;
font-size: 80%;
font-weight: bold;
margin: 11px 0 11px 40px;
white-space: nowrap;
}
.social-buttons .social-text {
color: #FFFFFF;
}
5. THêm đoạn mã bên dưới vào trước thẻ </head> : 
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'/>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js' type='text/javascript'/>
<script>
$(window).load(function(){
$(&#39;.social-buttons .social-icon&#39;).mouseenter(function(){
$(this).stop();
$(this).animate({width:&#39;160&#39;}, 500, &#39;easeOutBounce&#39;,function(){});
});
$(&#39;.social-buttons .social-icon&#39;).mouseleave(function(){
$(this).stop();
$(this).animate({width:&#39;43&#39;}, 500, &#39;easeOutBounce&#39;,function(){});
});
});
</script>
- Nếu blog của bạn đã có thư viện jquery rồi thì hãy xóa file màu xanh đi.
6. THêm mã bên dưới vào trước thẻ đóng </body> : 

<div class='social-buttons button-right hidden-phone hidden-tablet'>
<a class='itemsocial' href='https://www.facebook.com/your FB' id='facebook-btn' target='_blank'><span class='social-icon'><span class='social-text'>Follow via Facebook</span></span></a>
<a class='itemsocial' href='https://twitter.com/your twitter' id='twitter-btn' target='_blank'><span class='social-icon'><span class='social-text'>Follow via Twitter</span></span></a>
<a class='itemsocial' href='https://plus.google.com/your G+' id='google-btn' target='_blank'><span class='social-icon'><span class='social-text'>Follow via Google</span></span></a>
<a class='itemsocial' href='http://pinterest.com/your ID' id='pinterest-btn' target='_blank'><span class='social-icon'>
<span class='social-text'>Follow via Pinterest</span></span></a>
<a class='itemsocial' href='https://www.youtube.com/user/your ID' id='youtube-btn' target='_blank'><span class='social-icon'><span class='social-text'>Follow via Youtube</span></span></a>
<a class='itemsocial' href='http://feeds.feedburner.com/your feed' id='rss-btn' target='_blank'><span class='social-icon'><span class='social-text'>Follow via RSS</span></span></a>
</div>
- Thay các phàn màu xanh thành các id của bạn tương ứng.
7. Lưu lại là oke.

Tạo nút RSS màu cam bằng CSS thuần túy

Khi tạo liên kết RSS trên website hoặc webblog, bạn có thể sử dụng nút RSS màu cam tương thích với màu biểu tượng RSS mà không cần sử dụng hình ảnh. Thao tác này có thể được thực hiện bằng thủ thuật CSS đơn giản kết hợp với HTML.
Các bạn có thể xem demo ngay ở duwois đây.


FEED        RSS

☼ Cách tiến hành:

1- Đăng nhập vào Blog
2- Vào Mẫu
3- Chọn Chỉnh sử HTML (Edit HTML)


4- Đặt phần CSS bên dưới vào giữa 2 thẻ và . Đối với Blogger thì đặt trước dòng code ]]></b:skin>.
.feed {
border:1px solid;border-color:#FC9 #630 #330 #F96;padding:0 3px;font:bold 10px verdana,sans-serif;color:#FFF;background:#F60;text-decoration:none;margin:4px;
}
Sau đó đặt đoạn code sau vào vị trí muốn hiển thị nút RSS. Bạn có thể đặt tên văn bản cho nút là RSS hoặc FEED đều được.
<a href="/rss/" class="feed">FEED</a>
Chúc thành công!

Thứ Hai, 3 tháng 9, 2012

Popular posts style gallery jquery v2 blogger

Bài viết này sẽ hướng dẫn các bạn tùy chỉnh tiện ích Popular posts dạng ảnh gallery với hiệu ứng từ Jquery cho blogspot. Thủ thuật này thích hợp với các blog chuyên về ảnh, blog bán hàng hay blog về phim,... Được mình source từ template Simplex PhoneMag. Đây là một dạng cải tiến từ vestion 1 mà mình đã giới thiệu trước đây.


☼ Các tính năng mới trong bản Popular posts dạng gallery jquery vestion 2 này là gì?

» Tự động đánh số thứ tự cho bài đăng (tương tự như 2 tiện ích count popularpost và cool popularpost).
» Chỉnh sửa và tùy biến dễ dàng.
» Thêm hiệu ứng tooltips cho phần mô tả của mỗi bài đăng.
» Thiết kế rất gọn gàng và bắt mắt, phug hợp với nhiều chủ đề như: ảnh, phim, bán hàng, du lịch,...


☼ Bước 1: Thêm tiện ích Popular posts vào blog của bạn.

- Nếu blog của bạn đã có tiện ích Popolar posts thì bắt đầu thực hiện từ mục 1.5 nha.
1.1- Đăng nhập vào blog
1.2- Vào bố cục (Layout)
1.3- Chọn thêm tiện ích (Add widget) => Chọn Bài đăng phổ biến (Popular post).



1.4- Lưu tiện ích lại.
1.5- Bấm chỉnh sửa tiện ích Bài đăng phổ biến (Popular post) và xác địn ID của tiện ích đó.




- Trong ví dụ này là Popularposst1 Hãy nhớ nó để thực hiện trong bước tiếp theo nha.

☼ Bước 2: Tùy chỉnh tiện ích Popular post.

2.1- Đăng nhập vào blog
2.2- Chọn mẫu (template)
2.3- Chọn chỉnh sửa HTML (Edit HTML). [Không cần mở rộng tiện ích mẫu nha].
2.4- Dán mã dưới đây trước thẻ ]]></b:skin> :
.namknapopular{position:relative;float:left;height:76px;width:115px;margin:0 7px 10px}
.namknapopular a{text-decoration:none}
.namknapopular .ablock{display:block;position:absolute}
.namknapopular .number{background:rgba(188,29,211,.8);color:#fff;display:block;font-size:13px;position:absolute;left:0;height:14px;width:12px;z-index:3;padding:1px 2px 4px 6px}
.namknapopular img{height:85px;width:115px;position:absolute;z-index:1}
.namknapopular .text{background:rgba(0,0,0,.9);color:#fff;float:left;font-size:12px;height:34px;line-height:15px;overflow:hidden;position:absolute;bottom:0;text-decoration:none;vertical-align:middle;width:105px;z-index:3;padding:3px 5px 0}
.namknapopular :hover > .text{background:rgba(188,29,211,.8)}
2.5- Thêm đoạn mã bên dưới vào trước thẻ </head>.
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'/>
<script type="text/javascript">
//<![CDATA[
(function(a){a.tooltipsy=function(c,b){this.options=b;this.$el=a(c);this.title=this.$el.attr("title")||"";this.$el.attr("title","");this.random=parseInt(Math.random()*10000);this.ready=false;this.shown=false;this.width=0;this.height=0;this.delaytimer=null;this.$el.data("tooltipsy",this);this.init()};a.tooltipsy.prototype.init=function(){var b=this;b.settings=a.extend({},b.defaults,b.options);b.settings.delay=parseInt(b.settings.delay);if(typeof b.settings.content==="function"){b.readify()}if(b.settings.showEvent===b.settings.hideEvent&&b.settings.showEvent==="click"){b.$el.toggle(function(c){if(b.settings.showEvent==="click"&&b.$el[0].tagName=="A"){c.preventDefault()}if(b.settings.delay>0){b.delaytimer=window.setTimeout(function(){b.show(c)},b.settings.delay)}else{b.show(c)}},function(c){if(b.settings.showEvent==="click"&&b.$el[0].tagName=="A"){c.preventDefault()}window.clearTimeout(b.delaytimer);b.delaytimer=null;b.hide(c)})}else{b.$el.bind(b.settings.showEvent,function(c){if(b.settings.showEvent==="click"&&b.$el[0].tagName=="A"){c.preventDefault()}if(b.settings.delay>0){b.delaytimer=window.setTimeout(function(){b.show(c)},b.settings.delay)}else{b.show(c)}}).bind(b.settings.hideEvent,function(c){if(b.settings.showEvent==="click"&&b.$el[0].tagName=="A"){c.preventDefault()}window.clearTimeout(b.delaytimer);b.delaytimer=null;b.hide(c)})}};a.tooltipsy.prototype.show=function(f){var d=this;if(d.ready===false){d.readify()}if(d.shown===false){if((function(h){var g=0,e;for(e in h){if(h.hasOwnProperty(e)){g++}}return g})(d.settings.css)>0){d.$tip.css(d.settings.css)}d.width=d.$tipsy.outerWidth();d.height=d.$tipsy.outerHeight()}if(d.settings.alignTo==="cursor"&&f){var c=[f.pageX+d.settings.offset[0],f.pageY+d.settings.offset[1]];if(c[0]+d.width>a(window).width()){var b={top:c[1]+"px",right:c[0]+"px",left:"auto"}}else{var b={top:c[1]+"px",left:c[0]+"px",right:"auto"}}}else{var c=[(function(e){if(d.settings.offset[0]<0){return e.left-Math.abs(d.settings.offset[0])-d.width}else{if(d.settings.offset[0]===0){return e.left-((d.width-d.$el.outerWidth())/2)}else{return e.left+d.$el.outerWidth()+d.settings.offset[0]}}})(d.offset(d.$el[0])),(function(e){if(d.settings.offset[1]<0){return e.top-Math.abs(d.settings.offset[1])-d.height}else{if(d.settings.offset[1]===0){return e.top-((d.height-d.$el.outerHeight())/2)}else{return e.top+d.$el.outerHeight()+d.settings.offset[1]}}})(d.offset(d.$el[0]))]}d.$tipsy.css({top:c[1]+"px",left:c[0]+"px"});d.settings.show(f,d.$tipsy.stop(true,true))};a.tooltipsy.prototype.hide=function(c){var b=this;if(b.ready===false){return}if(c&&c.relatedTarget===b.$tip[0]){b.$tip.bind("mouseleave",function(d){if(d.relatedTarget===b.$el[0]){return}b.settings.hide(d,b.$tipsy.stop(true,true))});return}b.settings.hide(c,b.$tipsy.stop(true,true))};a.tooltipsy.prototype.readify=function(){this.ready=true;this.$tipsy=a('<div id="tooltipsy'+this.random+'" style="position:absolute;z-index:2147483647;display:none">
').appendTo("body");this.$tip=a('<div class="'+this.settings.className+'">
').appendTo(this.$tipsy);this.$tip.data("rootel",this.$el);var c=this.$el;var b=this.$tip;this.$tip.html(this.settings.content!=""?(typeof this.settings.content=="string"?this.settings.content:this.settings.content(c,b)):this.title)};a.tooltipsy.prototype.offset=function(c){var b=ot=0;if(c.offsetParent){do{if(c.tagName!="BODY"){b+=c.offsetLeft-c.scrollLeft;ot+=c.offsetTop-c.scrollTop}}while(c=c.offsetParent)}return{left:b,top:ot}};a.tooltipsy.prototype.destroy=function(){this.$tipsy.remove();a.removeData(this.$el,"tooltipsy")};a.tooltipsy.prototype.defaults={alignTo:"element",offset:[0,-1],content:"",show:function(c,b){b.fadeIn(100)},hide:function(c,b){b.fadeOut(100)},css:{},className:"tooltipsy",delay:100,showEvent:"mouseenter",hideEvent:"mouseleave"};a.fn.tooltipsy=function(b){return this.each(function(){new a.tooltipsy(this,b)})}})(jQuery);
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){$("#PopularPosts1 li.namknapopular").each(function(e){e=e+1;text='<a class="number">'+e+"</a>";$(this).prepend(text)})})
//]]>
</script>
- Nếu blog của bạn đã có file Jquery rồi thì xóa đoạn màu xanh đi nha.
2.6- Tìm đến đoạn code của tiện ích popular posts đã thêm ở bước 1  (Hãy tìm với idPopularposst1 mà bạn đã tìm được trong mục 1.5). Đoạn code có dạng như bên dưới:
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'/>
- Thay thế đoạn code vừa tìm được bằng đoạn code bên dưới:
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
<b:if cond='data:title'><h2><data:title/></h2></b:if>
<div class='widget-content popular-posts'>
<ul>
<b:loop values='data:posts' var='post'>
<li class='namknapopular'>
<img expr:src='data:post.thumbnail'/>
<a class='ablock' expr:href='data:post.href'/>
<a class='text table-cell hastip1' expr:href='data:post.href' expr:title='data:post.snippet'><data:post.title/></a>
<div class='clearfix'/>
</li>
</b:loop>
</ul>
<br/>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
2.7- Thêm đoạn code bên dưới vào trước thẻ </body>.
<script type='text/javascript'>
//<![CDATA[
$(".hastip1").tooltipsy({offset:[0,1],show:function(e,t){t.css({left:parseInt(t[0].style.left.replace(/[a-z]/g,""))-50+"px",opacity:"0.0",display:"block"}).animate({left:parseInt(t[0].style.left.replace(/[a-z]/g,""))+50+"px",opacity:"1.0"},300)},hide:function(e,t){t.slideUp(100)},css:{"max-width":"200px","font-weight":"400","font":"bold 12px Arial","line-height":"18px","padding":"10px","color":"#fff","background":"#000";"box-shadow":"0 0 3px rgba(0,0,0,0.7)"}})
//]]>
</script>
2.8- Lưu mẫu lại và xem kết quả nha.

Widget#2

Widget#5

Widget#4

primaryBottomSidebar

Footerpages

Trang

Bottom Navi

Được tạo bởi Blogger.

Người theo dõi

TIÊU ĐIỂM