Team:UT-Tokyo/Template/Header
From 2012.igem.org
(Difference between revisions)
m (list) |
|||
Line 30: | Line 30: | ||
.nav{ | .nav{ | ||
position:relative; top:-1em; | position:relative; top:-1em; | ||
- | margin: | + | margin:0em 2em 0em 1em; |
font-size 10pt; color:#222;} | font-size 10pt; color:#222;} | ||
.nav >ul > li{ | .nav >ul > li{ | ||
Line 42: | Line 42: | ||
border-width:1px 6px 0px 6px;*/ | border-width:1px 6px 0px 6px;*/ | ||
margin:1px 6px 0px 6px;} | margin:1px 6px 0px 6px;} | ||
- | .nav li > ul{display:none;} | + | .nav li > ul{display:none; position:absolute; bottom:1.2em; |
+ | width:100px; background-color:#cce;} | ||
.nav li:hover{background-color:#aae;} | .nav li:hover{background-color:#aae;} | ||
.nav li:hover > ul{ | .nav li:hover > ul{ | ||
- | display:block | + | display:block;} |
- | + | ||
.nav li > ul >li{ | .nav li > ul >li{ | ||
display:block; | display:block; | ||
Line 56: | Line 56: | ||
<div class="nav"> | <div class="nav"> | ||
<ul> | <ul> | ||
- | <li><a href="https://2012.igem.org/Team:UT-Tokyo">Home</a></li> | + | <li id="nav_0"><a href="https://2012.igem.org/Team:UT-Tokyo">Home</a></li> |
- | <li><a href="https://2012.igem.org/Team:UT-Tokyo/Team">Team</a></li> | + | <li id="nav_1"><a href="https://2012.igem.org/Team:UT-Tokyo/Team">Team</a></li> |
- | <li><a href="https://2012.igem.org/Team:UT-Tokyo/Project">Project</a><ul> | + | <li id="nav_2"><a href="https://2012.igem.org/Team:UT-Tokyo/Project">Project</a><ul> |
<li>H2</li> | <li>H2</li> | ||
<li><a href="https://2012.igem.org/Team:UT-Tokyo/Modeling">Modeling</a></li> | <li><a href="https://2012.igem.org/Team:UT-Tokyo/Modeling">Modeling</a></li> | ||
Line 65: | Line 65: | ||
<li><a href="https://2012.igem.org/Team:UT-Tokyo/Parts">Parts</a></li> | <li><a href="https://2012.igem.org/Team:UT-Tokyo/Parts">Parts</a></li> | ||
<li>Human Practice</li> | <li>Human Practice</li> | ||
- | <li><a href="https://2012.igem.org/Team:UT-Tokyo/Notebook">Notebook</a><ul> | + | <li id="nav_4"><a href="https://2012.igem.org/Team:UT-Tokyo/Notebook">Notebook</a><ul> |
<li>sandbox</li> | <li>sandbox</li> | ||
<li><a href="https://2012.igem.org/Team:UT-Tokyo/Internal/Sandbox">sandbox</a></li> | <li><a href="https://2012.igem.org/Team:UT-Tokyo/Internal/Sandbox">sandbox</a></li> | ||
Line 75: | Line 75: | ||
</div> | </div> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | |||
+ | function showhide(){ | ||
+ | if(document.getElementById){ | ||
+ | var nm = loc(); | ||
+ | var nnow = document.getElementById('nav' + nm) | ||
+ | nnow.style.background = "#aecdeb"; | ||
+ | var unow = nnow.lastChild | ||
+ | unow.style.display = "block"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function loc(){ | ||
+ | var data2 = "aaaaa"; | ||
+ | var data3 = "bbbbb"; | ||
+ | var data1 = location.href.split("?")[1]; | ||
+ | if(data1){ | ||
+ | var data2 = data1.split("&")[0]; | ||
+ | var data3 = data2.split("=")[1];} | ||
+ | // window.alert(data3); | ||
+ | |||
+ | if(data3.match('Team:UT-Tokyo/?$')){ return "_0";} | ||
+ | else if(data3.match('Team:UT-Tokyo/(Team|Acknowledgment)')){ return "_1";} | ||
+ | else if(data3.match('Team:UT-Tokyo/Project')){ return "_2";} | ||
+ | else if(data3.match('Team:UT-Tokyo/(Data|Parts|LabNote)')){ return "_3";} | ||
+ | else if(data3.match('Team:UT-Tokyo/(Society|Outreach|Safety)')){ return "_4";} | ||
+ | else{ | ||
+ | return "_0";} | ||
+ | } | ||
+ | |||
+ | showhide(); | ||
+ | </script> | ||
+ | |||
<div id="pageContent"> | <div id="pageContent"> | ||
Revision as of 14:53, 7 July 2012