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

Trình chiếu nội dung và hình ảnh sử dụng Mootools

Người đăng: yeu mai em on Thứ Sáu, 17 tháng 12, 2010

Theo yêu cầu của bạn Hoang Lee tại blog ebeat5.blogspot.com, bạn ấy muốn tiện ích Feature Slideshow trên blog ebeat5.blogspot.com có nút chuyển slide sang trái và sang phải giống như trang playrecords.net.

Trang playrecords.net được tạo trên nền Wordpress nên kiểu slideshow rất phức tạp. Sau khi nghiên cứu, tôi đã tích hợp nó thành một gói slideshow tương thích cho blogspot và có một số điều chỉnh như tạo thêm phần tiêu đề và tóm tắt cho từng slide ảnh để người đọc có thể nắm bắt thông tin cơ bản về slide ảnh. Slideshow này có sự hỗ trợ của thư viện Mootools giúp cho kiểu trình chiếu nội dung và hình ảnh mượt mà hơn.

Xem Demo.

Để cài đặt tiện ích này, bạn hãy thực hiện theo các bước sau đây.

Bước 1. Đăng nhập Blogger vào Design >> Edit HTML và đặt đoạn code dưới đây vào trước thẻ </head>.

<style type="text/css">
#myGallery,#myGallerySet{width:560px;height:200px;z-index:5;margin-bottom:20px;margin-top:15px;overflow-y:hidden;}
.jdGallery a{outline:0}
#myGallery img.thumbnail,#myGallerySet img.thumbnail{display:none}
.jdGallery{overflow:hidden;position:relative}
.jdGallery img{border:0;margin:0}
.jdGallery .slideElement{width:100%;height:100%;background-color:#000;background-repeat:no-repeat;background-position:center center;background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGcCRwfxixU8fWiAQMJO8a3HLH7Q8xl2Sapd4UtH4rK4H30fClAmGEFUDdgcNF-cLb-cYrUj4el9A590_rDGnOoYS7U1NcWcB1SLSkIFEEctYU8_h-VAF_IRwdGlYicrWwDrVVMkvK3oc/s0/loading-bar-black.png')}
.jdGallery .loadingElement{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#000;background-repeat:no-repeat;background-position:center center;background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGcCRwfxixU8fWiAQMJO8a3HLH7Q8xl2Sapd4UtH4rK4H30fClAmGEFUDdgcNF-cLb-cYrUj4el9A590_rDGnOoYS7U1NcWcB1SLSkIFEEctYU8_h-VAF_IRwdGlYicrWwDrVVMkvK3oc/s0/loading-bar-black.png')}
.jdGallery .slideInfoZone{position:absolute;z-index:10;width:100%;margin:0;left:0;bottom:0;height:50px;background:#343433;color:#fff;text-indent:0;overflow:hidden}
* html .jdGallery .slideInfoZone{bottom:-1px}
.jdGallery .slideInfoZone h2{padding:0;margin:0;margin:2px 5px;font-size:14px;font-weight:bold;color:#fff !important}
.jdGallery .slideInfoZone p{padding:0;font-size:12px;margin:2px 5px;color:#eee}
.jdGallery div.carouselContainer{position:absolute;height:135px;width:100%;z-index:10;margin:0;left:0;top:0}
.jdGallery a.carouselBtn{position:absolute;bottom:0;right:30px;height:20px;/*width:100px;background:url('img/carousel_btn.gif') no-repeat;*/
text-align:center;padding:0 10px;font-size:13px;background:#333;color:#fff;cursor:pointer}
.jdGallery .carousel{position:absolute;width:100%;margin:0;left:0;top:0;height:80px;background:#333;color:#fff;text-indent:0;overflow:hidden}
.jdExtCarousel{overflow:hidden;position:relative}
.jdGallery .carousel .carouselWrapper,.jdExtCarousel .carouselWrapper{position:absolute;width:100%;height:78px;top:10px;left:0;overflow:hidden}
.jdGallery .carousel .carouselInner,.jdExtCarousel .carouselInner{position:relative}
.jdGallery .carousel .carouselInner .thumbnail,.jdExtCarousel .carouselInner .thumbnail{cursor:pointer;background:#000;background-position:center center;float:left;border:solid 1px #fff}
.jdGallery .wall .thumbnail,.jdExtCarousel .wall .thumbnail{margin-bottom:10px}
.jdGallery .carousel .label,.jdExtCarousel .label{font-size:13px;position:absolute;bottom:5px;left:10px;padding:0;margin:0}
.jdGallery .carousel .wallButton,.jdExtCarousel .wallButton{font-size:10px;position:absolute;bottom:5px;right:10px;padding:1px 2px;margin:0;background:#222;border:1px solid #888;cursor:pointer}
.jdGallery .carousel .label .number,.jdExtCarousel .label .number{color:#b5b5b5}
.jdGallery a{font-size:100%;text-decoration:none;color:#fff}
.jdGallery a.right,.jdGallery a.left{position:absolute;height:99%;width:25%;cursor:pointer;z-index:10;filter:alpha(opacity=20);-moz-opacity:0.2;-khtml-opacity:0.2;opacity:0.2}
* html .jdGallery a.right,* html .jdGallery a.left{filter:alpha(opacity=50)}
.jdGallery a.right:hover,.jdGallery a.left:hover{filter:alpha(opacity=80);-moz-opacity:0.8;-khtml-opacity:0.8;opacity:0.8}
.jdGallery a.left{left:0;top:0;background:url('http://www.playrecords.net/wp-content/plugins/featured-content-gallery/css/img/fleche1.png') no-repeat center left}
* html .jdGallery a.left{background:url('http://www.playrecords.net/wp-content/plugins/featured-content-gallery/css/img/fleche1.png') no-repeat center left}
.jdGallery a.right{right:0;top:0;background:url('http://www.playrecords.net/wp-content/plugins/featured-content-gallery/css/img/fleche2.png') no-repeat center right}
* html .jdGallery a.right{background:url('http://www.playrecords.net/wp-content/plugins/featured-content-gallery/css/img/fleche2.png') no-repeat center right}
.jdGallery a.open{left:0;top:0;width:100%;height:100%}
.withArrows a.open{position:absolute;top:0;left:25%;height:99%;width:50%;cursor:pointer;z-index:10;background:none;-moz-opacity:0.8;-khtml-opacity:0.8;opacity:0.8}
.withArrows a.open:hover{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigdQU3o9DdETleWTfFjeI35KwX-yNzataGuR2-cO0jqjX917EAN_CbFE-C-kQMBSwDfSX7IDUCbFGJJwSrIchMU8GCJbYCCUki7Ftq9ARFf9mq5PQm3B3PWbDrj4wewmlJq2a5Q-rPjK0/s0/open.png') no-repeat center center}
* html .withArrows a.open:hover{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0gPj9EX9YG-TuKpU7uqE7uqRY9BKqfboMiMXFI5uScF2-ym6j9k2MVdMjKR23GOVL8vOcpe9a8WSrzEI9ZvUn-K7QsmZKi4Rg5ncnTluRRfbC7ECPhU0zQKuDYkUGGUjvpuwyKQjRO8o/s0/open.gif') no-repeat center center;filter:alpha(opacity=80)}
/* Gallery Sets */
.jdGallery a.gallerySelectorBtn{z-index:15;position:absolute;top:0;left:30px;height:20px;/*width:100px;background:url('img/carousel_btn.gif') no-repeat;*/
text-align:center;padding:0 10px;font-size:13px;background:#333;color:#fff;cursor:pointer;opacity:.4;-moz-opacity:.4;-khtml-opacity:0.4;filter:alpha(opacity=40)}
.jdGallery .gallerySelector{z-index:20;width:100%;height:100%;position:absolute;top:0;left:0;background:#000}
.jdGallery .gallerySelector h2{margin:0;padding:10px 20px 10px 20px;font-size:20px;line-height:30px;color:#fff !important}
.jdGallery .gallerySelector .gallerySelectorWrapper{overflow:hidden}
.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton{margin-left:10px;margin-top:10px;border:1px solid #888;padding:5px;height:40px;color:#fff;cursor:pointer;float:left}
.jdGallery .gallerySelector .gallerySelectorInner div.hover{background:#333}
.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton div.preview{background:#000;background-position:center center;float:left;border:none;width:40px;height:40px;margin-right:5px}
.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton h3{margin:0;padding:0;font-size:12px;font-weight:normal;color:#fff}
.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton p.info{margin:0;padding:0;font-size:12px;font-weight:normal;color:#fff !important}
</style>
<script src='http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js' type='text/javascript'></script>
<script src='http://hacodeproject.googlecode.com/files/mootoolmore.js' type='text/javascript'> </script>
<script src='http://hacodeproject.googlecode.com/files/smoothgallery.js' type='text/javascript'></script>
<script src='http://hacodeproject.googlecode.com/files/slidetransition.js' type='text/javascript'></script>

Trong đoạn code trên ở dòng đầu tiên chú ý các tham số width:560px;height:200px thể hiện chiều rộng và chiều cao cho panel slide (bạn Hoang Lee có thể điều chỉnh 200px thành chiều cao tương thích theo ý thích của bạn).

Bước 2. Đặt đoạn code sau đây vào một tiện ích HTML/JavaScript và tiện ích này có thể nằm ở trên hoặc dưới phần Blog Posts
<!-- Featured Content Slider Started -->
<script type='text/javascript'>
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
delay: 6000,
slideInfoZoneOpacity: 0.8,
showCarousel: false,
slideInfoZoneSlide: false
});
}
window.addEvent('domready', startGallery);
</script>
<div class='fullbox_excerpt'>
<div class='fullbox_content'>
<div class='smooth_gallery'>
<div id='myGallery'>
<div class='imageElement'>
<h3>Đây là tiêu đề bài viết 1</h3>
<p>Thay thế đoạn văn này bằng nội dung mô tả tóm tắt cho bài viết liên quan đến hình ảnh này.</p>
<a class='open' href='URL_Bài viết 1' title=''></a>
<img alt='' class='full' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYc3Da2hgSD3VM69MZxpv5eRky5sgEMd876LUPaQQmZxHoZfDY-KOw2ksO9hUbJXOfQd27-SIntT6WpyHLT70QMe_liLNHGVXvgJ9a934T9KH6-P_BEDrld5jeEQKcOHyySccBSdsKO6w/s0/1.jpg' style="width:560px;height:200px"/>
</div>
<div class='imageElement'>
<h3>Đây là tiêu đề bài viết 2</h3>
<p>Thay thế đoạn văn này bằng nội dung mô tả tóm tắt cho bài viết liên quan đến hình ảnh này.</p>
<a class='open' href='URL_Bài viết 2' title=''></a>
<img alt='' class='full' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEl0HyHc4j55TakZQlQTh9qvxbD4sAcUllsGRgatjOBrWc5vfkNNgY0ge3B3PbHRalFacDkf_Fa9j9yiSeFVCqJ9EazKFLl49UDftA_TU1OR0mdAtW0m5WHU45JaGTw_RICGkUUH-yMtQ/s0/2.jpg' style="width:560px;height:200px"/>
</div>
<div class='imageElement'>
<h3>Đây là tiêu đề bài viết 3</h3>
<p>Thay thế đoạn văn này bằng nội dung mô tả tóm tắt cho bài viết liên quan đến hình ảnh này.</p>
<a class='open' href='URL_Bài viết 3' title=''></a>
<img alt='' class='full' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik72xzBs2bCwmo5TcDdbdMvukXi69StEUPaN_LOOM_IqtYjJzg-wjs-a4bOVW5wpiJe7yBd6MC9te6IYNT5twzzcaEP1mdVU8g5ePIkTm46iednmHserutYDJwzqNsjQAe1101NYo6Fyw/s0/3.jpg' style="width:560px;height:200px"/>
</div>
<div class='imageElement'>
<h3>Đây là tiêu đề bài viết 4</h3>
<p>Thay thế đoạn văn này bằng nội dung mô tả tóm tắt cho bài viết liên quan đến hình ảnh này.</p>
<a class='open' href='URL_Bài viết 4' title=''></a>
<img alt='' class='full' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzRSlW-ubvG2vmH55Mh-Ni_LZc-EtH3yRkpioEOA-J5cMD-_dZ3ktqyJsYE-maDEe0jj-YzKqf47SG_pFVSl07KBWoz4xZ7dHHs7WwGVbW2Ax1cfwZ2ZvpevdXs0CeIrOelszfEW3jZbU/s0/4.jpg' style="width:560px;height:200px"/>
</div>
<div class='imageElement'>
<h3>Đây là tiêu đề bài viết 5</h3>
<p>Thay thế đoạn văn này bằng nội dung mô tả tóm tắt cho bài viết liên quan đến hình ảnh này.</p>
<a class='open' href='URL_Bài viết 5' title=''></a>
<img alt='' class='full' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovXADgyh3QMgvJxw5d8tOq8fqVU_JGnj1D-7WYD_LpsDQgp16cRptb6BHFSNNi7yiFTvGB-QfV53eXgtbVizr5r4fm081EP59Cm8d_LPYeb9mc1ReE_n39QC-G9r1ectrRFCyvAETPAs/s0/5.jpg' style="width:560px;height:200px"/>
</div>
……. // Xóa dòng này nếu bạn không muốn thêm slide
</div></div></div></div>
<!-- Featured Content Slider End -->
Bạn có thể thêm nhiều slide khác vào dòng …. với định dạng HTML như sau:
<div class='imageElement'>
<h3>Đây là tiêu đề bài viết n</h3>
<p>Thay thế đoạn văn này bằng nội dung mô tả tóm tắt cho bài viết liên quan đến hình ảnh này.</p>
<a class='open' href='URL_Bài viết n' title=''></a>
<img alt='' class='full' src='URL_hình ảnh' style="width:560px;height:200px"/>
</div>
More about

Hiệu ứng trượt nội dung nổi bật sử dụng jQuery UI

Người đăng: yeu mai em on Thứ Tư, 3 tháng 11, 2010

Trình chiếu những bài viết nổi bật nhất trong website/webblog của bạn theo một kiểu độc đáo có thể thu hút sự chú ý của người lướt web. Sử dụng kỹ thuật trình chiếu nội dung tự động là một trong những kỹ thuật giúp tiết kiệm không gian web. Việc sử dụng thư viện jQuery UI có thể giúp cho kiểu trình chiếu trở nên mềm mại và đẹp mắt hơn.

Sau đây xin giới thiệu một kiểu trình chiếu như vậy. Xem Demo và thực hiện theo các bước như bên dưới.

1. Đặt phần code sau đây vào trước thẻ </head>. Áp dụng cho cả website và Blogger.
<style type="text/css">
#featured{
width:400px;
padding-right:250px;
position:relative;
border:5px solid #ccc;
height:250px; overflow:hidden;
background:#fff;
}
#featured ul.ui-tabs-nav{
position:absolute;
top:0; left:400px;
list-style:none;
padding:0; margin:0;
width:250px; height:250px;
overflow:auto;
overflow-x:hidden;
}
#featured ul.ui-tabs-nav li{
padding:1px 0; padding-left:13px;
font-size:12px;
color:#666;
}
#featured ul.ui-tabs-nav li img{
float:left; margin:2px 5px;
background:#fff;
padding:2px;
border:1px solid #eee;
}
#featured ul.ui-tabs-nav li span{
font-size:11px; font-family:Verdana;
line-height:18px;
}
#featured li.ui-tabs-nav-item a{
display:block;
height:60px; text-decoration:none;
color:#333; background:#fff;
line-height:20px; outline:none;
}
#featured li.ui-tabs-nav-item a:hover{
background:#f2f2f2;
}
#featured li.ui-tabs-selected{
background:url('http://demo.webdeveloperplus.com/featured-content-slider/images/selected-item.gif ') top left no-repeat;
}
#featured ul.ui-tabs-nav li.ui-tabs-selected a{
background:#ccc;
}
#featured .ui-tabs-panel{
width:400px; height:250px;
background:#999; position:relative;
}
#featured .ui-tabs-panel .info{
position:absolute;
bottom:0; left:0;
height:70px;
background: url('http://demo.webdeveloperplus.com/featured-content-slider/images/transparent-bg.png');
}
#featured .ui-tabs-panel .info a.hideshow{
position:absolute; font-size:11px; font-family:Verdana; color:#f0f0f0; right:10px; top:-20px; line-height:20px; margin:0; outline:none; background:#333;
}
#featured .info h2{
font-size:1.2em; font-family:Georgia, serif;
color:#fff; padding:5px; margin:0; font-weight:normal;
overflow:hidden;
}
#featured .info p{
margin:0 5px;
font-family:Verdana; font-size:11px;
line-height:15px; color:#f0f0f0;
}
#featured .info a{
text-decoration:none;
color:#fff;
}
#featured .info a:hover{
text-decoration:underline;
}
#featured .ui-tabs-hide{
display:none;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>

2. Thiết lập cấu trúc HTML như bên dưới và đặt vào phần thân của trang web nằm giữa 2 thẻ <body>, </body>. Đối với Blogger thì đặt vào một tiện ích HTML/JavaScript.

<div id="featured" >
<ul class="ui-tabs-nav">
<li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-1"><a href="#fragment-1"><img src="images/image1-small.jpg" alt="" /><span>Tieu de bai viet 1</span></a></li>
<li class="ui-tabs-nav-item" id="nav-fragment-2"><a href="#fragment-2"><img src="images/image2-small.jpg" alt="" /><span>Tieu de bai viet 2</span></a></li>
<li class="ui-tabs-nav-item" id="nav-fragment-3"><a href="#fragment-3"><img src="images/image3-small.jpg" alt="" /><span>Tieu de bai viet 3></a></li>
<li class="ui-tabs-nav-item" id="nav-fragment-4"><a href="#fragment-4"><img src="images/image4-small.jpg" alt="" /><span>Tieu de bai viet 4</span></a></li>
</ul>
<!-- First Content -->
<div id="fragment-1" class="ui-tabs-panel" style="">
<img src="images/image1.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Tieu de bai viet 1</a></h2>
<p>Noi dung tom tat cho bai viet 1....<a href="#" >Read more</a></p>
</div>
</div>

<!-- Second Content -->
<div id="fragment-2" class="ui-tabs-panel ui-tabs-hide" style="">
<img src="images/image2.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Tieu de bai viet 2</a></h2>
<p>Noi dung tom tat cho bai viet 2....<a href="#" >Read more</a></p>
</div>
</div>

<!-- Third Content -->
<div id="fragment-3" class="ui-tabs-panel ui-tabs-hide" style="">
<img src="images/image3.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Tieu de bai viet 3</a></h2>
<p>Noi dung tom tat cho bai viet 3....<a href="#" >Read more</a></p>
</div>
</div>

<!-- Fourth Content -->
<div id="fragment-4" class="ui-tabs-panel ui-tabs-hide" style="">
<img src="images/image4.jpg" alt="" />
<div class="info" >
<h2><a href="#" >Tieu de bai viet 4</a></h2>
<p>Noi dung tom tat cho bai viet 4....<a href="#" >Read more</a></p>
</div>
</div>
</div>
Trong phần HTML ở trên, các liên kết đánh dấu màu đỏ là liên kết ảnh đại diện, các liên kết đánh dấu màu xanh là liên kết ảnh với kích thước lớn.

Thủ thuật này sẽ khá phức tạp đối với một người mới bước chân vào nghiên cứu CSS, HTML, Javascript, jQuery. Nếu bạn gặp rắc rối, xin vui lòng để lại câu hỏi để Admin gỡ rối nhé.

Theo Webdeveloperplus

* Cập nhật ngày 02/04/2011: Nếu bạn muốn áp dụng một cách tự động cho blogspot thì hãy thực hiện như sau:

Xem Demo.

Bước 1. Đăng nhập Blogger, vào Design >> Edit HTML. Đặt đoạn code sau đây vào trước thẻ </head>.

<style type="text/css">
#featured{
width:400px;
padding-right:250px;
position:relative;
border:1px solid #ccc;
height:252px;
background:#fff;
}
#featured ul.ui-tabs-nav{
position:absolute;
top:0; left:340px;
list-style:none;
padding:0; margin:0;
width:250px;
}
#featured ul.ui-tabs-nav li{
padding:1px 0; padding-left:13px;
font-size:12px;
color:#666;
}
#featured ul.ui-tabs-nav li img{
float:left; margin:2px 5px;
background:#fff;
padding:2px;
border:1px solid #eee;
}
#featured ul.ui-tabs-nav li span{
font-size:11px; font-family:Verdana;
line-height:12px;
color:#034E8F;
}
#featured li.ui-tabs-nav-item a{
display:block;
height:48px;
color:#333; background:#fff;
line-height:20px;
}
#featured li.ui-tabs-nav-item a:hover{
background:#f2f2f2;
}
#featured li.ui-tabs-selected{
background:url('http://demo.webdeveloperplus.com/featured-content-slider/images/selected-item.gif') left -5px no-repeat;
}
#featured ul.ui-tabs-nav li.ui-tabs-selected a{
background:#ccc;
}
#featured .ui-tabs-panel{
width:337px;
height:251px;
background:#999; position:relative;
}
#featured .ui-tabs-panel .info{
position:absolute;
top:176px;
left:2px;
height:75px;
width:336px;
background:url('http://demo.webdeveloperplus.com/featured-content-slider/images/transparent-bg.png') repeat;
}
#featured .info h2{
font-size:12px; font-family:Georgia, serif;
color:#fff; padding:5px; margin:0;
overflow:hidden;
}
#featured .info p{
margin:0 5px;
font-family:Verdana; font-size:11px;
line-height:15px; color:#f0f0f0;
}
#featured .info a{
text-decoration:none;
color:#f00;
font-size:13px;
}
#featured .info a:hover{
text-decoration:underline;
}
#featured .ui-tabs-hide{
display:none;
}
#featured .ui-tabs-nav-item img{
height:37px;
width:55px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>
<script src="http://hacodeproject.googlecode.com/files/uislide.js" type="text/javascript"></script>

