Almironeto (Talk | contribs) |
Almironeto (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
<html> | <html> | ||
<style> | <style> | ||
+ | .hamburger-menu { | ||
+ | display: -webkit-box; | ||
+ | display: -ms-flexbox; | ||
+ | display: flex; | ||
+ | -webkit-box-orient: vertical; | ||
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-flow: column wrap; | ||
+ | flex-flow: column wrap; | ||
+ | -webkit-box-pack: justify; | ||
+ | -ms-flex-pack: justify; | ||
+ | justify-content: space-between; | ||
+ | height: 31px; | ||
+ | width: 36px; | ||
+ | cursor: pointer; | ||
+ | left: 96.1%; | ||
+ | top: 3%; | ||
+ | position: absolute; | ||
+ | z-index: 1000; | ||
+ | } | ||
− | + | .hamburger-menu .top { | |
+ | -webkit-transform: rotate(0deg); | ||
+ | transform: rotate(0deg); | ||
+ | } | ||
+ | .hamburger-menu .middle { | ||
+ | opacity: 100%; | ||
+ | } | ||
− | . | + | .hamburger-menu .bottom { |
+ | -webkit-transform: rotate(0deg); | ||
+ | transform: rotate(0deg); | ||
+ | } | ||
+ | |||
+ | .hamburger-menu .bar { | ||
+ | height: 4px; | ||
+ | background: black; | ||
+ | border-radius: 5px; | ||
+ | margin: 2.5px 0px; | ||
+ | -webkit-transform-origin: left; | ||
+ | transform-origin: left; | ||
+ | -webkit-transition: all 0.5s; | ||
+ | transition: all 0.5s; | ||
+ | } | ||
+ | |||
+ | .sidenav { | ||
+ | height: 100%; | ||
+ | /* 100% Full-height */ | ||
+ | width: 0; | ||
+ | /* 0 width - change this with JavaScript */ | ||
+ | position: fixed; | ||
+ | /* Stay in place */ | ||
+ | z-index: 1; | ||
+ | /* Stay on top */ | ||
+ | top: 0; | ||
+ | /* Stay at the top */ | ||
+ | right: 0; | ||
+ | background-color: #C3D6CA; | ||
+ | padding-top: 5%; | ||
+ | /* Place content 60px from the top */ | ||
+ | -webkit-transition: 0.5s; | ||
+ | transition: 0.5s; | ||
+ | /* 0.5 second transition effect to slide in the sidenav */ | ||
+ | } | ||
+ | |||
+ | .sidenav .sidenav-content { | ||
+ | height: 85%; | ||
+ | display: none; | ||
+ | -webkit-box-orient: vertical; | ||
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-direction: column; | ||
+ | flex-direction: column; | ||
+ | gap: 9px; | ||
+ | } | ||
+ | |||
+ | .sidenav .sidenav-content .sidenav-item { | ||
display: -webkit-box; | display: -webkit-box; | ||
display: -ms-flexbox; | display: -ms-flexbox; | ||
display: flex; | display: flex; | ||
− | + | font-family: Roboto; | |
− | -webkit- | + | text-transform: uppercase; |
− | + | text-decoration: none; | |
+ | font-size: 2vh; | ||
+ | color: #000000; | ||
+ | -webkit-transition: 0.3s; | ||
+ | transition: 0.3s; | ||
+ | -webkit-writing-mode: vertical-rl; | ||
+ | -ms-writing-mode: tb-rl; | ||
+ | writing-mode: vertical-rl; | ||
+ | font-weight: bold; | ||
+ | cursor: pointer; | ||
width: 100%; | width: 100%; | ||
+ | -webkit-box-align: center; | ||
+ | -ms-flex-align: center; | ||
+ | align-items: center; | ||
+ | -webkit-box-pack: center; | ||
+ | -ms-flex-pack: center; | ||
+ | justify-content: center; | ||
+ | -ms-flex-preferred-size: 0; | ||
+ | flex-basis: 0; | ||
+ | -webkit-box-flex: 1; | ||
+ | -ms-flex-positive: 1; | ||
+ | flex-grow: 1; | ||
} | } | ||
− | . | + | .sidenav .sidenav-content .sidenav-item:hover { |
− | + | background-color: #FF5875; | |
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | . | + | .subpages a { |
− | text-decoration: none | + | font-family: Roboto; |
− | font- | + | text-decoration: none; |
− | color: # | + | font-size: 1.2rem; |
− | + | color: #000000; | |
− | font- | + | cursor: pointer; |
− | margin- | + | font-weight: bold; |
− | + | margin-left: 60px; | |
+ | border-bottom: 3px solid #000000; | ||
+ | width: 70%; | ||
+ | -webkit-transition: all 0.25s linear; | ||
+ | transition: all 0.25s linear; | ||
} | } | ||
− | . | + | .subpages a:before { |
− | color: # | + | content: ""; |
+ | display: block; | ||
+ | width: 70%; | ||
+ | height: 3px; | ||
+ | background-color: #ffffff; | ||
+ | position: absolute; | ||
+ | left: 60px; | ||
+ | margin-top: 19px; | ||
+ | -webkit-transform-origin: left; | ||
+ | transform-origin: left; | ||
+ | -webkit-transform: scale(0); | ||
+ | transform: scale(0); | ||
+ | -webkit-transition: 0.25s linear; | ||
+ | transition: 0.25s linear; | ||
+ | /* will-change: transform; */ | ||
} | } | ||
− | + | .subpages a:hover:before { | |
+ | -webkit-transform: scale(1); | ||
+ | transform: scale(1); | ||
+ | } | ||
+ | |||
+ | .subpages a:hover { | ||
+ | color: #ffffff; | ||
+ | } | ||
+ | |||
+ | .project-subpages { | ||
+ | display: none; | ||
+ | -ms-flex-pack: distribute; | ||
+ | justify-content: space-around; | ||
+ | -webkit-writing-mode: horizontal-tb; | ||
+ | -ms-writing-mode: lr-tb; | ||
+ | writing-mode: horizontal-tb; | ||
+ | -webkit-box-orient: vertical; | ||
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-direction: column; | ||
+ | flex-direction: column; | ||
+ | position: absolute; | ||
+ | z-index: 9999; | ||
+ | background: #FF5875; | ||
+ | width: 30rem; | ||
+ | height: 85%; | ||
+ | top: 0px; | ||
+ | right: 100%; | ||
+ | font-family: Roboto; | ||
+ | text-decoration: none; | ||
+ | font-size: 1rem; | ||
+ | color: #000000; | ||
+ | cursor: pointer; | ||
+ | font-weight: bold; | ||
+ | } | ||
+ | |||
+ | .project-item:hover .project-subpages { | ||
display: -webkit-box; | display: -webkit-box; | ||
display: -ms-flexbox; | display: -ms-flexbox; | ||
display: flex; | display: flex; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | .labs-subpages { | |
− | display: - | + | display: none; |
− | + | -ms-flex-pack: distribute; | |
− | + | justify-content: space-around; | |
− | + | -webkit-writing-mode: horizontal-tb; | |
− | -webkit-box- | + | -ms-writing-mode: lr-tb; |
− | -ms-flex- | + | writing-mode: horizontal-tb; |
− | + | -webkit-box-orient: vertical; | |
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-direction: column; | ||
+ | flex-direction: column; | ||
+ | position: absolute; | ||
+ | z-index: 9999; | ||
+ | background: #FF5875; | ||
+ | width: 30rem; | ||
+ | height: 85%; | ||
+ | top: 0px; | ||
+ | right: 77px; | ||
+ | font-family: Roboto; | ||
+ | text-decoration: none; | ||
+ | font-size: 1rem; | ||
+ | color: #000000; | ||
+ | cursor: pointer; | ||
+ | font-weight: bold; | ||
} | } | ||
− | + | .lab-item:hover .labs-subpages { | |
− | + | display: -webkit-box; | |
− | + | display: -ms-flexbox; | |
− | + | display: flex; | |
− | text-decoration: none | + | } |
− | font- | + | |
+ | .software-subpages { | ||
+ | display: none; | ||
+ | -ms-flex-pack: distribute; | ||
+ | justify-content: space-around; | ||
+ | -webkit-writing-mode: horizontal-tb; | ||
+ | -ms-writing-mode: lr-tb; | ||
+ | writing-mode: horizontal-tb; | ||
+ | -webkit-box-orient: vertical; | ||
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-direction: column; | ||
+ | flex-direction: column; | ||
+ | position: absolute; | ||
+ | z-index: 9999; | ||
+ | background: #FF5875; | ||
+ | width: 30rem; | ||
+ | height: 85%; | ||
+ | top: 0px; | ||
+ | right: 77px; | ||
+ | font-family: Roboto; | ||
+ | text-decoration: none; | ||
+ | font-size: 1rem; | ||
+ | color: #000000; | ||
+ | cursor: pointer; | ||
font-weight: bold; | font-weight: bold; | ||
} | } | ||
− | + | .software-item:hover .software-subpages { | |
+ | display: -webkit-box; | ||
+ | display: -ms-flexbox; | ||
+ | display: flex; | ||
+ | } | ||
− | + | .hardware-subpages { | |
+ | display: none; | ||
+ | -ms-flex-pack: distribute; | ||
+ | justify-content: space-around; | ||
+ | -webkit-writing-mode: horizontal-tb; | ||
+ | -ms-writing-mode: lr-tb; | ||
+ | writing-mode: horizontal-tb; | ||
+ | -webkit-box-orient: vertical; | ||
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-direction: column; | ||
+ | flex-direction: column; | ||
+ | position: absolute; | ||
+ | z-index: 9999; | ||
+ | background: #FF5875; | ||
+ | width: 30rem; | ||
+ | height: 85%; | ||
+ | top: 0px; | ||
+ | right: 77px; | ||
+ | font-family: Roboto; | ||
+ | text-decoration: none; | ||
+ | font-size: 1rem; | ||
+ | color: #000000; | ||
+ | cursor: pointer; | ||
+ | font-weight: bold; | ||
+ | } | ||
− | + | .hardware-item:hover .hardware-subpages { | |
− | + | display: -webkit-box; | |
+ | display: -ms-flexbox; | ||
+ | display: flex; | ||
+ | } | ||
− | + | .hp-subpages { | |
− | + | display: none; | |
− | + | -ms-flex-pack: distribute; | |
− | + | justify-content: space-around; | |
− | + | -webkit-writing-mode: horizontal-tb; | |
− | + | -ms-writing-mode: lr-tb; | |
− | + | writing-mode: horizontal-tb; | |
− | + | -webkit-box-orient: vertical; | |
− | + | -webkit-box-direction: normal; | |
− | + | -ms-flex-direction: column; | |
− | + | flex-direction: column; | |
− | + | position: absolute; | |
− | + | z-index: 9999; | |
+ | background: #FF5875; | ||
+ | width: 30rem; | ||
+ | height: 85%; | ||
+ | top: 0px; | ||
+ | right: 77px; | ||
+ | font-family: Roboto; | ||
+ | text-decoration: none; | ||
+ | font-size: 1rem; | ||
+ | color: #000000; | ||
+ | cursor: pointer; | ||
+ | font-weight: bold; | ||
+ | } | ||
− | + | .hp-item:hover .hp-subpages { | |
+ | display: -webkit-box; | ||
+ | display: -ms-flexbox; | ||
+ | display: flex; | ||
+ | } | ||
+ | |||
+ | .team-subpages { | ||
+ | display: none; | ||
+ | -ms-flex-pack: distribute; | ||
+ | justify-content: space-around; | ||
+ | -webkit-writing-mode: horizontal-tb; | ||
+ | -ms-writing-mode: lr-tb; | ||
+ | writing-mode: horizontal-tb; | ||
+ | -webkit-box-orient: vertical; | ||
+ | -webkit-box-direction: normal; | ||
+ | -ms-flex-direction: column; | ||
+ | flex-direction: column; | ||
+ | position: absolute; | ||
+ | z-index: 9999; | ||
+ | background: #FF5875; | ||
+ | width: 30rem; | ||
+ | height: 85%; | ||
+ | top: 0px; | ||
+ | right: 77px; | ||
+ | font-family: Roboto; | ||
+ | text-decoration: none; | ||
+ | font-size: 1rem; | ||
+ | color: #000000; | ||
+ | cursor: pointer; | ||
+ | font-weight: bold; | ||
+ | } | ||
+ | |||
+ | .team-item:hover .team-subpages { | ||
+ | display: -webkit-box; | ||
+ | display: -ms-flexbox; | ||
+ | display: flex; | ||
+ | } | ||
+ | |||
+ | </style> | ||
+ | |||
+ | |||
+ | <!--#SIDE-NAVIGATION-MENU---------------------------------------------> | ||
+ | <body> | ||
+ | <div class="hamburger-menu"> | ||
+ | <div class="bar top"></div> | ||
+ | <div class="bar middle"></div> | ||
+ | <div class="bar bottom"></div> | ||
</div> | </div> | ||
− | </html> | + | <div id="mySidenav" class="sidenav"> |
+ | <div class="sidenav-content"> | ||
+ | <div class="sidenav-item project-item">Project | ||
+ | <div class="subpages project-subpages"> | ||
+ | <a href="#">Description</a> | ||
+ | <a href="#">Engineering</a> | ||
+ | <a href="#">Model</a> | ||
+ | <a href="#">Contribution</a> | ||
+ | <a href="#">Proof of Concept</a> | ||
+ | <a href="#">Proposed Implementation</a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="sidenav-item software-item">Software | ||
+ | <div class="subpages software-subpages"> | ||
+ | <a href="#">subpage</a> | ||
+ | <a href="#">subpage</a> | ||
+ | <a href="#">subpage</a> | ||
+ | <a href="#">subpage</a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="sidenav-item lab-item">Labs | ||
+ | <div class="subpages labs-subpages"> | ||
+ | <a href="#">Design</a> | ||
+ | <a href="#">Results</a> | ||
+ | <a href="#">Protocols</a> | ||
+ | <a href="#">Notebook</a> | ||
+ | <a href="#">Safety</a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="sidenav-item hardware-item">Hardware | ||
+ | <div class="subpages hardware-subpages"> | ||
+ | <a href="#">subpage</a> | ||
+ | <a href="#">subpage</a> | ||
+ | <a href="#">subpage</a> | ||
+ | <a href="#">subpage</a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="sidenav-item hp-item">HP | ||
+ | <div class="subpages hp-subpages"> | ||
+ | <a href="#">Main/General</a> | ||
+ | <a href="#">Integrated Human Practices</a> | ||
+ | <a href="#">Education & Communication</a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="sidenav-item team-item">Team | ||
+ | <div class="subpages team-subpages"> | ||
+ | <a href="#">About us</a> | ||
+ | <a href="#">Inclusivity</a> | ||
+ | <a href="#">Collaborations</a> | ||
+ | <a href="#">Sponsors</a> | ||
+ | <a href="#">Partnership</a> | ||
+ | <a href="#">Attributions</a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="sidenav-item">Awards</div> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <script> | ||
+ | //Open and Closing side navigation menu | ||
+ | function open_close_nav(){ | ||
+ | //When open or closed, change width and animate hamburguer menu | ||
+ | if (document.querySelector(".sidenav").style.width === "0px"){ | ||
+ | //hamburger animation | ||
+ | document.querySelector(".top").style.transform = ("rotate(39.55deg)") | ||
+ | document.querySelector(".middle").style.opacity = "0" | ||
+ | document.querySelector(".bottom").style.transform = ("rotate(-38deg)") | ||
+ | //side menu width | ||
+ | document.querySelector(".sidenav").style.width = "5.9vw" | ||
+ | document.querySelector(".sidenav-content").style.display = "flex" | ||
+ | } | ||
+ | else{ | ||
+ | //hamburger animation | ||
+ | document.querySelector(".top").style.transform = ("rotate(0deg)") | ||
+ | document.querySelector(".middle").style.opacity = "100" | ||
+ | document.querySelector(".bottom").style.transform = ("rotate(0deg)") | ||
+ | //side menu width | ||
+ | document.querySelector(".sidenav").style.width = "0" | ||
+ | document.querySelector(".sidenav-content").style.display = "none" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | document.querySelector(".sidenav").style.width = "0px" | ||
+ | document.querySelector(".hamburger-menu").onclick = open_close_nav; | ||
+ | </script> | ||
+ | </body> | ||
+ | </html> |
Revision as of 12:28, 21 October 2021