Difference between revisions of "Template:BioMarvel"

Line 2: Line 2:
 
<head>
 
<head>
 
<meta charset="UTF-8">
 
<meta charset="UTF-8">
 +
 +
<script>
 +
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 +
 +
$(document).ready(function() {
 +
 +
$("#HQ_page").attr('id','');
 +
 +
 +
//highlight current page on the menu
 +
highlight_current_page_menu();
 +
 +
//accessing submenus
 +
$(".menu_item").click(function(){
 +
$(".submenu_control_icon", this).toggleClass("open");
 +
$(this).next(".submenu").fadeToggle(400);
 +
});
 +
 +
//mobile menu access
 +
$(".igem_2018_team_mobile_bar").click(function(){
 +
$(this).next().toggleClass("displaying_menu");
 +
});
 +
 +
});
 +
 +
 +
function highlight_current_page_menu() {
 +
 +
var page_url="https://2018.igem.org/";
 +
page_url = page_url + wgPageName;
 +
$("a[href$='"+ page_url +"']").children().addClass("current_page");
 +
 +
//if the page is in a submenu, open the submenu and make the appropiate changes
 +
if( $( ".current_page" ).hasClass( "submenu_item" )){
 +
 +
$(".current_page").parent().parent().fadeToggle(400);
 +
$(".current_page").parent().parent().prev().addClass("current_page");
 +
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open");
 +
 +
}
 +
}
 +
 +
 +
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 +
</script>
 +
 +
/***********************************************************************************/
 +
 
<style type="text/css">
 
<style type="text/css">
 
#home_logo, #sideMenu {
 
#home_logo, #sideMenu {
Line 46: Line 94:
 
width: 20%;
 
width: 20%;
 
margin-top: 10px;
 
margin-top: 10px;
}
 
 
/*************** MENU *************/
 
.mHeader{
 
width: 1280px;
 
height: 300px;
 
padding: 2% 0%;
 
margin-left: auto;
 
margin-right: auto;
 
background-color: white;
 
}
 
 
.mHeader_logo_box{
 
}
 
 
.mLogo {
 
width: 196px;
 
height: 77px;
 
float: left;
 
background: url(https://2018.igem.org/File:T--Biomarvel--Logo.png) center center no-repeat;
 
font-size: 0;
 
margin-left:2%;
 
}
 
 
#topMenu{
 
width: 100%;
 
padding: 2% 0%;
 
border-top: solid 1px skyblue;
 
margin-top: 20px;
 
}
 
#topMenu a {
 
text-decoration: none;
 
}
 
#topMenu ul {
 
list-style-type: none;
 
margin: 0px;
 
padding: 0px;
 
}
 
#topMenu ul li {
 
list-style: none;
 
color: black;
 
background-color: rgba(0,0,0,0.0);
 
float: left;
 
line-height: 30px;
 
vertical-align: middle;
 
text-align: left;
 
position: relative;
 
}
 
.menuLink, .submenuLink {
 
text-decoration: none;
 
display: block;
 
font-weight: bold;
 
}
 
.menuLink {
 
color: black;
 
font-family: sans-serif;
 
font-size: 150%;
 
}
 
 
.topMenuLi:hovor .menuLink {
 
color: #888888 !important;
 
}
 
.submenuLink {
 
color: black !important;
 
margin-top: -1px;
 
text-align: left;
 
}
 
.longLink {
 
width: 250px;
 
}
 
.submenuC {
 
position: absolute;
 
height: 0px;
 
overflow: hidden;
 
transition: height .2s;
 
font-family: sans-serif;
 
font-size: 120%;
 
}
 
.submenuC a {
 
text-decoration: none;
 
}
 
.topMenuLi:hover .submenuC {
 
height: 250px;
 
}
 
.submenuLink:hover {
 
color: #888888 !important;
 
}
 
 
.mMenu_left{
 
width: 45%;
 
float: left;
 
}
 
 
.mMenu_logo{
 
width: 10%;
 
float: left;
 
}
 
 
.mMenu_right{
 
width: 45%;
 
float: right;
 
 
}
 
}
  

Revision as of 04:05, 10 September 2018

/***********************************************************************************/