Blogger panelimizin Tasarım > Html’yi Düzenle bölümü açarak aşağıdaki kodu buluyoruz.
</head>
Bu kodun hemen üzerine aşağıdaki kodları ekliyoruz.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function() {
$(".paging").show();
$(".paging a:first").addClass("active");
var imageWidth = $(".window").width();
var imageSum = $(".image_reel img").size();
var imageReelWidth = imageWidth * imageSum;
$(".image_reel").css({'width' : imageReelWidth});
//Paging + Slider Function
rotate = function(){
var triggerID = $active.attr("rel") - 1; //Get number of times to slide
var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide
$(".paging a").removeClass('active'); //Remove all active class
$active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)
//Slider Animation
$(".image_reel").animate({
left: -image_reelPosition
}, 500 );
};
//Rotation + Timing Event
rotateSwitch = function(){
play = setInterval(function(){ //Set timer - this will repeat itself every 3 seconds
$active = $('.paging a.active').next();
if ( $active.length === 0) { //If paging reaches the end...
$active = $('.paging a:first'); //go back to first
}
rotate(); //Trigger the paging and slider function
}, 5000); //Timer speed in milliseconds (3 seconds)
};
rotateSwitch(); //Run function on launch
//On Hover
$(".image_reel a").hover(function() {
clearInterval(play);
}, function() {
rotateSwitch(); //Resume rotation
});
//On Click
$(".paging a").click(function() {
$active = $(this); //Activate the clicked paging
//Reset Timer
clearInterval(play); //Stop the rotation
rotate(); //Trigger rotation immediately
rotateSwitch(); // Resume rotation
return false; //Prevent browser jump to link anchor
});
});
</script>
Daha sonra aşağıdaki kodu buluyoruz
]]></b:skin>
Bu kodun hemen üzerine de aşağıdaki kodları ekliyoruz.
#galeria{
margin: 0 auto;
padding: 0px 0px;
width: 810px;
z-index:999;
}
.main_view {
float:left;
position: relative;
z-index:999;
}
.window {
height:289px;
width: 800px;
border:1px solid #fff;
overflow: hidden;
position: relative;
-moz-box-shadow:0px 0px 4px #fff;
-webkit-box-shadow:0px 0px 4px #fff;
box-shadow:0px 0px 4px #fff;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;z-index:999;
}
.image_reel {
position: absolute;
top: 0; left: 0;
z-index:1000;
}
.image_reel img {
float: left;
z-index:1001;
}
.paging {
position: absolute;
bottom: 40px;
right: -1px;
width: 220px;
height:41px;
z-index: 100;
text-align: center;
line-height: 40px;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJwJEaYvYNB2KgORIkOWsjpT0H22cCX-d9xkZsZxLC4JE6kFZR25VDaUPVgNIXwwwNwAzBoE2-M7ExeESowXrjAYxOwP3TgMDAdYKGRgog4rzq652jtLK6mFtvIbv1zvGwLZ9_Q1nxav2Z/s0/slider.png);
-moz-border-radius-topleft: 15px;
-moz-border-radius-bottomleft: 15px;
-webkit-border-radius-bottomleft: 15px;
-webkit-border-radius-topleft: 15px;
border:1px solid #fff;
border-right: 0px solid;
display: none;
-moz-box-shadow:inset 0px 0px 2px #d6d6d6;
-webkit-box-shadow: inset 0px 0px 2px #d6d6d6;
box-shadow:inset 0px 0px 2px #d6d6d6;
z-index:1002;
}
.paging a {
outline:none;
padding: 5px 10px;
text-decoration: none;
color: #999;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJwJEaYvYNB2KgORIkOWsjpT0H22cCX-d9xkZsZxLC4JE6kFZR25VDaUPVgNIXwwwNwAzBoE2-M7ExeESowXrjAYxOwP3TgMDAdYKGRgog4rzq652jtLK6mFtvIbv1zvGwLZ9_Q1nxav2Z/s0/slider.png) center;
-moz-border-radius: 17px;
-khtml-border-radius: 17px;
-webkit-border-radius: 17px;
-moz-box-shadow: inset 0px 0px 1px #d6d6d6;
-webkit-box-shadow:inset 0px 0px 1px #d6d6d6;
box-shadow:inset 0px 0px 1px #d6d6d6;
border:1px solid #fff;z-index:1002;
}
.paging a.active {
font-weight: bold;
border: 1px solid #fff;
color: #17add8;
background: #f1f1f1;
-moz-border-radius: 17px;
-khtml-border-radius: 17px;
-webkit-border-radius: 17px;
-moz-box-shadow: inset 0px 0px 2px #d6d6d6;
-webkit-box-shadow:inset 0px 0px 2px #d6d6d6;
box-shadow:inset 0px 0px 2px #d6d6d6;
z-index:1002;
}
.paging a:hover {
font-weight: bold;
z-index:1002;
}
Son olarak ise slaytımızın yer almasını istediğimiz şablon bölümüne aşağıdaki kodları ekliyoruz.
<div id='galeria'>
<div class='main_view'>
<div class='window'>
<div class='image_reel'>
<a href='#' rel='1'><img alt='' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTigDSiyQZcU91RpRnkTwoIDesvanN1D4hx3EG6Tk_01erDADsDQeZgTYUmLdVONdpazxXB8c9_sbR1HFI43yNABOAkPCXt9d8DnhOBm59PmwgN9ZvfiUMSwvVhFuMUFJoR2z5TjU4Sb39/s0/wallpapersafull_4110..jpg'/></a>
<a href='#' rel='2'><img alt='' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwccE5VCVl8dlioycV691xB05Q0Dx91bsR854URg-Et4VIiQjM8Yj4fKDLrILVH6Arm6k4CYA6dtU3kaJ1uVemet3z3S_v999oNdt0rsxxsx2CpN7d8R2XRYcBYDLoUyjSLQKEjNNs_8zA/s0/wallpapersafull_3986..jpg'/></a>
<a href='#' rel='3'><img alt='' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhWYlz2olXIQmscVL0_675UG2zL501EDuCqgZOICN7k9-6dZSBCE1LQxNo03o8WpzxAISbuN6pe3zPVt-c5uAVm0hyphenhyphenazqESXkDG98zEQ31FhiMppb11-rC13A_idxT-pG29tuLFb_PYw1/s0/wallpapersafull_4106..jpgg'/></a></div></div>
<div class='paging'><a href='' rel='1'>1</a><a href='' rel='2'>2</a><a href='' rel='3'>3</a>
</div></div>
</div>
Böylece slaytımızı blog sayfamıza eklemiş olduk.
Önemli notlar:
- Script kodları içerisinde kırmızıyla belirttiğim rakamı küçülterek slayttaki resimlerin daha kısa aralıklarla değişmesini sağlayabilirsiniz.
- Slaytta yer alan ve kırmızıyla belirttiğim resimlerin yerine yine 800 px × 289 px boyutlarında farklı resimler koyabilirsiniz.
- Slayttaki resimlere tıklandığında istediğiniz bir adrese yönlendirmesini isterseniz de yine kırmızıyla belirttiğim # kısmını silerek adresi yazabilirsiniz.
Örnek resim:
Yorumlarınızla Katkıda Bulunun
Hiç yorum yok
Yorum Gönder