Difference between revisions of "Template:MIT/menu"

 
(45 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:MIT/style}}
 
 
 
<html>
 
<html>
<head>
+
<head>
<style>
+
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Nunito" />
#home_logo, #sideMenu { display:none; }
+
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato" />
#sideMenu, #top_title, .patrollink  {display:none;}
+
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Tahoma" />
#content { margin:5px; padding:0px; width:100%;}
+
<meta charset="utf-8">
body {background-color: #fff;}
+
<meta name="HandheldFriendly" content="True">
 +
<meta name="MobileOptimized" content="320">
 +
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1">
 +
<script src="../../js/ios-orientationchange-fix.min.js"></script>
 +
</head>
 +
 +
<style>
 +
*{
 +
  font-family: Tahoma, Nunito, Lato, !important;
 +
}
 +
 +
#content {
 +
  padding: 0% 0 0 0;
 +
  style = 'background-color: #808080';
 +
}
 +
 +
 +
 +
  b {
 +
font-family: Tahoma, Nunito, serif !important;
 +
font-weight: 700;
 +
text-align: justified !important;
 +
font-size: 18px;
 +
  }
  
/* Menu Styling */
+
  .narration_bold {font-weight: 700;
 +
font-size: 3;}
 +
 +
    .narration_bold {
 +
font-family: Tahoma, Nunito, serif
 +
!important;
 +
font-weight: 700;
 +
text-align: justified !important;
 +
font-size: 18px;}
 +
 
 +
.bold_text {
 +
font-weight: 700;
 +
}
  
    ul {
+
    h1, h2, h3, h4 {
    list-style: none;
+
  font-family: Tahoma, Lato, serif !important;
        font-size: 12px;
+
  font-size: 16px;
    }
+
  text-align: justify;
 +
  line-height: 1.5; 
 +
font-weight: bold;
 +
}
  
    nav {
+
ul, ol {
    text-align: center !important;
+
font-family: Tahoma, Nunito, serif !important;
    display: flex;
+
  vertical-align: middle !important;
        padding-top: 8px;
+
  font-size: 16px;
    align-items: center;
+
  text-align: justify;
        vertical-align: middle !important;
+
  line-height: 1.5;
    min-height: 6vH;
+
}
    background-color: #c2a593;
+
    font-family: Lato, serif;
+
body {
    position: fixed;
+
  font-size: 16px;
    width: 100%;
+
  padding: 0 0%;
    top: 2px;
+
  box-sizing: border-box;
    left: 0;
+
}
    z-index: 999;
+
    }
+
img {
 +
max-width: 100%;
 +
height: auto;
 +
}
  
    .logolink {
+
{
    display: inline-block;
+
box-sizing: border-box;
    width: 8%;
+
}
    margin-left: 50px !important;
+
    margin-top: 300px !important;
+
    margin-bottom: 10px !important;  
+
    }
+
  
    .Navlogo {
+
.bulleted_list {  
    display: inherit;
+
  list-style-type: square;
    width: 100%;
+
}
    }
+
   
+
    .nav-links {
+
    display: inline-flex;
+
    justify-content: space-around;
+
    width: 100%;
+
    }
