(46 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<head> | <head> | ||
<link href="https://2016.igem.org/Team:Imperial_College/Resources/CSS:Bootstrap?action=raw&ctype=text/css" rel="stylesheet"> | <link href="https://2016.igem.org/Team:Imperial_College/Resources/CSS:Bootstrap?action=raw&ctype=text/css" rel="stylesheet"> | ||
− | |||
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400|Roboto:400,400i" rel="stylesheet"> | <link href="https://fonts.googleapis.com/css?family=Quicksand:300,400|Roboto:400,400i" rel="stylesheet"> | ||
<link href="https://2016.igem.org/Team:Imperial_College/Resources/CSS:NEStyle?action=raw&ctype=text/css" rel="stylesheet"> | <link href="https://2016.igem.org/Team:Imperial_College/Resources/CSS:NEStyle?action=raw&ctype=text/css" rel="stylesheet"> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<style> | <style> | ||
− | |||
/********************************* DEFAULT WIKI SETTINGS ********************************/ | /********************************* DEFAULT WIKI SETTINGS ********************************/ | ||
Line 85: | Line 66: | ||
.navbar .dropdown-menu { | .navbar .dropdown-menu { | ||
margin-top: 0; | margin-top: 0; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
Line 349: | Line 133: | ||
<script> | <script> | ||
− | // This is the jquery part of your template. Try not modify any of this code since it makes your menu work. | + | // This is the jquery part of your template. |
+ | // Try not modify any of this code too much since it makes your menu work. | ||
$(document).ready(function() { | $(document).ready(function() { | ||
$("#HQ_page").attr('id',''); | $("#HQ_page").attr('id',''); | ||
− | |||
− | + | // call the functions that control the menu | |
− | + | menu_functionality(); | |
− | + | hide_show_menu(); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | //this function controls the expand and collapse buttons of the menu and changes the +/- symbols | |
− | $(" | + | function menu_functionality() { |
+ | |||
+ | //when clicking on a "menu_button", it will change the "+/-" accordingly and it will show/hide the corresponding submenu | ||
+ | $(".menu_button").click(function(){ | ||
+ | |||
+ | // add or remove the class "open" , this class holds the "-" | ||
+ | $(this).children().toggleClass("open"); | ||
+ | // show or hide the submenu | ||
+ | $(this).next('.submenu_wrapper').fadeToggle(400); | ||
+ | }); | ||
+ | |||
+ | // when the screen size is smaller than 800px, the display_menu_control button appears and will show/hide the whole menu | ||
+ | $("#display_menu_control").click(function(){ | ||
+ | $('#menu_content').fadeToggle(400); | ||
+ | }); | ||
+ | |||
+ | // call the current page highlight function | ||
+ | highlight_current_page(); | ||
} | } | ||
+ | // call the highlight current page function to show it on the menu with a different background color | ||
+ | function highlight_current_page() { | ||
+ | // select a page from the menu based on the id assigned to it and the current page name and add the class "current page" to make it change background color | ||
+ | $("#"+ wgPageName.substring(wgPageName.lastIndexOf("/")+1, wgPageName.length ) + "_page").addClass("current_page"); | ||
− | + | // now that the current_page class has been added to a menu item, make the submenu fade in | |
+ | $(".current_page").parents(".submenu_wrapper").fadeIn(400); | ||
+ | // change the +/- symbol of the corresponding menu button | ||
+ | $(".current_page").parents(".submenu_wrapper").prev().children().toggleClass("open"); | ||
+ | |||
+ | } | ||
− | |||
− | |||
− | |||
− | |||
− | + | // allow button on the black menu bar to show/hide the side menu | |
− | + | function hide_show_menu() { | |
− | + | ||
− | + | // in case you preview mode is selected, the menu is hidden for better visibility | |
− | + | if (window.location.href.indexOf("submit") >= 0) { | |
+ | $(".igem_2017_menu_wrapper").hide(); | ||
} | } | ||
− | // | + | // if the black menu bar has been loaded |
− | + | if (document.getElementById('bars_item')) { | |
− | + | ||
− | + | ||
+ | // when the "bars_item" has been clicked | ||
+ | $("#bars_item").click(function() { | ||
+ | $("#sideMenu").hide(); | ||
− | + | // show/hide the menu wrapper | |
− | + | $(".igem_2017_menu_wrapper").fadeToggle("100"); | |
− | + | }); | |
+ | } | ||
− | + | // because the black menu bars loads at a different time than the rest of the page, this function is set on a time out so it can run again in case it has not been loaded yet | |
− | + | else { | |
− | } | + | setTimeout(hide_show_menu, 15); |
+ | } | ||
+ | } | ||
}); | }); | ||
− | |||
− | |||
Line 425: | Line 228: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</div> | </div> | ||
Line 435: | Line 233: | ||
<ul class="nav navbar-nav navbar-right" style="margin-top: 15px;"> | <ul class="nav navbar-nav navbar-right" style="margin-top: 15px;"> | ||
<li class="dropdown"> | <li class="dropdown"> | ||
− | <a class="dropdown-toggle active" href="https:// | + | <a class="dropdown-toggle active" href="https://2017.igem.org/Team:UIOWA/Description">Project <span class="caret"></span></a> |
<ul class="dropdown-menu" style="left:0;"> | <ul class="dropdown-menu" style="left:0;"> | ||
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Description">Description</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/InterLab">Interlab</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Results">Results</a></li> |
− | + | ||
− | + | ||
</ul> | </ul> | ||
</li> | </li> | ||
Line 447: | Line 244: | ||
<li class="dropdown"> | <li class="dropdown"> | ||
− | <a class="dropdown-toggle active" href="https:// | + | <a class="dropdown-toggle active" href="https://2017.igem.org/Team:UIOWA/Parts">Parts <span class="caret"></span></a> |
<ul class="dropdown-menu" style="left:0;"> | <ul class="dropdown-menu" style="left:0;"> | ||
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Parts">Parts</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Basic_Part">Basic Part</a></li> |
− | + | ||
</ul> | </ul> | ||
Line 458: | Line 254: | ||
<li> | <li> | ||
− | <a class="dropdown-toggle active" href="https:// | + | <a class="dropdown-toggle active" href="https://2017.igem.org/Team:UIOWA/Safety">Safety </a></li> |
<li class="dropdown"> | <li class="dropdown"> | ||
− | <a class="dropdown-toggle active" href="https:// | + | <a class="dropdown-toggle active" href="https://2017.igem.org/Team:UIOWA/Notebook">Notebook <span class="caret"></span></a> |
<ul class="dropdown-menu" style="left:0;"> | <ul class="dropdown-menu" style="left:0;"> | ||
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Notebook">Lab book</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Experiments">Protocols</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Medals">Medal Criteria</a></li> |
− | + | ||
</ul> | </ul> | ||
</li> | </li> | ||
<li class="dropdown"> | <li class="dropdown"> | ||
− | <a class="dropdown-toggle active" href="https:// | + | <a class="dropdown-toggle active" href="https://2017.igem.org/Team:UIOWA/Human_Practices">Human Practices <span class="caret"></span></a> |
<ul class="dropdown-menu"> | <ul class="dropdown-menu"> | ||
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/HP/Silver">Human Practices - Silver</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Engagement">Public Engagement</a></li> |
− | + | <li><a href="https://2017.igem.org/Team:UIOWA/Collaborations">Collaborations</a></li> | |
− | <li><a href="https:// | + | |
</ul> | </ul> | ||
Line 483: | Line 277: | ||
<li class="dropdown"> | <li class="dropdown"> | ||
− | <a class="dropdown-toggle active" href="https:// | + | <a class="dropdown-toggle active" href="https://2017.igem.org/Team:UIOWA/Team">Team <span class="caret"></span></a> |
<ul class="dropdown-menu" style="text-align: right;"> | <ul class="dropdown-menu" style="text-align: right;"> | ||
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Team">Team</a></li> |
− | <li><a href="https:// | + | <li><a href="https://2017.igem.org/Team:UIOWA/Attributions">Attributions</a></li> |
+ | <li><a href="https://igem.org/2017_Judging_Form?team=UIOWA">Judging Form</a></li> | ||
</ul> | </ul> | ||
Line 495: | Line 290: | ||
</div> | </div> | ||
<!-- /.container-fluid --> | <!-- /.container-fluid --> | ||
+ | <div class = "clear" > | ||
+ | </div> | ||
</nav> | </nav> | ||
</body> | </body> | ||
− | + | </head> | |
</html> | </html> |
Latest revision as of 01:24, 2 November 2017