(46 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
− | < | + | <style> |
− | + | #slick-menu { | |
− | + | width: 100%; | |
− | + | list-style-type: none; | |
− | + | overflow: hidden; | |
− | + | text-align: center; | |
− | + | margin: 0; | |
− | + | padding: 0; | |
− | + | background-color: #019ac8; } | |
− | + | ||
− | + | #slick-menu > li { | |
− | + | display: inline-block; | |
− | + | margin: 0 5px; | |
− | + | padding: 5px 0; } | |
− | + | ||
− | + | #slick-menu > li > a { | |
− | + | display: block; | |
− | + | padding: 10px; | |
− | + | margin: 0; | |
− | + | color: #fff; | |
− | + | text-decoration: none; | |
− | + | font-family: calibri; | |
− | + | } | |
− | + | ||
− | + | #slick-menu > li > a:hover, #slick-menu > li > a.current { | |
− | + | font-weight: 600; | |
− | + | color: white; } | |
− | + | ||
− | + | @media only screen and (max-width: 1250px) { | |
− | + | #slick-menu { | |
− | < | + | padding-top: 20px; |
− | + | margin-bottom: 22px; | |
− | + | float: left; | |
− | + | text-align: left; | |
− | + | width: 100%; } | |
+ | |||
+ | #slick-menu { | ||
+ | padding-top: 0px; } | ||
+ | } | ||
+ | |||
+ | @media only screen and (max-width: 1250px) { | ||
+ | #slick-menu > li { | ||
+ | width: 100%; | ||
+ | padding: 7px 0; | ||
+ | margin: 0; } } | ||
+ | |||
+ | .open-nav { | ||
+ | max-height: none !important; } | ||
+ | |||
+ | .open-nav .mobile-toggle { | ||
+ | transform-origin: 25x 25px; | ||
+ | -webkit-transform: rotate(180deg); | ||
+ | transform: rotate(180deg); } | ||
+ | |||
+ | .mobile-toggle { | ||
+ | display: none; | ||
+ | float: left; | ||
+ | cursor: pointer; | ||
+ | transition: all 200ms ease-in; } | ||
+ | |||
+ | @media only screen and (max-width: 1250px) { | ||
+ | .mobile-toggle { | ||
+ | display: block; } } | ||
+ | |||
+ | .mobile-toggle span { | ||
+ | width: 30px; | ||
+ | height: 4px; | ||
+ | margin-bottom: 6px; | ||
+ | border-radius: 1000px; | ||
+ | background: #c8c8c8; | ||
+ | display: block; } | ||
+ | |||
+ | .navbar { | ||
+ | max-height: 50px; | ||
+ | overflow: hidden; | ||
+ | background-color: #019ac8; | ||
+ | -webkit-transition: all 0.3s ease-in; | ||
+ | -moz-transition: all 0.3s ease-in; | ||
+ | -ms-transition: all 0.3s ease-in; | ||
+ | -o-transition: all 0.3s ease-in; | ||
+ | transition: all 0.3s ease-in; | ||
+ | } | ||
+ | |||
+ | .navbar.landingpage { | ||
+ | position: fixed; | ||
+ | top: 16px; | ||
+ | } | ||
+ | |||
+ | .mobile-toggle img { | ||
+ | height: 20px; | ||
+ | margin: 15px | ||
+ | } | ||
+ | |||
+ | .top-fixed { | ||
+ | position: fixed; | ||
+ | top: 16px; | ||
+ | } | ||
+ | </style> | ||
+ | |||
+ | <div class="navbar </html>{{{extra-class}}}<html>"> | ||
+ | <div class="mobile-toggle"> | ||
+ | <img src="https://static.igem.org/mediawiki/2016/c/c9/T--TU_Darmstadt--zahnrad.png" | ||
+ | alt="menu" id="menu-zahnrad"/> | ||
</div> | </div> | ||
+ | <ul id="slick-menu"> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Achievements">Achievements</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Lab">Wet Lab</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Parts">Parts</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Hardware">Robotics</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Model">Modeling</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Human_Practices">Human Practices</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Collaborations">Collaborations</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Notebook">Notebook</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Results">Results</a></li> | ||
+ | <li ><a href="https://2016.igem.org/Team:TU_Darmstadt/Team">Team</a></li> | ||
+ | </ul> | ||
</div> | </div> | ||
+ | |||
+ | <script> | ||
+ | $(document).ready(function() { | ||
+ | $('.mobile-toggle').on('click', function(evt) { | ||
+ | evt.preventDefault(); | ||
+ | if ($('.navbar').hasClass('open-nav')) { | ||
+ | $('.navbar').removeClass('open-nav'); | ||
+ | } else { | ||
+ | $('.navbar').addClass('open-nav'); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | $('.navbar li a').click(function() { | ||
+ | if ($('#.navbar').hasClass('open-nav')) { | ||
+ | $('.navigation').removeClass('open-nav'); | ||
+ | $('.navbar').removeClass('open-nav'); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
<script> | <script> | ||
$(function(){ | $(function(){ | ||
− | $(' | + | $('#slick-menu a').each(function() { |
− | if ($(this).prop('href') | + | if ( (window.location.href).indexOf($(this).prop('href')) > -1) { |
$(this).addClass('current'); | $(this).addClass('current'); | ||
− | |||
− | |||
− | |||
} | } | ||
}); | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <script> | ||
+ | $(function(){ | ||
+ | if( window.location.href == 'https://2016.igem.org/Team:TU_Darmstadt') { | ||
+ | $('navbar').addClass('navbar-landingpage-fixed'); | ||
+ | } | ||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 16:01, 17 October 2016