Team:LMU-Munich/Templates/Page Header

From 2012.igem.org

(Difference between revisions)
 
(28 intermediate revisions not shown)
Line 32: Line 32:
border-top: 1px solid transparent;
border-top: 1px solid transparent;
margin-top: -1px;
margin-top: -1px;
-
position: static;
 
}
}
-
html {
+
body {
-
background: white; /* ← change the left/right border color here! */
+
background: url(https://static.igem.org/mediawiki/2012/e/e3/Team_LMU_banner.png) no-repeat 50% 20px white;
background: url(https://static.igem.org/mediawiki/2012/e/e3/Team_LMU_banner.png) no-repeat 50% 20px white;
-
}
 
-
 
-
body {
 
width: 1000px; /* against my better judgement… */
width: 1000px; /* against my better judgement… */
margin: 0 auto;
margin: 0 auto;
Line 110: Line 105:
margin: 0;
margin: 0;
padding: 0 213px;
padding: 0 213px;
-
background: url(http://wrtlprnft.ath.cx/top.png) #785d99 repeat-y;
+
background: url(https://static.igem.org/mediawiki/2012/8/86/Team_LMU_top.png) #785d99 repeat-y;
height: 2.5em;
height: 2.5em;
}
}
Line 117: Line 112:
height: 100px;
height: 100px;
margin: 0 -221px;
margin: 0 -221px;
-
background: url(http://wrtlprnft.ath.cx/top_shadow.png) no-repeat;
+
background: url(https://static.igem.org/mediawiki/2012/2/2c/Team_LMU_top_shadow.png) no-repeat;
margin-top: 154px;
margin-top: 154px;
margin-bottom: -98px;
margin-bottom: -98px;
Line 126: Line 121:
margin: 0 -213px;
margin: 0 -213px;
padding-bottom: .4em;
padding-bottom: .4em;
-
background: url(http://wrtlprnft.ath.cx/bottom.png) #785d99 repeat-y;
+
background: url(https://static.igem.org/mediawiki/2012/9/99/Team_LMU_bottom.png) #785d99 repeat-y;
}
}
Line 478: Line 473:
</div>
</div>
<html>
<html>
-
<img id="mascot" alt="Sporenfreunde" src="https://static.igem.org/mediawiki/2012/e/e3/Team_LMU_Sporenfreunde.png">
+
<div id="mascot"><img alt="Sporenfreunde" src="https://static.igem.org/mediawiki/2012/e/e3/Team_LMU_Sporenfreunde.png"></div>
</div>
</div>
<script type="text/javascript">
<script type="text/javascript">
Line 484: Line 479:
var dummy = document.createElement("div");
var dummy = document.createElement("div");
mascot.parentNode.insertBefore(dummy, mascot);
mascot.parentNode.insertBefore(dummy, mascot);
 +
mascot.style.marginTop = "-268px";
 +
dummy.style.height = "268px";
function get_y(ele) {
function get_y(ele) {
Line 493: Line 490:
}
}
-
function get_x(ele) {
+
function scroll() {
-
var ret = 0;
+
var scroll_top = window.pageYOffset != null ? window.pageYOffset : document.body.parentElement ? document.body.parentElement.scrollTop : document.body.scrollTop;
-
for(; ele != null; ele = ele.offsetParent) {
+
-
ret += ele.offsetLeft;
+
-
}
+
-
return ret;
+
-
}
+
-
window.onscroll = window.onresize = function() {
+
var distance_bottom = window.innerHeight - 268 - (get_y(dummy) - scroll_top);
-
var x = get_x(dummy);
+
-
var y = get_y(dummy);
+
-
var scroll = document.body.scrollTop;
+
if(distance_bottom > 75) {
-
var height = window.innerHeight;
+
-
var distance_bottom = height - 127 - (y - scroll);
+
-
 
+
-
if(distance_bottom > 50) {
+
mascot.style.position = "fixed";
mascot.style.position = "fixed";
-
mascot.style.left = x;
+
mascot.style.left = (window.innerWidth / 2.0 - 500 + 17) + "px";
-
mascot.style.top = height - 127 - 50;
+
mascot.style.bottom = "75px";
 +
mascot.style.width = "210px";
 +
mascot.style.height = "268px";
} else {
} else {
mascot.style.position = "static";
mascot.style.position = "static";
-
}
+
}(dummy);
-
dummy.innerHTML = "hello" + distance_bottom;
+
}
}
-
window.onscroll();
+
window.onscroll = scroll;
 +
window.onresize = scroll;
 +
scroll();
</script>
</script>
<div id="right">
<div id="right">
Line 557: Line 546:
{{:Team:LMU-Munich/Templates/Page Footer}}
{{:Team:LMU-Munich/Templates/Page Footer}}
</noinclude>
</noinclude>
-
a id="logo_beadzillus" href="https://2012.igem.org/Team:LMU-Munich">
 

Latest revision as of 17:04, 24 October 2012

iGEM Ludwig-Maximilians-Universität München Beadzillus

Team-LMU Sidebar Home.jpg

The LMU-Munich team is exuberantly happy about the great success at the World Championship Jamboree in Boston. Our project Beadzillus finished 4th and won the prize for the "Best Wiki" (with Slovenia) and "Best New Application Project".

IGEM HQ LMU prize.jpg

[ more news ]

Sporenfreunde