Lưu Template.

Bước 2. Vào Page Elements, thêm một tiện ích HTML/Javascript và đặt đoạn code sau vào nội dung tiện ích.

<script type="text/javascript">
imgr = new Array();
imgr[0] = "http://goo.gl/NR90r";
showRandomImg = false;
fntsize = 12;
acolor = "#E67C15";
aBold = true;
text = "nhận xét";
showPostDate = true;
summaryPost = 100;
summaryFontsize = 12;
summaryColor = "#000";

numposts =5;
label = "Recent Posts";
home_page = "http://huynh-nhat-ha.blogspot.com/";
</script>

<div id="featured">
<script type="text/javascript">
document.write("<script src=\""+home_page+"feeds/posts/default?max-results="+numposts+"&orderby=published&alt=json-in-script&callback=showrecentposts\"><\/script>");
</script>
<script type="text/javascript">
document.write("<script src=\""+home_page+"feeds/posts/default?max-results="+numposts+"&orderby=published&alt=json-in-script&callback=showrecentposts2\"><\/script>");
</script>
</div>

Trong đoạn code trên, bạn cần thay huynh-nhat-ha bằng tên blogspot của bạn. Ở trên áp dụng cho cả blogspot, nếu bạn muốn áp dụng cho một nhãn nào đó, thì thay đoạn code được đánh dấu màu đỏ bằng đoạn code bên dưới.

<script type="text/javascript">
document.write("<script src=\""+home_page+"feeds/posts/default/-/"+label+"?max-results="+numposts+"&orderby=published&alt=json-in-script&callback=showrecentposts\"><\/script>");
</script>

<script type="text/javascript">
document.write("<script src=\""+home_page+"feeds/posts/default/-/"+label+"?max-results="+numposts+"&orderby=published&alt=json-in-script&callback=showrecentposts2\"><\/script>");
</script>

Tại tham số label = "Recent Posts"; hãy thay Recent Posts bằng tên nhãn cần áp dụng slide.
More about