Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile menu styling #89

Merged
merged 4 commits into from Jul 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
67 changes: 53 additions & 14 deletions client/src/assets/scss/components/_nav.scss
Expand Up @@ -21,18 +21,16 @@
}

nav {
position: relative;
display: flex;
align-content: center;
flex-direction: row;
justify-content: flex-end;
margin: 0.5em;
position: relative;
width: 100vw;

ul {
text-align: center;
list-style-type: none;
list-style-type: none;
margin: 0;
padding: 0.5em;
}
Expand Down Expand Up @@ -63,35 +61,76 @@ nav {
width: 100%;
}
}
.hamburgerMQ {
.hamburger {
display: none;
}

.mobileNav {
.mobile-nav {
display: none;
}
.mobileLinks {

.mobile-links {
display: none;
}

@media only screen and (max-width: 900px) {
.hamburgerMQ {
height: 2em;
.navLogo {
margin: 1.1em 0 0.5em 0.5em;
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: center;
}
.navImg {
max-width: 22vw;
margin: 0.5em;
}
.hamburger {
margin: 5vw 5vw;
font-size: 8vw;
font-size: 13vw;
display: inline-block;
color: $orange;
}

nav {
display: none;
}
.mobileNav {
display: inline-block;
}
.mobileLinks {
display: inline-block;

.mobile-nav {
display: none;
position: absolute;
z-index: 2;
// display: flex;
flex-direction: column;
align-content: center;
justify-content: center;
flex-wrap: nowrap;
align-items: flex-end;
background-color: $background;
border-radius: 1em;
box-shadow: $boxshadow;
// border: solid 2px $orange;
margin: 0.5em;
width: 96vw;
.mobile-links{
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
flex-wrap: nowrap;
margin: 0;
padding: 0.5em;
}
a {
font-size: 5vw;
border-bottom: solid 2px $orange;
padding: 0;
}
}


}

/*# sourceMappingURL=style.css.map */
111 changes: 61 additions & 50 deletions client/src/assets/scss/main.css
Expand Up @@ -244,7 +244,7 @@ Header {
text-transform: uppercase;
letter-spacing: 1px;
margin-top: 3rem;
padding: .75rem;
padding: 0.75rem;
border-radius: 0.75rem;
display: block;
width: 100%;
Expand Down Expand Up @@ -309,18 +309,16 @@ Header {
}

nav {
position: relative;
display: flex;
align-content: center;
flex-direction: row;
justify-content: flex-end;
margin: 0.5em;
position: relative;
width: 100vw;
}
nav ul {
text-align: center;
list-style-type: none;
list-style-type: none;
margin: 0;
padding: 0.5em;
}
Expand Down Expand Up @@ -351,23 +349,37 @@ nav .line {
width: 100%;
}

.hamburgerMQ {
.hamburger {
display: none;
}

.mobileNav {
.mobile-nav {
display: none;
}

.mobileLinks {
.mobile-links {
display: none;
}

@media only screen and (max-width: 900px) {
.hamburgerMQ {
height: 2em;
.navLogo {
margin: 1.1em 0 0.5em 0.5em;
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: center;
}

.navImg {
max-width: 22vw;
margin: 0.5em;
}

.hamburger {
margin: 5vw 5vw;
font-size: 8vw;
font-size: 13vw;
display: inline-block;
color: #da9f63;
}
Expand All @@ -376,12 +388,34 @@ nav .line {
display: none;
}

.mobileNav {
display: inline-block;
.mobile-nav {
display: none;
position: absolute;
z-index: 2;
flex-direction: column;
align-content: center;
justify-content: center;
flex-wrap: nowrap;
align-items: flex-end;
background-color: #c4c4c420;
border-radius: 1em;
box-shadow: 0 7.6vh 10.6vh -3vh rgba(0, 0, 0, 0.85);
margin: 0.5em;
width: 96vw;
}

.mobileLinks {
display: inline-block;
.mobile-nav .mobile-links {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
flex-wrap: nowrap;
margin: 0;
padding: 0.5em;
}
.mobile-nav a {
font-size: 5vw;
border-bottom: solid 2px #da9f63;
padding: 0;
}
}
/*# sourceMappingURL=style.css.map */
Expand Down Expand Up @@ -433,7 +467,7 @@ nav .line {
text-transform: uppercase;
letter-spacing: 1px;
margin-top: 3rem;
padding: .75rem;
padding: 0.75rem;
border-radius: 0.75rem;
display: block;
width: 100%;
Expand Down Expand Up @@ -505,20 +539,11 @@ nav .line {
.how-to-top {
color: white;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-line-pack: center;
align-content: center;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
flex-direction: column;
justify-content: center;
align-content: center;
flex-wrap: wrap;
align-items: center;
text-align: center;
}

Expand Down Expand Up @@ -574,34 +599,20 @@ nav .line {
.fqa-list {
color: white;
font-size: 1.2em;
-webkit-padding-start: 0.5em;
padding-inline-start: 0.5em;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
padding-inline-start: 0.5em;
align-items: center;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-line-pack: center;
align-content: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
align-content: center;
justify-content: center;
width: auto;
text-align: center;
}

.fqa-list li:nth-child(odd) {
color: #a3becf;
font-size: 1.3em;
}

.fqa-list li:nth-child(even) {
background-color: #c4c4c420;
line-height: 2em;
Expand Down
2 changes: 1 addition & 1 deletion client/src/assets/scss/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 18 additions & 39 deletions client/src/components/navbar/index.js
Expand Up @@ -41,12 +41,22 @@ function Navbar(props) {
.catch((err) => console.log(err));
}

const [open, setOpen] = React.useState(false);
// const node = React.useRef();
// const [status, setStatus] = useState({ display: "show" });

// function hideNav() {
// setStatus({display: "hide"})
// }


return (
<div>
<div className="navLogo">
<Link to="./"><img className="navImg" src="/images/wall-pro-logo.png" /></Link>

<div className="hamburger">
<GiHamburgerMenu />
</div>

<nav>
<ul className="links">
<li>
Expand All @@ -60,23 +70,14 @@ function Navbar(props) {
<Link to="./Account">Account</Link>
</li> */}
<li>{verifyStatus()}</li>
{/* <li>
<Link to="./Create">Create</Link>
</li>
<li>
<Link to="./About">About</Link>
</li> */}

<div className="line"></div>
</ul>
</nav>
</div>


<div className="hamburgerMQ">
<GiHamburgerMenu open={open} setOpen={setOpen}/>
</div>
<nav className="mobileNav">
<ul className="mobileLinks">

<nav className="mobile-nav">
<ul className="mobile-links">
<li>
<Link to="./How">How it Works</Link>
</li>
Expand All @@ -88,35 +89,13 @@ function Navbar(props) {
<Link to="./Account">Account</Link>
</li> */}
<li>{verifyStatus()}</li>
{/* <li>
<Link to="./Create">Create</Link>
</li>
<li>
<Link to="./About">About</Link>
</li> */}

</ul>
</nav>

</div>
);
}

const Menu = ({ open }) => {
return (
<StyledMenu open={open}>
<a href="/">
<span role="img" aria-label="about us">💁🏻‍♂️</span>
About us
</a>
<a href="/">
<span role="img" aria-label="price">💸</span>
Pricing
</a>
<a href="/">
<span role="img" aria-label="contact">📩</span>
Contact
</a>
</StyledMenu>
)
}

export default Navbar;