Line 155: | Line 155: | ||
/********************************* NAVBAR ********************************/ | /********************************* NAVBAR ********************************/ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
.logo{ | .logo{ | ||
Line 188: | Line 178: | ||
} | } | ||
− | + | // Navigation Variables | |
− | + | $content-width: 1000px; | |
− | + | $breakpoint: 799px; | |
− | + | $nav-height: 70px; | |
− | + | $nav-background: white; | |
− | + | $nav-font-color: #24305E; | |
+ | $link-hover-color: #7EF397; | ||
+ | $link-hover-shadow: 1px 1px #D0FADE; | ||
+ | $link-hover-color: #7EF397; | ||
+ | $sub-link-hover-color: rgb(248, 59, 122); | ||
+ | $sub-link-hover-shadow lightpink; | ||
− | . | + | // Outer navigation wrapper |
− | + | .navigation { | |
− | + | height: $nav-height; | |
− | + | background: $nav-background; | |
− | + | ||
− | + | ||
} | } | ||
− | . | + | .navigation { |
− | + | height: 70px; | |
− | + | background: white; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | + | // Container with no padding for navbar | |
− | + | .nav-container { | |
− | + | max-width: 1000px $content-width; | |
− | + | margin: 0 auto; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | + | // Navigation | |
− | padding:0; | + | nav { |
− | background-color: none; | + | float: right; |
+ | ul { | ||
+ | list-style: none; | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | li { | ||
+ | float: left; | ||
+ | position: relative; | ||
+ | a, | ||
+ | a:visited { | ||
+ | display: block; | ||
+ | padding: 0 20px; | ||
+ | line-height: $nav-height; | ||
+ | background: $nav-background; | ||
+ | color: $nav-font-color; | ||
+ | text-shadow: 1px 1px lightgrey; | ||
+ | transition:0.65s; | ||
+ | text-decoration: none; | ||
+ | &:hover { | ||
+ | text-shadow: $link-hover-shadow; | ||
+ | color: $link-hover-color; | ||
+ | } | ||
+ | &:not(:only-child):after { | ||
+ | padding-left: 4px; | ||
+ | content: ' ▾'; | ||
+ | } | ||
+ | } // Dropdown list | ||
+ | ul li { | ||
+ | min-width: 190px; | ||
+ | a { | ||
+ | padding: 15px; | ||
+ | line-height: 20px; | ||
+ | &:hover{ | ||
+ | color: $sub-link-hover-color; | ||
+ | text-shadow: $sub-link-hover-shadow; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
} | } | ||
− | .dropdown | + | // Dropdown list binds to JS toggle event |
− | + | .nav-dropdown { | |
− | + | position: absolute; | |
− | + | display: none; | |
− | + | z-index: 1; | |
− | + | box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15); | |
− | + | ||
− | + | ||
− | + | ||
} | } | ||
+ | /* Mobile navigation */ | ||
− | + | // Binds to JS Toggle | |
− | . | + | .nav-mobile { |
− | + | display: none; | |
− | + | position: absolute; | |
− | + | top: 0; | |
− | + | right: 0; | |
− | + | background: $nav-background; | |
− | + | height: $nav-height; | |
− | + | width: $nav-height; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | + | @media only screen and (max-width: 798px) { | |
− | + | // Hamburger nav visible on mobile only | |
− | + | .nav-mobile { | |
− | + | display: block; | |
+ | } | ||
+ | nav { | ||
+ | width: 100%; | ||
+ | padding: $nav-height 0 15px; | ||
+ | ul { | ||
+ | display: none; | ||
+ | li { | ||
+ | float: none; | ||
+ | a { | ||
+ | padding: 15px; | ||
+ | line-height: 20px; | ||
+ | } | ||
+ | ul li a { | ||
+ | padding-left: 30px; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | .nav-dropdown { | ||
+ | position: static; | ||
+ | } | ||
} | } | ||
− | + | @media screen and (min-width: $breakpoint) { | |
− | . | + | .nav-list { |
− | + | display: block !important; | |
− | + | } | |
} | } | ||
− | + | #nav-toggle { | |
− | + | position: absolute; | |
− | color: | + | left: 18px; |
− | + | top: 22px; | |
− | } | + | cursor: pointer; |
− | + | padding: 10px 35px 16px 0px; | |
− | . | + | span, |
− | + | span:before, | |
+ | span:after { | ||
+ | cursor: pointer; | ||
+ | border-radius: 1px; | ||
+ | height: 5px; | ||
+ | width: 35px; | ||
+ | background: $nav-font-color; | ||
+ | position: absolute; | ||
+ | display: block; | ||
+ | content: ''; | ||
+ | transition: all 300ms ease-in-out; | ||
+ | } | ||
+ | span:before { | ||
+ | top: -10px; | ||
+ | } | ||
+ | span:after { | ||
+ | bottom: -10px; | ||
+ | } | ||
+ | &.active span { | ||
+ | background-color: transparent; | ||
+ | &:before, | ||
+ | &:after { | ||
+ | top: 0; | ||
+ | } | ||
+ | &:before { | ||
+ | transform: rotate(45deg); | ||
+ | } | ||
+ | &:after { | ||
+ | transform: rotate(-45deg); | ||
+ | } | ||
+ | } | ||
} | } | ||
Line 393: | Line 451: | ||
<body> | <body> | ||
− | <div class="nav"> | + | <section class="navigation"> |
− | + | <div class="nav-container"> | |
− | + | <div class="logo"> | |
− | + | <a href="#"> <img class="pixcell" src="https://static.igem.org/mediawiki/2018/8/80/T--Imperial_College--pixcell.png"></a> | |
− | + | <a href="#"> <img class="iclogo " src="https://static.igem.org/mediawiki/2018/8/8b/T--Imperial_College--college.png"></a> | |
− | + | </div> | |
− | + | <nav> | |
− | + | <div class="nav-mobile"><a id="nav-toggle" href="#!"><span></span></a></div> | |
− | + | <ul class="nav-list"> | |
− | + | <li> | |
− | + | <a href="#">PROJECT<i class="fa fa-caret-down" aria-hidden="true"></i></a> | |
− | + | <ul class="nav-dropdown"> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Project" "="">DESCRIPTION</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Mechanisms">DESIGN</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Applications">APPLICATIONS</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Achievements">ACHIEVEMENTS</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Future">FUTURE WORK</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Brainstorming">BRAINSTORM</a> | |
− | + | </li> | |
− | + | </ul> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="#">DRY LAB<i class="fa fa-caret-down" aria-hidden="true"></i></a> | |
− | + | <ul class="nav-dropdown"> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Dryover">OVERVIEW</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Modelling">MODELLING</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Hardware">HARDWARE</a> | |
− | + | </li> | |
− | + | </ul> | |
− | + | <li> | |
− | + | <a href="#">WET LAB<i class="fa fa-caret-down" aria-hidden="true"></i></a> | |
− | + | <ul class="nav-dropdown"> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Wetover">OVERVIEW</a> | |
− | + | </li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Results">RESULTS</a></li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Experiments">EXPERIMENTS</a></li> | |
− | + | <li> | |
− | + | <a href="https://2018.igem.org/Team:Imperial_College/Protocols">PROTOCOLS</a></li> | |
− | + | <li> | |
− | + | <a href="Parts">PARTS</a> | |
+ | </li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="#">HUMAN PRACTICES<i class="fa fa-caret-down" aria-hidden="true"></i></a> | ||
+ | <ul class="nav-dropdown"> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/HP">OVERVIEW</a> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/IHP">INTEGRATED HP</a> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Communication">COMMUNICATION</a> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Outreach">OUTREACH</a> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Collaborations">COLLABORATIONS</a> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="#">PEOPLE<i class="fa fa-caret-down" aria-hidden="true"></i></a> | ||
+ | <ul class="nav-dropdown"> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Team">TEAM</a> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Attributions">ATTRIBUTIONS</a></li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Sponsors">SPONSORS</a> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Judges">FOR JUDGES</a> | ||
+ | </li> | ||
+ | <li> | ||
+ | <a href="https://2018.igem.org/Team:Imperial_College/Journal">JOURNAL</a> | ||
+ | </li> | ||
+ | </ul> | ||
+ | </nav> | ||
+ | </div> | ||
+ | </section> | ||
</body> | </body> |
Revision as of 11:21, 13 October 2018