KevinVergara (Talk | contribs) |
KevinVergara (Talk | contribs) |
||
Line 321: | Line 321: | ||
</style> | </style> | ||
+ | |||
+ | <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> | ||
+ | </head> | ||
+ | |||
+ | |||
+ | |||
+ | <body> | ||
+ | <nav class="navbar navbar-default navbar-fixed-top" style=" padding-top: 20px;"> | ||
+ | <div class="container-fluid"> | ||
+ | <div class="navbar-header"> | ||
+ | |||
+ | <a class="navbar-logo" href="https://2016.igem.org/Team:Imperial_College"> | ||
+ | <image class="img-responsive" src="https://static.igem.org/mediawiki/2016/2/2a/T--Imperial_College--Logo.png" height="80" width="80"> | ||
+ | </a> | ||
+ | |||
+ | |||
+ | </div> | ||
+ | <div class="navbar-header" style="padding-top: 15px; padding-left: 15px;"> | ||
+ | <a class="navbar-logo" href="https://2016.igem.org/Team:Imperial_College"> | ||
+ | <image class="img-responsive" src="https://static.igem.org/mediawiki/2016/1/1a/T--Imperial_College--Imperial_Logo.png" height="120" width="120"> | ||
+ | </a> | ||
+ | </div> | ||
+ | |||
+ | <div id="navbar" class="navbar-collapse collapse"> | ||
+ | <ul class="nav navbar-nav navbar-right" style="margin-top: 15px;"> | ||
+ | <li class="dropdown"> | ||
+ | <a class="dropdown-toggle active" href="https://2016.igem.org/Team:Imperial_College/Description">Project <span class="caret"></span></a> | ||
+ | <ul class="dropdown-menu" style="left:0;"> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Description">Description</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Results">Results</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Proof">Proof</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Basic_Part">Basic Parts</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Composite_Part">Composite Parts</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | |||
+ | <li class="dropdown"> | ||
+ | <a class="dropdown-toggle active" href="https://2016.igem.org/Team:Imperial_College/Model">Modelling <span class="caret"></span></a> | ||
+ | <ul class="dropdown-menu" style="left:0;"> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Model">Overview</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/SingleCell">Single Cell Model</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/GRO">Population Model</a></li> | ||
+ | |||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | |||
+ | <li> | ||
+ | <a class="dropdown-toggle active" href="https://2016.igem.org/Team:Imperial_College/Software">Software Tools </a></li> | ||
+ | |||
+ | |||
+ | <li class="dropdown"> | ||
+ | <a class="dropdown-toggle active" href="https://2016.igem.org/Team:Imperial_College/Notebook">Notebook <span class="caret"></span></a> | ||
+ | <ul class="dropdown-menu" style="left:0;"> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Notebook">Lab book</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Experiments">Protocols</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Medals">Medal Criteria</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/BrainStorm">Brainstorm</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | <li class="dropdown"> | ||
+ | <a class="dropdown-toggle active" href="https://2016.igem.org/Team:Imperial_College/Human_Practices">Human Practices <span class="caret"></span></a> | ||
+ | <ul class="dropdown-menu"> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Human_Practices">Human Practices</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Integrated_Practices">Integrated Practices</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Engagement">Public Engagement</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Collaborations">Collaborations</a></li> | ||
+ | |||
+ | </ul> | ||
+ | </li> | ||
+ | |||
+ | <li class="dropdown"> | ||
+ | <a class="dropdown-toggle active" href="https://2016.igem.org/Team:Imperial_College/Team">Team <span class="caret"></span></a> | ||
+ | <ul class="dropdown-menu" style="text-align: right;"> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Team">Team</a></li> | ||
+ | <li><a href="https://2016.igem.org/Team:Imperial_College/Attributions">Attributions</a></li> | ||
+ | |||
+ | </ul> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | <!-- /.navbar-collapse --> | ||
+ | </div> | ||
+ | <!-- /.container-fluid --> | ||
+ | </nav> | ||
+ | </body> | ||
+ | |||
</head> | </head> | ||
</html> | </html> |
Revision as of 01:37, 16 October 2017