Difference between revisions of "Team:Marburg/Gallery"

 
(6 intermediate revisions by the same user not shown)
Line 215: Line 215:
 
/* Fader */
 
/* Fader */
  
#fader {position:relative;border:1px solid #D0D0D0;}
+
#fader {position:relative;border:1px solid #D0D0D0;width:820px;}
 
#fader img {
 
#fader img {
 
position:absolute;
 
position:absolute;
 
z-index:1;
 
z-index:1;
 
height:450px;
 
height:450px;
        width:820px;
 
 
padding:10px;
 
padding:10px;
 
opacity:0.0;
 
opacity:0.0;
Line 269: Line 268:
 
<li><a href="https://2015.igem.org/Team:Marburg/Curli">NUTRInity - Pick up</a></li>  
 
<li><a href="https://2015.igem.org/Team:Marburg/Curli">NUTRInity - Pick up</a></li>  
 
<li><a href="https://2015.igem.org/Team:Marburg/CDI">NUTRInity - Cut off</a></li>  
 
<li><a href="https://2015.igem.org/Team:Marburg/CDI">NUTRInity - Cut off</a></li>  
 +
<li><a href="https://2015.igem.org/Team:Marburg/Design">Future Application</a></li>
 
<li><a href="https://2015.igem.org/Team:Marburg/InterLab">InterLab Study</a></li>
 
<li><a href="https://2015.igem.org/Team:Marburg/InterLab">InterLab Study</a></li>
 
<li><a href="https://2015.igem.org/Team:Marburg/Measurement">Measurement Study</a></li>
 
<li><a href="https://2015.igem.org/Team:Marburg/Measurement">Measurement Study</a></li>
Line 278: Line 278:
 
<li><a href="https://2015.igem.org/Team:Marburg/Hessentag">Hessentag</a></li>
 
<li><a href="https://2015.igem.org/Team:Marburg/Hessentag">Hessentag</a></li>
 
<li><a href="https://2015.igem.org/Team:Marburg/Killswitch">KillSwitch Statistics</a></li>  
 
<li><a href="https://2015.igem.org/Team:Marburg/Killswitch">KillSwitch Statistics</a></li>  
<li><a href="https://2015.igem.org/Team:Marburg/FutureApplication">Future Application</a></li>
 
 
</ul>
 
</ul>
 
</li>
 
</li>
Line 342: Line 341:
 
<div style="z-index:1;text-align:center;padding-bottom:50px;"><img src="https://static.igem.org/mediawiki/2015/a/a7/MR_pic_Button_Gallery.png" style="height:60px;"/></div>
 
<div style="z-index:1;text-align:center;padding-bottom:50px;"><img src="https://static.igem.org/mediawiki/2015/a/a7/MR_pic_Button_Gallery.png" style="height:60px;"/></div>
  
<div id="fader" style="margin:0 auto;">
+
<div id="fader" style="margin-left:120px;margin-bottom:30px;">
 
<img src="https://static.igem.org/mediawiki/2015/7/71/MR_pic_TeamfunAnna.jpg" alt="Anna" />
 
<img src="https://static.igem.org/mediawiki/2015/7/71/MR_pic_TeamfunAnna.jpg" alt="Anna" />
 
<img src="https://static.igem.org/mediawiki/2015/9/91/MR_pic_TeamfunAlex.jpg" alt="Alex" />
 
<img src="https://static.igem.org/mediawiki/2015/9/91/MR_pic_TeamfunAlex.jpg" alt="Alex" />
Line 378: Line 377:
 
$.fn.initGallery = function() {
 
$.fn.initGallery = function() {
 
//SCALE CONTAINER
 
//SCALE CONTAINER
//var fades = $('img',this);
+
var fades = $('img',this);
//var maxwidth = 0;
+
var maxwidth = 0;
//var maxheight = 0;
+
var maxheight = 0;
//fades.each(function() {
+
fades.each(function() {
//maxwidth = ($(this).outerWidth() > maxwidth) ? $(this).outerWidth() : maxwidth;
+
maxwidth = ($(this).outerWidth() > maxwidth) ? $(this).outerWidth() : maxwidth;
//maxheight = ($(this).outerHeight() > maxheight) ? $(this).outerHeight() : maxheight;
+
maxheight = ($(this).outerHeight() > maxheight) ? $(this).outerHeight() : maxheight;
//});
+
});
//this.height( maxheight );
+
this.height( maxheight );
//this.width( maxwidth );
+
this.width( maxwidth );
 
//FIX IMAGE POSITIONS
 
//FIX IMAGE POSITIONS
 
fades.each(function() {
 
fades.each(function() {
Line 401: Line 400:
 
}
 
}
 
return this;
 
return this;
 +
}
 +
$.fn.rescaleGallery = function() {
 +
//SCALE CONTAINER
 +
        $(this).ready(function() {
 +
var parent = $('#fader');
 +
        var fades = $('#fader img');
 +
var maxwidth = 0;
 +
var maxheight = 0;
 +
console.log("CALL on " + $(this).attr('alt') + " :" + fades.length);
 +
fades.each(function() {
 +
maxwidth = ($(this).outerWidth() > maxwidth) ? $(this).outerWidth() : maxwidth;
 +
maxheight = ($(this).outerHeight() > maxheight) ? $(this).outerHeight() : maxheight;
 +
});
 +
parent.height( maxheight );
 +
parent.width( maxwidth );
 +
//FIX IMAGE POSITIONS
 +
fades.each(function() {
 +
if( $(this).outerWidth() < maxwidth-2)
 +
$(this).css('left',(maxwidth/2 - $(this).outerWidth()/2));
 +
if( $(this).outerHeight() < maxheight-2)
 +
$(this).css('top',(maxheight/2 - $(this).outerHeight()/2));
 +
});
 +
});
 
}
 
}
 
$.fn.setFader = function(interval,fadetime) {
 
$.fn.setFader = function(interval,fadetime) {
Line 425: Line 447:
 
slideid = $('#fader').initGallery().setFader(3000,500);
 
slideid = $('#fader').initGallery().setFader(3000,500);
 
$('#fader').hover(function() {clearInterval(slideid);},function() {slideid = $(this).setFader(3000,500);});
 
$('#fader').hover(function() {clearInterval(slideid);},function() {slideid = $(this).setFader(3000,500);});
$('#fader img').click(function() {console.log("CLICK ON IMG: \"" + $(this).attr('alt') + "\"");});
+
$('#fader img').rescaleGallery();
 
});
 
});
 
</script>
 
</script>

Latest revision as of 17:12, 16 September 2015

Anna Alex Katrin Andi Maik Stuki Andy Lisa Matze Sascha Tresor 1 2 3 5 6 7 1 2 3 5 6 7 7 1 2 3 5 6 7
iGEM Marburg - ZSM Karl-von-Frisch-Straße 16, D - 35043 Marburg