(One intermediate revision by the same user not shown) | |||
Line 412: | Line 412: | ||
.highlight {padding:15px 5px;} | .highlight {padding:15px 5px;} | ||
} | } | ||
− | + | */ | |
</style> | </style> | ||
+ | |||
+ | <!--- THIS IS WHERE THE HTML BEGINS ---> | ||
+ | |||
+ | |||
+ | <!-- This tells the browser that your page is responsive --> | ||
+ | |||
+ | <head> | ||
+ | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
+ | </head> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div class="menu_wrapper" > | ||
+ | |||
+ | |||
+ | <div class="collapsable_menu_control"> MENU ▤ </div> | ||
+ | |||
+ | <ul id="accordion" class="accordion"> | ||
+ | |||
+ | <li class="menu_item"> <a href="https://2016.igem.org/Team:Denver_Biolabs">HOME </a> </li> | ||
+ | |||
+ | |||
+ | <li class="menu_item"> <div class="icon plus"></div> TEAM | ||
+ | <ul class="submenu"> | ||
+ | <li> <a href=" https://2016.igem.org/Team:Denver_Biolabs/Team"> Team </a> </li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Collaborations">★ Collaborations </a> </li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | <li class="menu_item"> <div class="icon plus"></div> PROJECT | ||
+ | <ul class="submenu"> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Description"> ★ Description </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Design"> ★ Design </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Experiments"> Experiments </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Proof"> ★ Proof of Concept </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Demonstrate"> ★ Demonstrate </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Results"> Results </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Notebook"> Notebook </a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | <li class="menu_item"> <div class="icon plus"></div> PARTS | ||
+ | <ul class="submenu"> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Parts">Parts </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Basic_Part"> ★ Basic Parts </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Composite_Part"> ★ Composite Parts </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Part_Collection"> ★ Part Collection </a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | |||
+ | <li class="menu_item"> <a href="https://2016.igem.org/Team:Denver_Biolabs/Safety"> SAFETY </a> </li> | ||
+ | |||
+ | |||
+ | <li class="menu_item"> <a href="https://2016.igem.org/Team:Denver_Biolabs/Attributions">★ ATTRIBUTIONS </a></li> | ||
+ | |||
+ | |||
+ | <li class="menu_item"> <div class="icon plus"></div> HUMAN PRACTICES | ||
+ | <ul class="submenu"> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Human_Practices"> Human Practices </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/HP/Silver">★ Silver </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/HP/Gold">★ Gold </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Integrated_Practices"> ★ Integrated Practices </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Engagement">★ Engagement </a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | |||
+ | <li class="menu_item"> <div class="icon plus"></div> AWARDS | ||
+ | <ul class="submenu"> | ||
+ | <li><a href="https://2016.igem.org/Team:Denver_Biolabs/Entrepreneurship"> ★ Entrepreneurship </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Hardware"> ★ Hardware </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Software">★ Software </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Measurement">★ Measurement </a></li> | ||
+ | <li> <a href="https://2016.igem.org/Team:Denver_Biolabs/Model">★ Model </a></li> | ||
+ | |||
+ | </ul> | ||
+ | </li> | ||
+ | </ul> | ||
+ | |||
+ | </div> | ||
+ | |||
+ | <div class="content_wrapper"> | ||
+ | |||
+ | <h1 id="team_name"> </h1> | ||
+ | <h4 id="page_name"> </h4> | ||
+ | |||
+ | |||
+ | <script> | ||
+ | |||
+ | // This is the jquery part of your template. Try not modify any of this code since it makes your menu work. | ||
+ | |||
+ | $(document).ready(function() { | ||
+ | |||
+ | $("#HQ_page").attr('id',''); | ||
+ | |||
+ | |||
+ | if ( wgPageName.substring( 0, 8) == "Template") { // if the page is a template it displays the full name in a single line | ||
+ | $("#team_name").html( wgPageName ); | ||
+ | } | ||
+ | |||
+ | else if ( ( (wgPageName.match(/\//g) || []).length ) == 0 ) { // if it is the home page , just print the team's name | ||
+ | $("#team_name").html( wgPageName.substring( 5, wgPageName.length ) ); | ||
+ | } | ||
+ | |||
+ | else { | ||
+ | // this adds the team's name as an h1 | ||
+ | $("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/") ) ); | ||
+ | |||
+ | // this adds the page's title as an h4 | ||
+ | $("#page_name").html ( ( wgPageName.substring( wgPageName.indexOf("/") + 1, wgPageName.length ) ).replace( /\/|_/g , " ") ); | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | $('#accordion').find('.menu_item').click(function(){ | ||
+ | |||
+ | //Expand or collapse this panel | ||
+ | submenu = $(this).find('.submenu'); | ||
+ | submenu.toggle(); | ||
+ | |||
+ | icon = $(this).find('.icon'); | ||
+ | |||
+ | if ( !$( submenu ).is(':visible') ) { | ||
+ | icon.removeClass("less").addClass("plus"); | ||
+ | } | ||
+ | else { | ||
+ | icon.removeClass("plus").addClass("less"); | ||
+ | } | ||
+ | |||
+ | //Hide the other panels | ||
+ | $(".submenu").not(submenu).hide(); | ||
+ | $(".icon").not(icon).removeClass("less").addClass("plus"); | ||
+ | }); | ||
+ | |||
+ | |||
+ | $(".collapsable_menu_control").click(function() { | ||
+ | $(".menu_item").toggle(); | ||
+ | }); | ||
+ | |||
+ | $( window ).resize(function() { | ||
+ | $(".menu_item").show(); | ||
+ | }); | ||
+ | |||
+ | |||
+ | }); | ||
+ | |||
+ | </script> |
Latest revision as of 22:16, 11 September 2016