Side Menu functionality and styling
This commit is contained in:
@@ -9,6 +9,10 @@
|
|||||||
margin-bottom: 0.3rem;
|
margin-bottom: 0.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu_icon:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.menu_bar-top {
|
.menu_bar-top {
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
.panel:before {
|
.panel:before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
|
||||||
background-color: rgba(0, 0, 0, 0);
|
background-color: rgba(0, 0, 0, 0);
|
||||||
transition: background-color 0.5s ease-in-out;
|
transition: background-color 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,24 +20,48 @@ class SideMenu extends Component {
|
|||||||
.addEventListener('click', function() {
|
.addEventListener('click', function() {
|
||||||
slideout.toggle()
|
slideout.toggle()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function close(e) {
|
||||||
|
e.preventDefault()
|
||||||
|
slideout.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
slideout
|
||||||
|
.on('beforeopen', function() {
|
||||||
|
this.panel.classList.add('panel-open')
|
||||||
|
})
|
||||||
|
.on('open', function() {
|
||||||
|
this.panel.addEventListener('click', close)
|
||||||
|
document.querySelector('.side--close').addEventListener('click', close)
|
||||||
|
})
|
||||||
|
.on('beforeclose', function() {
|
||||||
|
this.panel.classList.remove('panel-open')
|
||||||
|
this.panel.removeEventListener('click', close)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="side-menu">
|
<div className="side-menu">
|
||||||
<ul className="m-0 p-0 mt-4 side-navigation">
|
<ul className="m-0 p-0 mt-4 side-navigation">
|
||||||
|
<button
|
||||||
|
className="text-white text-3xl mb-4 opacity-50 hover:opacity-100 px-2 side--close"
|
||||||
|
onClick={this.close}
|
||||||
|
>
|
||||||
|
X
|
||||||
|
</button>
|
||||||
<Link to="/services">
|
<Link to="/services">
|
||||||
<li className="no-underline text-2xl uppercase p-4 text-center text-white">
|
<li className="text-right no-underline text-2xl uppercase p-2 text-white">
|
||||||
What We Do
|
What We Do
|
||||||
</li>
|
</li>
|
||||||
</Link>
|
</Link>
|
||||||
<Link to="/about">
|
<Link to="/about">
|
||||||
<li className="no-underline text-2xl uppercase p-4 text-center text-white">
|
<li className="text-right no-underline text-2xl uppercase p-2 text-white">
|
||||||
Team
|
Team
|
||||||
</li>
|
</li>
|
||||||
</Link>
|
</Link>
|
||||||
<Link to="/blog">
|
<Link to="/blog">
|
||||||
<li className="no-underline text-2xl uppercase p-4 text-center text-white">
|
<li className="text-right no-underline text-2xl uppercase p-2 text-white">
|
||||||
Blog
|
Blog
|
||||||
</li>
|
</li>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const Layout = ({ children, data }) => (
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<div className="side-panel">
|
<div className="side-panel panel">
|
||||||
<Header />
|
<Header />
|
||||||
{children()}
|
{children()}
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|||||||
Reference in New Issue
Block a user