+
  
    .nav-links am{
+
#home_logo, #sideMenu { display:none; }
    color: #fff;
+
#sideMenu, #top_title, .patrollink  {display:none;}
    text-decoration: none;
+
#content { margin:0px; padding:0px; width:100%;}
    letter-spacing: 2px;
+
body {background-color: #fff;}
    font-weight: bold;
+
    font-size: 16px;
+
    display: block;
+
    }
+
  
    /*Drop Down Menus for links at Computer Screen*/
+
/* Menu Styling */
    .dropdown am{
+
        padding: 2vh;
+
    }
+
  
    .dropdowncontent {
+
ul {
    cursor: pointer;
+
list-style: none;
    display: none;
+
font-size: 12px;
    position: absolute;
+
}
    background-color: #5e5656;
+
    min-width: 150px;
+
    z-index: 1;
+
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+
    }
+
  
    .dropdowncontent am{
+
nav {
      color: #fff;
+
text-align: center !important;
        font-size: 12px;
+
display: flex;
      text-align: left;
+
padding-top: 10px;
      padding: 10px;
+
align-items: center;
        transition: all 0.5s ease;
+
vertical-align: middle !important;
    }
+
min-height: 8vH;
 +
background-color: #9D2235;
 +
font-family: Tahoma, Lato, serif;
 +
position: fixed;
 +
width: 100%;
 +
top: 2px;
 +
left: 0;
 +
z-index: 999;
 +
}
  
    .dropdown:hover .dropdowncontent{
+
.logolink {
    display: block;
+
display: inline-block;
    }
+
width: 8%;
 +
margin-left: 50px !important;
 +
margin-top: 30px !important;
 +
margin-bottom: 0px !important;
 +
}
  
    .dropdowncontent am:hover{
+
.Navlogo {
    background-color: #8a8b8c !important;
+
display: inherit;
    }
+
width: 100%;
 +
}
 +
 +
.nav-links {
 +
display: inline-flex;
 +
justify-content: space-around;
 +
                text-decoration: none;
 +
                color: #fff;
 +
width: 100%;
 +
}
  
    /*Burger Buns*/
+
.nav-links a{
    .burger {
+
color: #fff;
    display: none;
+
text-decoration: none;
    cursor: pointer;
+
letter-spacing: 2px;
    right: 5px;
+
font-weight: bold;
    position: fixed;
+
font-size: 16px;
    }
+
display: block;
 +
}
  
    .burger div{
+
/*Drop Down Menus for links at Computer Screen*/
    width: 25px;
+
.dropdown a{
    height: 5px;
+
padding: 2vh;
    background-color: white;
+
}
    margin: 5px;
+
    transition: background-color 400ms linear;
+
    transition: all 0.3s ease;
+
    }
+
  
    @media screen {
+
.dropdowncontent {
    body {
+
cursor: pointer;
    margin: auto;
+
display: none;
    }
+
position: absolute;
    }
+
background-color: #5e5656;
 +
min-width: 150px;
 +
z-index: 1;
 +
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
 +
}
  
    /*Mobile Navigation Bar*/
+
.dropdowncontent a{
 +
color: #fff;
 +
font-size: 12px;
 +
text-align: left;
 +
padding: 10px;
 +
transition: all 0.5s ease;
 +
}
  
    @media screen and (max-width: 1080px) {
+
.dropdown:hover .dropdowncontent{
    body {
+
display: block;
    overflow-x: hidden;
+
}
    }
+
  
.logolink {
+
.dropdowncontent a:hover{
    position: relative;
+
background-color: #8a8b8c !important;
    display: block;
+
}
    width: 20%;
+
    }
+
  
.nav-links {
+
/*Burger Buns*/
position: fixed;       
+
.burger {
display: block;
+
display: none;
height: 100%;
+
cursor: pointer;
right: 0px;
+
right: 5px;
top: 10vh;
+
position: fixed;
background-color: #c2a593;
+
}
width: 30%;
+
transform: translateX(150%);
+
transition: transform 0.5s ease-in;
+
margin: inherit;
+
padding-top: 10vh;
+
z-index: -1;
+
}
+
  
.nav-links li{
+
.burger div{
opacity: 0;
+
width: 25px;
display: block;
+
height: 5px;
}
+
background-color: white;
 +
margin: 5px;
 +
transition: background-color 400ms linear;
 +
transition: all 0.3s ease;
 +
}
  
    .nav-links am{
+
@media screen {
        font-size:15px;
+
body {
    }
+
margin: auto;
 +
}
 +
}
  
.burger {
+
/*Mobile Navigation Bar*/
display: block;
+
@media screen and (max-width: 1080px) {
}
+
body {
 +
overflow-x: hidden;
 +
}
  
.dropdown {
+
.logolink {
    padding-top: 20px;
+
position: relative;
}
+
display: block;
 +
width: 20%;
 +
}
  
.dropdowncontent {
+
.nav-links {
display: none;
+
position: fixed;       
position: relative;
+
display: block;
}
+
height: 100%;
.dropdowncontent am{
+
right: 0px;
font-size: 10px;
+
top: 8vh;
padding: 10px;
+
background-color: #9D2235;
}
+
width: 30%;
}
+
transform: translateX(150%);
 +
transition: transform 0.5s ease-in;
 +
margin: inherit;
 +
padding-top: 10vh;
 +
z-index: -1;
 +
}
  
.nav-active {
+
.nav-links li{
transform: translateX(0%);
+
opacity: 0;
padding-left: 0px;
+
display: block;
}
+
}
  
 +
.nav-links a{
 +
font-size:15px;
 +
}
  
@keyframes navLinkFade {
+
.burger {
from {
+
display: block;
opacity: 0;
+
}
transform: translateX(25px);
+
}
+
to {
+
opacity: 1;
+
transform: translateX(0px);
+
}
+
}
+
  
.toggle .line1{
+
.dropdown {
background-color: #E2D264;
+
padding-top: 20px;
transform: rotate(180deg);
+
}
}
+
  
.toggle .line2{
+
.dropdowncontent {
background-color: #E73C7E;
+
display: none;
transform: rotate(180deg);
+
position: relative;
}
+
}
 +
.dropdowncontent a{
 +
font-size: 10px;
 +
padding: 10px;
 +
}
 +
}
  
.toggle .line3{
+
.nav-active {
background-color: #3E4A9E;
+
transform: translateX(0%);
transform: rotate(180deg);
+
padding-left: 0px;
}
+
}
</style>
+
</head>
+
  
    <body>
+
@keyframes navLinkFade {
<nav>
+
from {
<ul class="nav-links">
+
opacity: 0;
<li class="dropdown"> 
+
transform: translateX(25px);
            <am href="https://2021.igem.org/Team:MIT">Home </am>
+
}
</li>
+
to {
 +
opacity: 1;
 +
transform: translateX(0px);
 +
}
 +
}
  
<li class="dropdown"> 
+
.toggle .line1{
    <am> Team </am>
+
background-color: #E2D264;
        <div class="dropdowncontent">
+
transform: rotate(180deg);
                    <am href="https://2021.igem.org/Team:MIT/Team">Team </am>
+
}
                            <am href="https://2021.igem.org/Team:MIT/Attributions"> Attributions </am>
+
        </div>
+
</li>
+
  
<li class="dropdown">
+
.toggle .line2{
                    <am> Project </am>
+
background-color: #E73C7E;
    <div class="dropdowncontent">
+
transform: rotate(180deg);
                        <am class="link" href="https://2021.igem.org/Team:MIT/Description"> Description </am>
+
}
                <am href="https://2021.igem.org/Team:MIT/Design"> Design </am>
+
                <am href="https://2021.igem.org/Team:MIT/Experiments"> Experiments </am>
+
                <am href="https://2021.igem.org/Team:MIT/Model"> Model </am>
+
                <am href="https://2021.igem.org/Team:MIT/Results"> Results </am>
+
                <am href="https://2021.igem.org/Team:MIT/Engineering"> Engineering Success </am>
+
                <am href="https://2021.igem.org/Team:MIT/Contribution"> Contribution </am>
+
    </div>
+
</li>
+
  
<li class="dropdown">
+
.toggle .line3{
<am> Parts </am>
+
background-color: #3E4A9E;
    <div class="dropdowncontent">
+
transform: rotate(180deg);
            <am href="https://2021.igem.org/Team:MIT/Parts"> Parts Overview </am>
+
}
            <am href="https://2021.igem.org/Team:MIT/Basic_Part"> Basic Parts </am>
+
 
            <am href="https://2021.igem.org/Team:MIT/Composite_Part"> Composite Parts </am>
+
</style>
    </div>
+
 
    </li>
+
<body>
    <li class="dropdown">   
+
    <nav>
<am> Safety </am>
+
    <ul class="nav-links">
<div class="dropdowncontent">
+
            <li class="dropdown">
        <am href="https://2021.igem.org/Team:MIT/Safety"> Safety </am>
+
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT">Home </a>
        <am href="https://2021.igem.org/Team:MIT/Implementation"> Implementation </am>
+
            </li>
               
+
 
</div>
+
            <li class="dropdown">   
</li>
+
                <a> Team </a>
<li class="dropdown"
+
                <div class="dropdowncontent">
<am> Human Practices </am>
+
                    <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Team">Team </a>
<div class="dropdowncontent">
+
                    <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Attributions"> Attributions </a>
        <am href="https://2021.igem.org/Team:MIT/Human_Practices">Human Practices</am>
+
                </div>
        <am href="https://2021.igem.org/Team:MIT/Education"> Outreach & Engagement </am>
+
            </li>
  
 +
            <li class="dropdown">
 +
                <a> Project </a>
 +
                    <div class="dropdowncontent">
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Description"> Description </a>
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Design"> Design
 +
</a>
 +
 +
<a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Parts"> Parts </a>
 +
       
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Experiments"> Experiments </a>
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Notebook"> Notebook </a>
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Model"> Model </a>
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Results"> Results </a>
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Engineering"> Engineering Success </a>
 +
                        <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Contribution"> Contribution </a>
 +
                    </div>
 +
            </li>
 +
 +
         
 +
            <li class="dropdown"> 
 +
                    <a> Safety </a>
 +
            <div class="dropdowncontent">
 +
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Safety"> Safety </a>
 +
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Implementation"> Implementation </a>   
 +
            </div>
 +
            </li>
 +
 +
            <li class="dropdown"> 
 +
                    <a> Human Practices </a>
 +
 +
            <div class="dropdowncontent">
 +
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Human_Practices">Human Practices</a>
 
                  
 
                  
</div>
+
            </div>
</li>
+
</div>
+
  
 +
<li class="dropdown"> 
 +
                    <a> Education and Collaborations </a>
  
 +
            <div class="dropdowncontent">
 +
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Education"> Educational Module </a>
 +
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Collaborations"> Collaborations </a>
 +
                <a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Meetup"> MIT Microbiome Meetup </a>
  
    <script>
+
<a style="color: white; text-decoration: None;" href="https://2021.igem.org/Team:MIT/Partnership"> Partnership </a>
        /*Toggle Nav*/
+
             </div>
        const navSlide = () => {
+
            const burger = document.querySelector ('.burger');
+
            const nav = document.querySelector ('.nav-links');
+
             const navLinks = document.querySelectorAll('.nav-links li');
+
  
             burger.addEventListener('click', () => {
+
        </ul>
                 nav.classList.toggle('nav-active');
+
             <div class="burger">
            /*Animate Menu links*/
+
                 <div class="line1"></div>
                 navLinks.forEach((link,index) => {
+
                 <div class="line2"></div>
                 if(link.style.animation) {
+
                 <div class="line3"></div>
                    link.style.animation = '';
+
             </div>
                }
+
         </nav>
                else {
+
</div>
                    link.style.animation = `navLinkFade 0.5s ease forwards ${index / 5 + 0.05}s`;
+
</body>
                }
+
            });
+
             /*Burger Animation*/
+
            burger.classList.toggle('toggle');
+
            });
+
         }
+
    navSlide();
+
    </script>
+
    </body>
+
  
 +
<script>
 +
console.log("Menu Script Loaded");
 +
/*Toggle Nav*/
 +
const navSlide = () => {
 +
const burger = document.querySelector ('.burger');
 +
const nav = document.querySelector ('.nav-links');
 +
const navLinks = document.querySelectorAll('.nav-links li');
 +
 +
burger.addEventListener('click', () => {
 +
nav.classList.toggle('nav-active');
 +
/*Animate Menu links*/
 +
navLinks.forEach((link,index) => {
 +
if(link.style.animation) {
 +
link.style.animation = '';
 +
}
 +
else {
 +
link.style.animation = `navLinkFade 0.5s ease forwards ${index / 5 + 0.05}s`;
 +
}
 +
});
 +
/*Burger Animation*/
 +
burger.classList.toggle('toggle');
 +
});
 +
}
 +
navSlide();
 +
</script>
 
</html>
 
</html>

Latest revision as of 03:46, 22 October 2021