mobile menu fixes
This commit is contained in:
parent
7f1d17ee09
commit
eee51de682
3 changed files with 62 additions and 15 deletions
|
|
@ -4,10 +4,15 @@ import './stimulus_bootstrap.js';
|
||||||
const mobileMenu = () => {
|
const mobileMenu = () => {
|
||||||
const icon = document.querySelector('.icon-menu');
|
const icon = document.querySelector('.icon-menu');
|
||||||
const menu = document.querySelector('.front-menu');
|
const menu = document.querySelector('.front-menu');
|
||||||
|
const header = document.querySelector('header');
|
||||||
|
const body = document.querySelector('body');
|
||||||
|
|
||||||
|
|
||||||
icon.addEventListener('click', (event) => {
|
icon.addEventListener('click', (event) => {
|
||||||
icon.classList.toggle('open');
|
icon.classList.toggle('open');
|
||||||
menu.classList.toggle('open');
|
menu.classList.toggle('open');
|
||||||
|
header.classList.toggle('open');
|
||||||
|
body.classList.toggle('menu-open');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.home header nav .icon.icon-menu.open {
|
.home header nav .icon.icon-menu.open {
|
||||||
right: calc(33.3333333333% + 1rem);
|
right: 200px;
|
||||||
}
|
}
|
||||||
.home header nav .front-menu {
|
.home header nav .front-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -72,9 +72,10 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
transition: right 200ms ease;
|
transition: right 200ms ease;
|
||||||
|
background-color: #d7b94c;
|
||||||
}
|
}
|
||||||
.home header nav .front-menu.open {
|
.home header nav .front-menu.open {
|
||||||
right: 1rem;
|
right: 0;
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 600px) {
|
@media screen and (min-width: 600px) {
|
||||||
.home header nav .front-menu {
|
.home header nav .front-menu {
|
||||||
|
|
@ -82,19 +83,29 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
top: unset;
|
top: unset;
|
||||||
right: unset;
|
right: unset;
|
||||||
|
background-color: unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.home header nav .front-menu {
|
.home header nav .front-menu {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
.home header nav .front-menu li {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
.home header nav .front-menu li a {
|
.home header nav .front-menu li a {
|
||||||
display: block;
|
display: block;
|
||||||
font-family: AtomicAge-Regular;
|
font-family: AtomicAge-Regular;
|
||||||
color: #d7b94c;
|
color: #FBFCFF;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
.home header nav .front-menu li a {
|
||||||
|
color: #d7b94c;
|
||||||
|
}
|
||||||
|
}
|
||||||
.home header nav .front-menu li a:hover {
|
.home header nav .front-menu li a:hover {
|
||||||
border-bottom: 2px solid #d7b94c;
|
border-bottom: 2px solid #d7b94c;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
@ -119,9 +130,14 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
.home #root.v1 .top {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
.home #root.v1 .top .computer {
|
.home #root.v1 .top .computer {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
|
@ -132,10 +148,16 @@
|
||||||
border: 2rem solid #a6a695;
|
border: 2rem solid #a6a695;
|
||||||
padding: 1rem 1rem;
|
padding: 1rem 1rem;
|
||||||
box-shadow: 0 0 5px 10px rgba(29, 31, 32, 0.45);
|
box-shadow: 0 0 5px 10px rgba(29, 31, 32, 0.45);
|
||||||
|
margin-top: 5rem;
|
||||||
|
}
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
.home #root.v1 .top .computer {
|
||||||
|
margin-top: -2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.home #root.v1 .top .computer .heading {
|
.home #root.v1 .top .computer .heading {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1rem;
|
font-size: 0.85rem;
|
||||||
font-family: Montserrat-Light;
|
font-family: Montserrat-Light;
|
||||||
color: #d7b94c;
|
color: #d7b94c;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -178,7 +200,7 @@
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: showText 0.1s forwards;
|
animation: showText 0.1s forwards;
|
||||||
animation-delay: 1s;
|
animation-delay: 1s;
|
||||||
font-size: 1rem;
|
font-size: 0.95rem;
|
||||||
color: #d7b94c;
|
color: #d7b94c;
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 600px) {
|
@media screen and (min-width: 600px) {
|
||||||
|
|
@ -221,7 +243,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.home #root.v1 .top .computer #outro .menu a {
|
.home #root.v1 .top .computer #outro .menu a {
|
||||||
font-size: 1rem;
|
font-size: 0.95rem;
|
||||||
color: #d7b94c;
|
color: #d7b94c;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.open {
|
&.open {
|
||||||
right: calc(1/3 * 100% + 1rem);
|
right: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -84,9 +84,11 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
transition: right 200ms ease;
|
transition: right 200ms ease;
|
||||||
|
background-color: colors.$primaryYellow;
|
||||||
|
|
||||||
|
|
||||||
&.open {
|
&.open {
|
||||||
right: 1rem;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 600px) {
|
@media screen and (min-width: 600px) {
|
||||||
|
|
@ -94,19 +96,28 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
top: unset;
|
top: unset;
|
||||||
right: unset;
|
right: unset;
|
||||||
|
background-color: unset;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 10px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: block;
|
display: block;
|
||||||
font-family: AtomicAge-Regular;
|
font-family: AtomicAge-Regular;
|
||||||
color: colors.$primaryYellow;
|
color: colors.$primaryWhite;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
|
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
color: colors.$primaryYellow;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-bottom: 2px solid colors.$primaryYellow;
|
border-bottom: 2px solid colors.$primaryYellow;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
@ -140,9 +151,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.computer {
|
.computer {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
|
@ -152,12 +167,17 @@
|
||||||
background-color: colors.$primaryBlack;
|
background-color: colors.$primaryBlack;
|
||||||
border: 2rem solid colors.$computerBorder;
|
border: 2rem solid colors.$computerBorder;
|
||||||
padding: 1rem 1rem;
|
padding: 1rem 1rem;
|
||||||
|
|
||||||
box-shadow: 0 0 5px 10px rgba(29, 31, 32, 0.45);
|
box-shadow: 0 0 5px 10px rgba(29, 31, 32, 0.45);
|
||||||
|
|
||||||
|
margin-top: 5rem;
|
||||||
|
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
margin-top: -2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1rem;
|
font-size: 0.85rem;
|
||||||
font-family: Montserrat-Light;
|
font-family: Montserrat-Light;
|
||||||
color: colors.$primaryYellow;
|
color: colors.$primaryYellow;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -206,7 +226,7 @@
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: showText 0.1s forwards;
|
animation: showText 0.1s forwards;
|
||||||
animation-delay: 1s;
|
animation-delay: 1s;
|
||||||
font-size: 1rem;
|
font-size: 0.95rem;
|
||||||
color: colors.$primaryYellow;
|
color: colors.$primaryYellow;
|
||||||
|
|
||||||
@media screen and (min-width: 600px) {
|
@media screen and (min-width: 600px) {
|
||||||
|
|
@ -252,7 +272,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 1rem;
|
font-size: 0.95rem;
|
||||||
color: colors.$primaryYellow;
|
color: colors.$primaryYellow;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue