(88 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
− | $(document).ready(function() { | + | |
+ | |||
+ | |||
+ | // When the user scrolls down 20px from the top of the document, slide down the navbar | ||
+ | // When the user scrolls to the top of the page, slide up the navbar (50px out of the top view) | ||
+ | window.onscroll = function() {scrollFunction()}; | ||
+ | |||
+ | function scrollFunction() { | ||
+ | if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { | ||
+ | document.getElementById("navbar").style.top = "18px"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | $(document).ready(function() { | ||
$("#HQ_page").attr('id',''); | $("#HQ_page").attr('id',''); | ||
Line 34: | Line 49: | ||
if( $( ".current_page" ).hasClass( "submenu_item" )){ | if( $( ".current_page" ).hasClass( "submenu_item" )){ | ||
− | $(".current_page").parent().parent().fadeToggle( | + | $(".current_page").parent().parent().fadeToggle(600); |
$(".current_page").parent().parent().prev().addClass("current_page"); | $(".current_page").parent().parent().prev().addClass("current_page"); | ||
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open"); | $(".menu_item.current_page > .submenu_control_icon").toggleClass("open"); | ||
Line 64: | Line 79: | ||
.judges-will-not-evaluate { border: 4px solid #e4dede; padding: 2% !important; width: 92%!important;} | .judges-will-not-evaluate { border: 4px solid #e4dede; padding: 2% !important; width: 92%!important;} | ||
+ | |||
+ | |||
+ | .nav_text{ | ||
+ | font-size: 18px; | ||
+ | margin-top: 10px; | ||
+ | padding-top: 35px; | ||
+ | padding-bottom: 35px; | ||
+ | } | ||
+ | |||
+ | .nav_icon { | ||
+ | padding-top: 10px; | ||
+ | padding-bottom: 5px; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | #navbar { | ||
+ | background-color: #333; /* Black background color */ | ||
+ | position: fixed; /* Make it stick/fixed */ | ||
+ | top: 19px; /* Hide the navbar 50 px outside of the top view */ | ||
+ | width: 100%; /* Full width */ | ||
+ | transition: top 0.3s; /* Transition effect when sliding down (and up) */ | ||
+ | } | ||
+ | |||
+ | /* Style the navbar links */ | ||
+ | #navbar a { | ||
+ | float: left; | ||
+ | display: block; | ||
+ | color: white; | ||
+ | text-decoration: none; | ||
+ | width: 20%; | ||
+ | text-align: center; | ||
+ | |||
+ | } | ||
+ | |||
+ | #navbar a:hover { | ||
+ | background-color: #ddd; | ||
+ | color: black; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 72: | Line 132: | ||
/*this wraps the whole of the menu*/ | /*this wraps the whole of the menu*/ | ||
.igem_2018_team_menu { | .igem_2018_team_menu { | ||
− | background-color: #acc7dc; | + | background-color: #acc7dc; |
border-left: 1px solid #c4baba; | border-left: 1px solid #c4baba; | ||
display:block; | display:block; | ||
Line 125: | Line 185: | ||
.igem_2018_team_menu .menu_item .submenu_control_icon { | .igem_2018_team_menu .menu_item .submenu_control_icon { | ||
− | color: # | + | color: #ACC7DC; |
float: left; | float: left; | ||
width: 10%; | width: 10%; | ||
Line 169: | Line 229: | ||
.igem_2018_team_menu .menu_item.current_page, | .igem_2018_team_menu .menu_item.current_page, | ||
.igem_2018_team_menu .menu_item.direct_link.current_page { | .igem_2018_team_menu .menu_item.direct_link.current_page { | ||
− | background-color:# | + | background-color:#000000; |
} | } | ||
Line 521: | Line 581: | ||
+ | <div id="navbar"> | ||
− | |||
− | + | ||
− | + | <a href="https://2018.igem.org/Team:Melbourne" class="nav_item, nav_text">Home</a> | |
− | + | <a href="https://2018.igem.org/Team:Melbourne/Team" class="nav_item, nav_text">Team</a> | |
+ | <a href="https://igem.org/2018_Judging_Form?team=Melbourne" class="nav_item, nav_icon"> | ||
+ | <img src="http://www.ampc.ms.unimelb.edu.au/srg/index_files/UOM.png" width="115px", height="95px"> | ||
+ | </a> | ||
+ | <a href="https://2018.igem.org/Team:Melbourne/Project" class="nav_item, nav_text">Project</a> | ||
+ | <a href="https://2018.igem.org/Team:Melbourne/Experiment" class="nav_item, nav_text">Experiment</a> | ||
− | |||
− | |||
− | |||
</div> | </div> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 797: | Line 603: | ||
<!--- Content of the page ---> | <!--- Content of the page ---> | ||
<!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 13:15, 17 October 2018