(6 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
<!-- Bootstrap theme stylesheet --> | <!-- Bootstrap theme stylesheet --> | ||
<link rel="stylesheet" href="https://2016.igem.org/Team:DTU-Denmark/bootstrap-theme?action=raw&ctype=text/css" type="text/css"> | <link rel="stylesheet" href="https://2016.igem.org/Team:DTU-Denmark/bootstrap-theme?action=raw&ctype=text/css" type="text/css"> | ||
− | <!-- Bootstrap js | + | <!-- Bootstrap js |
− | <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/bootstrap-js?action=raw&ctype=text/javascript"></script> | + | <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/bootstrap-js?action=raw&ctype=text/javascript"></script>--> |
<!-- Movile navigation stylesheet, include default and components, source: http://tympanus.net/codrops/2013/04/19/responsive-multi-level-menu/ --> | <!-- Movile navigation stylesheet, include default and components, source: http://tympanus.net/codrops/2013/04/19/responsive-multi-level-menu/ --> | ||
Line 20: | Line 20: | ||
<!-- Javascripts --> | <!-- Javascripts --> | ||
− | <!-- Hover | + | <!-- Hover |
− | <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/hover-js?action=raw&ctype=text/javascript"></script> | + | <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/hover-js?action=raw&ctype=text/javascript"></script> --> |
<!-- Navigationtion, Add to subbar visibility when hovering | <!-- Navigationtion, Add to subbar visibility when hovering | ||
<script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/nav-js?action=raw&ctype=text/javascript"></script> --> | <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/nav-js?action=raw&ctype=text/javascript"></script> --> | ||
Line 119: | Line 119: | ||
#Topnav { | #Topnav { | ||
− | width: | + | width:90%; |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
margin: auto; | margin: auto; | ||
} | } | ||
Line 154: | Line 149: | ||
#navigation { | #navigation { | ||
float: right; | float: right; | ||
− | font-size: | + | font-size: 1em; |
− | font-weight: | + | font-weight: 200; |
width: 94%; | width: 94%; | ||
} | } | ||
Line 161: | Line 156: | ||
#navigation ul{ | #navigation ul{ | ||
float: right; | float: right; | ||
− | |||
margin-bottom: 0px; | margin-bottom: 0px; | ||
} | } | ||
Line 172: | Line 166: | ||
#sub-navigation { | #sub-navigation { | ||
− | + | width: 94%; | |
− | text-align: | + | text-align: right; |
font-size: 0.9em; | font-size: 0.9em; | ||
position: fixed; | position: fixed; | ||
− | margin-top: - | + | margin-top: -3px; |
font-weight:200; | font-weight:200; | ||
} | } | ||
#sub-navigation ul { | #sub-navigation ul { | ||
− | + | float: right; | |
− | + | ||
− | + | ||
} | } | ||
Line 236: | Line 229: | ||
#sub-navigation li { | #sub-navigation li { | ||
display: inline; | display: inline; | ||
− | |||
padding-left: 10px; | padding-left: 10px; | ||
} | } | ||
Line 242: | Line 234: | ||
#sub-navigation li li{ | #sub-navigation li li{ | ||
display: inline; | display: inline; | ||
− | |||
padding-left: 5px; | padding-left: 5px; | ||
font-style: italic; | font-style: italic; | ||
Line 249: | Line 240: | ||
#navigation ul li { | #navigation ul li { | ||
display: inline; | display: inline; | ||
− | + | ||
} | } | ||
Line 285: | Line 276: | ||
} | } | ||
− | #Topnav a:hover, | + | /*#Topnav a:hover,*/ |
#Topnav a.hover{ | #Topnav a.hover{ | ||
background-color: #990000; /*4A0000, 750000, | background-color: #990000; /*4A0000, 750000, | ||
Line 332: | Line 323: | ||
/*Anytime the screen is less than 991px wide everything within {} apply | /*Anytime the screen is less than 991px wide everything within {} apply | ||
This controls that the mobile navigation is shown when screen size is below 991px in width*/ | This controls that the mobile navigation is shown when screen size is below 991px in width*/ | ||
− | @media screen and (max-width: | + | @media screen and (max-width: 650px) { |
/*#dl-menu { | /*#dl-menu { | ||
Line 345: | Line 336: | ||
top: 0px; | top: 0px; | ||
}*/ | }*/ | ||
− | + | ||
− | # | + | #logo { |
− | + | width: 100%; | |
− | + | height: 75px; | |
+ | padding-top: 0px; /* control that it is below the iGEM topbar*/ | ||
+ | margin-bottom: 0px; | ||
+ | } | ||
#headerWrapper { /*The normal header dissapear at this screen width*/ | #headerWrapper { /*The normal header dissapear at this screen width*/ | ||
− | + | ||
− | + | } | |
+ | |||
+ | #navigation { | ||
+ | float: none; | ||
+ | display: block; | ||
+ | } | ||
+ | |||
+ | #navigation ul{ | ||
+ | float: none; | ||
+ | } | ||
+ | |||
+ | #navigation ul li { | ||
+ | display: block; | ||
+ | float:none; | ||
+ | } | ||
+ | |||
+ | .nav-item { | ||
+ | display: block; | ||
+ | background-size: 10px; | ||
+ | float: none; | ||
+ | line-height: 20px; | ||
+ | padding: 5px; | ||
+ | margin:2px; | ||
+ | |||
+ | } | ||
+ | /* | ||
+ | #navigation a{ | ||
+ | padding-left:8px; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | #sub-navigation { | ||
+ | width:960px; | ||
+ | text-align: left; | ||
+ | font-size: 0.9em; | ||
+ | position: fixed; | ||
+ | margin-top: -8px; | ||
+ | font-weight:200; | ||
+ | } | ||
+ | |||
+ | #sub-navigation ul { | ||
+ | display: inline; | ||
+ | float:left; | ||
+ | margin-right:10px; | ||
+ | } | ||
+ | |||
+ | #sub-navigation > ul { | ||
+ | display:none; | ||
+ | } | ||
+ | |||
+ | #sub-navigation ul.active-sub { | ||
+ | display: inline; | ||
+ | } | ||
+ | |||
+ | |||
+ | #sub-navigation li:before{ | ||
+ | content:"•"; | ||
+ | padding-right:15px; | ||
+ | color:white; | ||
+ | } | ||
+ | |||
+ | |||
+ | #sub-navigation li li:before{ | ||
+ | content:" "; | ||
+ | padding-right:5px; | ||
+ | color:white; | ||
+ | } | ||
+ | |||
+ | #sub-navigation li:first-child:before{ | ||
+ | content:""; | ||
+ | } | ||
+ | |||
+ | #sub-navigation li li:first-child:before{ | ||
+ | content:" "; | ||
+ | } | ||
} | } | ||
Line 416: | Line 485: | ||
<header> | <header> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<!-- Computer navigation --> | <!-- Computer navigation --> | ||
− | <div id="headerWrapper | + | <div id="headerWrapper"> |
<!-- Top navigation bar --> | <!-- Top navigation bar --> | ||
<div id="Topnav"> | <div id="Topnav"> | ||
+ | |||
<div id="logo"> | <div id="logo"> | ||
<a href="https://2016.igem.org/Team:DTU-Denmark"> | <a href="https://2016.igem.org/Team:DTU-Denmark"> | ||
Line 648: | Line 502: | ||
<!--<li><a href="https://2016.igem.org/Team:DTU-Denmark/bla" class="achievements nav-item" id="achievements">Achievements</a></li>--> | <!--<li><a href="https://2016.igem.org/Team:DTU-Denmark/bla" class="achievements nav-item" id="achievements">Achievements</a></li>--> | ||
− | <li><a href=" | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/project" class="project nav-item" id="project">Project</a></li> |
− | <li><a href="#" class="results nav-item" id="parts">Wetlab</a></li> | + | <!--<li><a href="#" class="results nav-item" id="parts">Wetlab</a></li>--> |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/wetlab" class="notebook nav-item" id="notebook">Wetlab</a></li> | |
− | <li><a href=" | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/compute" class="hardware nav-item" id="hardware">Compute</a></li> |
− | <li><a href=" | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/team" class="modeling nav-item" id="modeling">Team</a></li> |
− | <li><a href=" | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/outreach" class="practices nav-item" id="practices">Outreach</a></li> |
<!-- | <!-- | ||
<li><a href="#" class="collaborations nav-item" id="collaborations">Collaboration</a></li> | <li><a href="#" class="collaborations nav-item" id="collaborations">Collaboration</a></li> | ||
Line 662: | Line 516: | ||
</div> | </div> | ||
</div> <!--/ Top navigation bar --> | </div> <!--/ Top navigation bar --> | ||
+ | |||
− | |||
− | |||
<div id="sub-navigation-wrapper"> | <div id="sub-navigation-wrapper"> | ||
− | + | <!-- Sub navigation bar --> | |
− | + | <div id="sub-navigation" class="col-12-sm"> | |
− | + | ||
− | + | <!-- | |
− | + | <ul id="achievements-sub" > | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/achievements">Medal Requirements</a></li> | |
− | + | </ul> | |
+ | --> | ||
− | + | <ul id="project-sub"> <!-- Projects --> | |
− | + | <li><a href="file:///C:/Users/Mikkel/Dropbox/iGem/Wiki/index.html#" class="sub-nav-item">Description</a></li> | |
− | + | <li><a href="file:///C:/Users/Mikkel/Dropbox/iGem/Wiki/index.html" class="sub-nav-item">Toolbox</a></li> | |
− | + | ||
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/achievements" class="sub-nav-item">Acievements</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Safety</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/parts" class="sub-nav-item">Parts</a></li> | |
− | + | </ul> | |
− | + | <!-- | |
− | + | <ul id="parts-sub"> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/substrate" class="sub-nav-item">Substrate</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/products" class="sub-nav-item">Products</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/molecular_toolbox" class="sub-nav-item">Molecular Toolbox</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Interlab</a></li> | |
− | + | </ul> | |
− | + | --> | |
− | + | ||
− | + | <ul id="notebook-sub"> <!-- Wetlab --> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/substrate" class="sub-nav-item">Substrate</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/products" class="sub-nav-item">Products</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/molecular_toolbox" class="sub-nav-item">Molecular Toolbox</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Interlab</a></li> | |
− | + | <!-- | |
− | + | <li><a href="#" class="sub-nav-item">Work Space</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Safety</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Day Notes</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Protocols</a></li> | |
− | + | --> | |
− | + | </ul> | |
− | + | ||
− | + | <ul id="hardware-sub"> <!-- Compute --> | |
− | + | <li><a href="#" class="sub-nav-item">Overview</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/overview" class="sub-nav-item">Codon Optimization</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/DIY_spectrometer" class="sub-nav-item">DIY Spectrometer</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/modelling" class="sub-nav-item">Modelling</a></li> | |
− | + | </ul> | |
− | + | ||
− | + | <ul id="modeling-sub"> <!-- Team --> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/team_members" class="sub-nav-item">Team Members</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/team_building" class="sub-nav-item">Team Building</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/team_roles" class="sub-nav-item">Team Roles</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/internal_wiki" class="sub-nav-item">Internal Wiki</a></li> | |
− | + | </ul> | |
− | + | ||
− | + | <ul id="practices-sub"> <!-- Outreach --> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/collaborations" class="sub-nav-item">Collaborations</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/meetups" class="sub-nav-item">Meetups</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/online_presence" class="sub-nav-item">Online Presence</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/sponsors" class="sub-nav-item">Sponsorts</a></li> | |
− | + | <li><a href="https://2016.igem.org/Team:DTU-Denmark/practices" class="sub-nav-item">Practices</a></li> | |
− | + | </ul> | |
− | + | ||
− | + | <!--<ul id="collaborations-sub"> | |
− | + | <li><a href="#" class="sub-nav-item">Overview</a></li> | |
− | + | <li><a href="#">Sharing CRISPR</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">DTU BioBrick Tutorial</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Cooperations</a></li> | |
− | + | </ul> | |
− | + | ||
− | + | <ul id="attributions-sub"> | |
− | + | <li><a href="#" class="sub-nav-item">Team Members</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Advisors</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Team Work Attributions</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Media</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Sponsors</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Acknowledgements</a></li> | |
− | + | </ul> | |
− | + | ||
− | + | <ul id="interlab-sub"> | |
− | + | <li><a href="#" class="sub-nav-item">Results</a></li> | |
− | + | <li><a href="#" class="sub-nav-item">Protocols</a></li> | |
+ | </ul>--> | ||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
− | + | <!--/ Computer navigation --> | |
Line 799: | Line 658: | ||
var last_sub_bar = document.getElementsByClassName("active-sub") | var last_sub_bar = document.getElementsByClassName("active-sub") | ||
$(".active-sub").removeClass("active-sub"); | $(".active-sub").removeClass("active-sub"); | ||
+ | $(".hover").removeClass("hover"); | ||
} | } | ||
− | // Open sub menue | + | // Open sub menue function |
var open_sub = function(cName){ | var open_sub = function(cName){ | ||
− | + | cName = cName.split(" ")[0] | |
− | + | navig = cName + "-sub" | |
− | navig = | + | |
var current_sub_bar = document.getElementById(navig) | var current_sub_bar = document.getElementById(navig) | ||
if (current_sub_bar !== null){ | if (current_sub_bar !== null){ | ||
empty_sub() | empty_sub() | ||
+ | $("." + cName).addClass("hover"); | ||
current_sub_bar.className = "active-sub"; | current_sub_bar.className = "active-sub"; | ||
} | } | ||
} | } | ||
− | // | + | // open submenues on hover with delay |
− | $( | + | var timer; |
− | var cName = | + | var delay = 400; |
− | + | $(window).hover( function(event) { | |
+ | // on mouse in, start a timeout | ||
+ | timer = setTimeout(function(){ | ||
+ | var cName = event.target.className | ||
+ | open_sub(cName) | ||
+ | }, delay); | ||
+ | |||
+ | }, function() { | ||
+ | // on mouse out, cancel the timer | ||
+ | clearTimeout(timer); | ||
}); | }); | ||
+ | |||
// Header menue function on tuch screen | // Header menue function on tuch screen | ||
Line 824: | Line 694: | ||
$(window).bind('touchstart', function(event){ | $(window).bind('touchstart', function(event){ | ||
if (!flag) { | if (!flag) { | ||
+ | // prevents multiple clicks | ||
flag = true; | flag = true; | ||
setTimeout(function(){ flag = false; }, 100); | setTimeout(function(){ flag = false; }, 100); | ||
+ | // Find sub menue | ||
var cName = event.target.className.split(" ")[0] | var cName = event.target.className.split(" ")[0] | ||
var subName = cName + "-sub" | var subName = cName + "-sub" | ||
var subClass = $("#" + subName).attr("class"); | var subClass = $("#" + subName).attr("class"); | ||
+ | // if sub is not open it is opened. Otherwise the link is used. | ||
if(subClass !== "active-sub"){ | if(subClass !== "active-sub"){ | ||
event.preventDefault(); | event.preventDefault(); | ||
− | |||
open_sub( cName ); | open_sub( cName ); | ||
− | |||
} | } | ||
} | } | ||
Line 847: | Line 718: | ||
// Go back to current sub menue | // Go back to current sub menue | ||
− | $("div#headerWrapper"). | + | var timer_leave; |
− | + | $("div#headerWrapper").hover( function() { | |
− | show_current_sub() | + | // on mouse in, start a timeout |
+ | clearTimeout(timer_leave); | ||
+ | |||
+ | }, function() { | ||
+ | // on mouse out, cancel the timer | ||
+ | timer_leave = setTimeout(function(){ | ||
+ | empty_sub() | ||
+ | show_current_sub() | ||
+ | }, delay); | ||
}); | }); | ||
Latest revision as of 08:40, 12 August 2016