Hướng dẫn cách tạo Slide ảnh dạng Accordion Slider cho Blogspot

Hướng dẫn cách tạo Slide ảnh dạng Accordion Slider cho Blogspot

Cách tạo Accordion Slider cho Blogspot - Website

Bước 1: Đăng nhập vào Blog ==> template (Mẫu) ==> Chọn Chỉnh sửa HTML ==> Dán đoạn code sau vào trước thẻ đóng ]]></b:skin>.
#slider h2{display:none}
.container {padding: 10px 0 15px;z-index: 100;display: block;margin: 0 auto;position: relative;width: 930px;}
.js_active .slideshow img{visibility:hidden;}
.slideshow_container{position: relative;margin-bottom:20px;}
.slideshow{background: #f8f8f8 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR6gIJ4LlyQ32Vupk2UHdOoALf9eNas9GiWk0Ad2fvaFJg5Fpp98TU3tZAw3zPwGXSrAKF520CE9c5ZFlPSAnD1o1e-RC9nVUFneMEvikoCW5l0M6cSUO2Wd82qHgoTUcPjXKdKdRqSno/s12/loading.gif) center center no-repeat;display:block;position: relative;padding:0;margin:0;overflow: hidden;z-index: 2;}
.slideshow .featured{display: none;width:100%;height:100%;position: absolute;top:0;
left:0;z-index: 1;margin:0;padding:0;}
.slideshow .featured_container1{display:block;z-index: 2;}
.slideshow iframe, .slideshow object, .slideshow embed, .slideshow video, .slideshow img, .slideshow a img{display:block;padding:0;margin:0 auto;position: relative;border: none;text-decoration: none;z-index: 1;height:100%;width:100%;}
.auto_height .slideshow .featured img{height:auto;}
.slideshow img, .slideshow a img{z-index:2;}
.slideshow > li > a{display:block;width:100%;height:100%;}
.slideshow .slideshow_video{position: absolute;top:0;left:0;right:0;bottom:0;z-index: 1;background: #000;}
.comboslide .slideshow_video{display:none;}
.videoSlideContainer img{cursor: pointer;}
.slideshow_caption{position: absolute;display: none;bottom: 0;z-index: 100;font-size: 11.5px;line-height:1.5em;background: #000;color: #fff;right:auto;}
.slideshow_caption strong,.slideshow_caption h1{display: block;padding: 0px;color:#fff;font-size: 12px;font-style: normal;font-weight: bold;letter-spacing: 1.5px;text-transform: uppercase;}
.slideshow_caption .inner_caption{display:block;background: #000;padding:14px 15px;}
.featured_caption{font-size:11px;padding-top:5px;}
.aviacordion .slideshow{background: #f8f8f8;}
.aviacordion .featured,.aviacordion .slideshow_caption{width:610px;}
.aviacordion .featured{display: none;height:100%;position: absolute;top:0;left:0;
z-index: 1;margin:0;padding:0;background: #f8f8f8 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR6gIJ4LlyQ32Vupk2UHdOoALf9eNas9GiWk0Ad2fvaFJg5Fpp98TU3tZAw3zPwGXSrAKF520CE9c5ZFlPSAnD1o1e-RC9nVUFneMEvikoCW5l0M6cSUO2Wd82qHgoTUcPjXKdKdRqSno/s12/loading.gif) center center no-repeat;}
.aviacordion .shadow{background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC_b7XS6ygf0-qYXh6R-LzAc07FcLp8AHEIpVPjV7T2i6Hl8KBC4C88KGNbJsU4G9oI9s1eyLi8_ui3RbadSowbu4fAHXGkDhrU_3KqrWPGcsykhOoeP_xUH7ezWdIoCTmSDCfVl4Y0cI/s40/shadow.png) repeat-y scroll left top transparent;height:100%;width:15px;position: absolute;left:-15px;top:0;}
.aviacordion .featured img{position: absolute;top:0;left:0;height:auto;width:auto;}
.aviacordion .heading_clone{position: absolute;z-index:4;bottom:0;left:0;background: #000;}
.aviacordion .center_helper{height:100%;display:table;}
.aviacordion .heading_clone h1{text-transform: uppercase;padding:15px;background: #000;color:#fff;font-size: 12px;display: table-cell;vertical-align: middle;}
.pptimeleft{text-align:center;font-size: 11px;}
.ppfsenter{display:none !important;width:0px;}
.comboslide .slideshow_overlay{display: block;width:100%;height:100%;background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-qKAUqvarJM_FvSCXI4LaweyqafvObvkW29cTek2jk0dactkaYs_ktibCGNfBmUGWQhh7Qv6JEOhgiKBTOqLXCBuP1kuvva0v6pQyi9SbmKlfneVOL4zQ2BVIxjT7rZ4WSQxOuWueyg/s90/video.png) no-repeat scroll center center transparent;z-index: 3;position: absolute;opacity: 0.5;cursor: pointer;top:0;left:0;}
.videoSlideContainerEmbed video, .videoSlideContainer video{left:0 !important;top:0 !important;}
.rounded_corner{height:5px;width:5px;position: absolute;z-index: 200;background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhStxAZ4u0YTCMiPeu5WYyqxMUnWSd7tLz-drrm5cS1A1EE4RMBNGTAN-QXeEOKkg6SzcJ2LyJ-GOSszshTHJdmXIko-3QUPocV-v8TTWniYCr_vxU5QcvE1v005m4vvCNGalzPT5D5M1o/s20/rounded_corners.png) no-repeat scroll top left transparent;}
.rctl{top:0;left:0;}
.rctr{top:0;right:0;background-position: top right;}
.rcbl{bottom:0;left:0;background-position: bottom left;}
.rcbr{bottom:0;right:0;background-position: bottom right;}
.aviacordion .bottom_shadow, .slideshow_featured .bottom_shadow {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg2CcNQ3K6ShzK1mgDxf5OGKlyFdFhRE5T05BBS9pS-yZ6tGyF_kWszR4HwTWqCK9QTN-2phMIiZ41vScxJ8G_ug7sETZZxZs8CkYhyphenhyphenHuTYgW3YLNeByNBGwQhmJkBAQLIGa5N3BRgGb8/s953/shadow-featured.png) no-repeat scroll left top transparent;bottom: -5px;height: 11px;left: -12px;position: absolute;width: 954px;z-index: 1;}
.aviacordion .rcbl, .aviacordion .rcbr, .slideshow_featured .rcbl, .slideshow_featured .rcbr{background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaqr5j9AAs821-uMrN-WaMbzMaKaTPu7INptLyAzyedcAQXDIDv1evEMfoKolQF-tcbKRGSeR3O0Ilz7qLrAPv-JhrG5eF1Rt78RC9kZYDi6pn6tmhnph2huD0LuO9QA9hJd9TLs0pImQ/s20/rounded_corners_shadow.png);}
.medium_image .slideshow_caption{width:360px;}
.big_image .slideshow_caption{width:520px;}
.small_image .slideshow_caption{display: none !important;}
.aviacordion .lightbox_image .image_overlay_effect_inside,.slideshow_featured .lightbox_image .image_overlay_effect_inside {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKhWVyPnYh051Jdb5jLwha9gLb7NL4ZMEYJltkyKhjM0MKccXbAB8uPrzv0dVUDrFF-ZVLGVzfdJLV9pzlsZfpgZb7ZGX_SOwfrpD81F7abG48zE3PJ9s66movImjfhcZCe7rnZzcwImY/s90/magnify.png) no-repeat scroll center center transparent;}
.lightbox_video,.lightbox_image,.image_overlay_effect,.image_overlay_effect_inside {bottom: 0;left: 0;position: absolute;right: 0;top: 0;z-index: 2;}

Chú ý: Các bạn down các ảnh từ link ảnh bôi mài xanh kia rồi up lên host riêng của mình để tránh trường hợp các file ảnh này bị xóa mất gây ra lỗi hiển thị.

Bước 2: Tìm thẻ sau: <div id='content-wrapper'> rồi dán đoạn code dưới đây lên trên thẻ tìn được
(Đây là cách tạo ra 1 widget dạng HTML/Javascript ,và cho phép nó chỉ hiển thị ở trang chủ.Các bạn không nhất thiết phải cho code dưới lên trên <div id='content-wrapper'> mà có thể cho vào vị trí tùy ý mà muốn hiển thị khác nhưng bạn phải có kiến thức chút về HTML, CSS )
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'/>
<script src='https://sites.google.com/site/seovnpro/accordion.js' type='text/javascript'/>
<b:section id='slider' maxwidgets='1' showaddelement='no'>
<b:widget id='HTML96' locked='true' title='Accordion Slider' type='HTML'/>
</b:section>
</b:if>
Lưu ý:
- Nếu website hay blog bạn mà có dòng tương tự như này <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'/> thì các bạn ko cần phải thêm cái này <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'/> vào nữa.
<script src='https://sites.google.com/site/seovnpro/accordion.js' type='text/javascript'/> Các bạn down về rối up lên host riêng nhé tránh trường hợp bị mất file này gây lỗi hiển thị
HTML96 - sliderCái này bạn đặt tên ko được trùng nhé
Accordion Slider: Tên của widget sẽ tạo

Bước 3: Nhấn lưu lại

Bước 4:  Quay lại Phần tử Trang tìm tới phần Layout (Bố cục) bạn sẽ thấy 1 Wiget mới với tên Accordion Slider bạn bấm vào chỉnh sửa (Edit). Xóa cái tên Accordion Slider đi và dán đoạn code bên dưới vào:
<div class='container'>
<div class=' preloading autoslide_true autoslidedelay__5 slideshow_aviacordion aviacordion slideshow_container'>
<span class='rounded_corner rctl'></span>
<span class='rounded_corner rctr'></span>
<span class='rounded_corner rcbl'></span>
<span class='rounded_corner rcbr'></span>
<span class='bottom_shadow'></span>
<ul class='slideshow' style='height: 370px; width: 930px;'>
<li class='featured featured_container1' ><a href='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1vLgOFuxqD_ANsJhREnDxu900YYCeRNFw4Jf6brwLbUbgtGZlzfzi21Zfx_AWZMyj5uRICRUBOr5SeaFA60SsSugqtnz7pB8WK6OmraEv3Ph7BxhlADNcAdoTTzO1z0JTE15bjX-pIAg/s1024/1.jpg'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1vLgOFuxqD_ANsJhREnDxu900YYCeRNFw4Jf6brwLbUbgtGZlzfzi21Zfx_AWZMyj5uRICRUBOr5SeaFA60SsSugqtnz7pB8WK6OmraEv3Ph7BxhlADNcAdoTTzO1z0JTE15bjX-pIAg/s610/1.jpg' />
<div class="slideshow_caption">
<div class="inner_caption">
<h1>Yep you guessed right, this is the image caption title!!</h1>
<div class="featured_caption">This is the image caption text. you can choose to omit it if you want. In that case there will be no caption text overlay once you hover over this image.</div></div></div></a></li>

<li class='featured' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0mNYUl3ZfnOBiu3_-4WXm0Rko_Djl30p3vVoY9tunSfNfVPXUTvCnVtwtXXBrpY9Lzh6KWpxY9sKu78MaTNXJT8l9GDhzwlVuei_nOWzTPfVeGlES6Jwj4HJ1mhP21wNxYH2xbJOI0Y/s610/2.jpg' />
<div class='slideshow_video embeded_video'>
<iframe src="http://www.youtube.com/embed/A8sJUwQZ0lo?autoplay=1;wmode=opaque" width="500" height="281" frameborder="0" webkitallowfullscreen allowfullscreen></iframe></div>
<div class="slideshow_caption">
<div class="inner_caption"><h1>Defense of the Ancients</h1>
<div class="featured_caption">As you can see its quite simply to link to whatever content you want.</div></div></div></li>

<li class='featured'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9RN6kMbb_i9LpOr8A57TG1LOgCnagJGkxF9jFiePxldRTF7Lf2-qhxalT5tqQkwnGi90xRbkaPly3FtPdgvMgytb68n-vLbDOtotNcsyJAmvWBep6RwMDchyphenhypheniWi5TQTp6xXAIfaNPDgs/s610/3.jpg' />
<div class='slideshow_video embeded_video'>
<iframe src="http://www.youtube.com/embed/YfqIOOKdx6k?autoplay=1;wmode=opaque" width="500" height="281" frameborder="0" webkitallowfullscreen allowfullscreen></iframe></div>
<div class="slideshow_caption">
<div class="inner_caption"><h1>Directly Embed Video</h1></div></div></li>

<li class='featured'><a href='#'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJDA0vKCwVk8CTv3168OQpkwj02PEzx9KBOhyOtFE19W8oBFQf7u0N7CSxRXhqRL3GpNlzTXmbG_J0_MTk2Z0XiHo8keLOtejyqtNIvdZRnJBBUAAzuBqqDQK9H4tWw9TAzaOjn9X5uCc/s610/4.jpg' /></a>
<div class="slideshow_caption">
<div class="inner_caption"><h1>Link to a page. In this particular case its the Portfolio 4 Column page! </h1>
<div class="featured_caption">This time we have chosen to link to an external page, namely the portfolio page. Want to see it? Click the image! </div></div></div></li>

<li class='featured'><a href='http://vimeo.com/7809605'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4l5QANZ538roJYFq_I8Ztius9rjwGDLEtN-aKE__fO_6JdE96GNJjoJhszPKHj2Iiif4GRtovN8psQ5mOzm9luqXm3wOk5Dceo2ee3_ai5BM9NCDzgsZsJsoq_fG3cRxwFZOkKmmNbDU/s610/5.jpg' /></a>
<div class="slideshow_caption">
<div class="inner_caption"><h1>Its a Lightbox link, once again</h1>
<div class="featured_caption">This one is a lightbox link to a video site. As you can see you can link to almost everything you can imagine ;)</div></div></div></li>
</ul>
</div>
</div>
Chú ý: Các bạn thay link ảnh và nội dung theo ý muốn của bạn nhé.

Chúc các bạn thành công !

Like This Post? Please share!

  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

No comments :

Leave a Reply

Scroll to top