Template:Team:Hannover/main.tmpl

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
<html>
<html>
<body>
<body>
-
 
+
<div id="banner">
-
<map name="igem_hannover_2014_menu" id="igem_hannover_2014_menu">
+
<a style="display:block; height:100%">
-
<area shape="rect" coords="76,28,184,60" href="https://2014.igem.org/Team:Hannover" onMouseover="menu_onMouseOver('HOME');" onMouseout="menu_onMouseOut();" alt="Wiki Home Page - iGem Team Hannover 2014" title="Wiki Home Page - iGem Team Hannover 2014" />
+
<a href="https://2014.igem.org/Team:Hannover"></a>
-
<area shape="rect" coords="195,19,343,50" href="https://2014.igem.org/Team:Hannover/Project" onMouseover="menu_onMouseOver('PROJECT');" onMouseout="menu_onMouseOut();" alt="Project - iGem Team Hannover 2014" title="Project - iGem Team Hannover 2014" />
+
</div>
-
<area shape="rect" coords="357,22,626,57" href="https://2014.igem.org/Team:Hannover/Safety" onMouseover="menu_onMouseOver('HUMAN-PRACTICE');" onMouseout="menu_onMouseOut();" alt="Human Practice - iGem Team Hannover 2014" title="Human Practice - iGem Team Hannover 2014" />
+
       
-
<area shape="poly" coords="644,18,645,19,750,25,748,57,641,51" href="https://2014.igem.org/Team:Hannover/Team" onMouseover="menu_onMouseOver('TEAM');" onMouseout="menu_onMouseOut();" alt="iGem Team Hannover 2014" title="iGem Team Hannover 2014" />
+
-
<area shape="poly" coords="20,4,21,5,2,31,2,38,38,52,60,38,61,24,28,0" href="https://2014.igem.org/Main_Page" alt="iGem 2014 - Main Page" title="iGem 2014 - Main Page" />
+
-
</map>
+
-
<style>
+
-
#preload-01 { background: url(https://static.igem.org/mediawiki/2014/c/ce/Hannover_20140831_MENU-HOME.png
+
-
) no-repeat -9999px -9999px; }
+
-
#preload-02 { background: url(https://static.igem.org/mediawiki/2014/2/25/Hannover_20140831_MENU-TEAM.png
+
-
) no-repeat -9999px -9999px; }
+
-
#preload-03 { background: url(https://static.igem.org/mediawiki/2014/b/b0/Hannover_20140831_MENU-PROJECT.png
+
-
) no-repeat -9999px -9999px; }
+
-
#preload-04 { background: url(https://static.igem.org/mediawiki/2014/d/dc/Hannover_20140831_MENU-HUMAN-PRACTICE.png) no-repeat -9999px -9999px; }
+
-
#menu_image {
+
-
    display: block;
+
-
    margin-left: auto;
+
-
    margin-right: auto;
+
-
    margin-bottom: 20px;
+
-
}
+
-
</style>
+
-
<div id='#preload-01' ></div><div id='#preload-02' ></div><div id='#preload-03' ></div><div id='#preload-04' ></div>
+
-
 
+
-
<script type='text/javascript'>
+
-
 
+
-
var menu_currentPage = 'ANY';
+
-
 
+
-
var pageMap = {
+
-
    'HOME' : 'https://static.igem.org/mediawiki/2014/c/ce/Hannover_20140831_MENU-HOME.png',
+
-
    'TEAM' : 'https://static.igem.org/mediawiki/2014/2/25/Hannover_20140831_MENU-TEAM.png',
+
-
    'PROJECT' : 'https://static.igem.org/mediawiki/2014/b/b0/Hannover_20140831_MENU-PROJECT.png',
+
-
    'HUMAN-PRACTICE' : 'https://static.igem.org/mediawiki/2014/d/dc/Hannover_20140831_MENU-HUMAN-PRACTICE.png'
+
-
};
+
-
 
+
-
function menu_beginsWithLower(needle, haystack){
+
-
    var h = haystack.toLowerCase();
+
-
    var n = needle.toLowerCase();
+
-
    return (h.substr(0, n.length) == n);
+
-
}
+
-
 
+
-
function menu_init() {
+
-
      var loc = document.location.href;
+
-
      if (menu_beginsWithLower('https://2014.igem.org/Team:Hannover/Project', loc)) {
+
-
            menu_currentPage= 'PROJECT';
+
-
      } else if (menu_beginsWithLower('https://2014.igem.org/Team:Hannover/Safety', loc)) {
+
-
            menu_currentPage= 'HUMAN-PRACTICE';
+
-
      } else if (menu_beginsWithLower('https://2014.igem.org/Team:Hannover/Team', loc)) {
+
-
            menu_currentPage= 'TEAM';
+
-
      } else if (menu_beginsWithLower('https://2014.igem.org/Team:Hannover', loc)) {
+
-
            menu_currentPage= 'HOME';
+
-
      }
+
-
      menu_onMouseOut();
+
-
}
+
-
 
+
-
function menu_onMouseOut() {
+
-
      var menu_image_src = pageMap[menu_currentPage];
+
-
      $('#menu_image').attr('src', menu_image_src);
+
-
}
+
-
 
+
-
function menu_onMouseOver(menu_item) {
+
-
      var menu_image_src = pageMap[menu_item];
+
-
      //$('#menu_image').attr('src', menu_image_src);
+
-
}
+
-
 
+
-
$( document ).ready( menu_init() );
+
-
</script>
+
-
 
+
-
<div id="banner"><a style="display:block; height:100%">
+
-
              <a href="https://2014.igem.org/Team:Hannover"></a>  
+
-
      </div>
+
-
 
+
-
<div id="main_menue">
+
-
<div id="main_box">
+
-
 
+
-
<img id='menu_image' src="https://static.igem.org/mediawiki/2014/0/04/Hannover_20140831_MENU-ANY.png" width="756" height="64" border="0" alt="" title="" usemap="#igem_hannover_2014_menu" />
+
-
 
+
<!-- ALTE NAVIGATION, ANDI
<!-- ALTE NAVIGATION, ANDI
-
              <div id="banner"><a style="display:block; height:100%">
 
-
              <a href="https://2014.igem.org/Team:Hannover"></a>
 
-
      </div>
 
-
 
<div id="main_menue">
<div id="main_menue">
<ul id="nav">
<ul id="nav">
Line 132: Line 55:
               </ul>
               </ul>
-
-->
+
 
</div>
</div>
</div>
</div>
 +
-->
</body>
</body>
</html>
</html>

Revision as of 21:03, 31 August 2014