Team:LMU-Munich/Templates/Page Header
From 2012.igem.org
(Difference between revisions)
(script to remove title texts from navigation links) |
|||
Line 478: | Line 478: | ||
</div> | </div> | ||
<html> | <html> | ||
+ | <img id="mascot" alt="Sporenfreunde" src="https://static.igem.org/mediawiki/2012/e/e3/Team_LMU_Sporenfreunde.png"> | ||
</div> | </div> | ||
+ | <script type="text/javascript"> | ||
+ | var mascot = document.getElementById("mascot"); | ||
+ | var dummy = document.createElement("div"); | ||
+ | mascot.parentNode.insertBefore(dummy, mascot); | ||
+ | |||
+ | function get_y(ele) { | ||
+ | var ret = 0; | ||
+ | for(; ele != null; ele = ele.offsetParent) { | ||
+ | ret += ele.offsetTop; | ||
+ | } | ||
+ | return ret; | ||
+ | } | ||
+ | |||
+ | function get_x(ele) { | ||
+ | var ret = 0; | ||
+ | for(; ele != null; ele = ele.offsetParent) { | ||
+ | ret += ele.offsetLeft; | ||
+ | } | ||
+ | return ret; | ||
+ | } | ||
+ | |||
+ | window.onscroll = window.onresize = function() { | ||
+ | var x = get_x(dummy); | ||
+ | var y = get_y(dummy); | ||
+ | |||
+ | var scroll = document.body.scrollTop; | ||
+ | var height = window.innerHeight; | ||
+ | var distance_bottom = height - 127 - (y - scroll); | ||
+ | |||
+ | if(distance_bottom > 50) { | ||
+ | mascot.style.position = "fixed"; | ||
+ | mascot.style.left = x; | ||
+ | mascot.style.top = height - 127 - 50; | ||
+ | } else { | ||
+ | mascot.style.position = "static"; | ||
+ | } | ||
+ | dummy.innerHTML = "hello" + distance_bottom; | ||
+ | } | ||
+ | |||
+ | window.onscroll(); | ||
+ | </script> | ||
<div id="right"> | <div id="right"> | ||
</html> | </html> | ||
Line 515: | Line 557: | ||
{{: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"> |
Revision as of 18:03, 25 September 2012
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".
[ more news ]
Page title
List of templates:
- Team:LMU-Munich/Templates/Page Header
- this page, include at the start of every page, the first parameter specifies the image to be shown in the sidebar
- Team:LMU-Munich/Templates/Page Footer
- include at the end of every page
- Team:LMU-Munich/Templates/Navigation
- edit the menu here
- Team:LMU-Munich/Templates/News
- the text in the sidebar
box test
A1 | B1 | C1 |
---|---|---|
A2 | B2 | C2 |
A3 | B3 | C3 |
a id="logo_beadzillus" href="https://2012.igem.org/Team:LMU-Munich">