add basic menu
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
.menu {
|
||||
position: absolute;
|
||||
background: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
@keyframes sweep {
|
||||
0% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
100% {
|
||||
transform: translate(-100%, -100%);
|
||||
}
|
||||
}
|
||||
|
||||
.menu-true {
|
||||
top: 0;
|
||||
left: 0;
|
||||
min-height: 100vh;
|
||||
min-width: 100vw;
|
||||
}
|
||||
|
||||
.menu-false {
|
||||
left: -100vw;
|
||||
}
|
||||
|
||||
.menu-logo {
|
||||
height: 40vmin;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
color: #1c1d21;
|
||||
font-family: 'Lato', sans-serif;
|
||||
font-weight: 700;
|
||||
line-height: 1em;
|
||||
font-size: calc(10px + 10vmin);
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
.menu-button,
|
||||
.menu-open-button {
|
||||
background: transparent;
|
||||
display: inline-block;
|
||||
margin: 1em;
|
||||
padding: 0.35em 1em;
|
||||
border: 0.1em solid slateblue;
|
||||
border-radius: 0.12em;
|
||||
color: slateblue;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 1em;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
.menu-button:hover {
|
||||
color: white;
|
||||
background: slateblue;
|
||||
}
|
||||
|
||||
.menu-open-button:hover {
|
||||
color: white;
|
||||
background: #ef476f;
|
||||
}
|
||||
|
||||
.menu-open-button {
|
||||
line-height: 1em;
|
||||
position: absolute;
|
||||
padding: 0.13em 0.3em;
|
||||
color: #ef476f;
|
||||
border: 0.09em solid #ef476f;
|
||||
margin: 0;
|
||||
top: 0.55em;
|
||||
left: 0.5em;
|
||||
}
|
||||
|
||||
/* change how the button is handled when screen is smaller then 880px*/
|
||||
|
||||
.menu-open-button::before {
|
||||
content: '\2630';
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import React, { useState } from 'react';
|
||||
import logo from '../../1f3b9.svg';
|
||||
import './Menu.css';
|
||||
|
||||
export default function MainMenu(props) {
|
||||
const [open, setOpen] = useState(true);
|
||||
|
||||
const HandleClick = () => {
|
||||
setOpen(!open);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className={`menu menu-${open}`}>
|
||||
<img src={logo} className="menu-logo" alt="logo" />
|
||||
<header className="menu-title">Alapatch</header>
|
||||
<div className="menu-button-container">
|
||||
<button className="menu-button" onClick={HandleClick}>
|
||||
New Patch
|
||||
</button>
|
||||
<button className="menu-button">Load Patch</button>
|
||||
</div>
|
||||
</div>
|
||||
{!open && (
|
||||
<button className="menu-open-button" onClick={HandleClick}></button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -63,6 +63,7 @@
|
||||
-moz-user-select: none; /* Old versions of Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.tab:hover {
|
||||
|
||||
Reference in New Issue
Block a user