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

Fixed Toggle Option Visibility #126

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 65 additions & 56 deletions periodo/components/navbar.css
Original file line number Diff line number Diff line change
@@ -1,73 +1,82 @@
/** @format */

.nav-img{
position: relative;
left: 2%;
.nav-img {
position: relative;
left: 2%;
}
.Nav-bar{
width: 90%;
height: 150px;
.Nav-bar {
width: 90%;
padding: 0.5rem 1rem;
font-size: 20px;
font-weight: 700;

font-size: 20px;
font-weight: 700;

}
.main-navbar{
width: 100%;
margin-right: 10px;
.main-navbar {
width: 100%;
margin-right: 10px;
}
.Nav-bar:hover{
border-radius: 2rem;
box-shadow: 2px 2px 3px 3px cyan,
2px 2px 5px 4px cyan;
color: turquoise;
.Nav-bar:hover {
border-radius: 2rem;
box-shadow: 2px 2px 3px 3px cyan, 2px 2px 5px 4px cyan;
color: turquoise;
}
#nav-btn,.toggle{
display: none;
#nav-btn,
.toggle {
display: none;
}

/***********Responsive********/

@media (min-width:400px) and (max-width:700px){
.main-navbar{
display: none;
visibility: hidden;
}

.toggle{
display: block;
width: 30px;
height: 20px;
position: absolute;
top: 4%;
right: 2%;
}
.Nav-bar{
position: relative;
right: -60%;
text-align: center;
text-transform: capitalize;
}
.toggel-btn{
width: 30px;
min-height: 7px;
margin: 2px;
background-color: white;
@media (min-width: 400px) and (max-width: 700px) {
.main-navbar {
display: none;
visibility: hidden;
}

}

#nav-btn:checked+.main-navbar{
display: flex;
flex-direction: column;
visibility: visible;
}
.Nav-bar:hover{
color: red;
}
}
.toggle {
display: block;
width: 30px;
height: 20px;
position: absolute;
top: 4%;
right: 2%;
}
.Nav-bar {
position: relative;
right: 20%;
z-index: 10;
text-align: center;
text-transform: capitalize;
padding: 20px;
margin-bottom: 3px;
width: 170px;
color: rgba(34, 19, 51, 1);
background-color: rgba(238, 164, 193, 0.993);
}
.toggel-btn {
width: 30px;
min-height: 7px;
margin: 2px;
background-color: white;
}

@media screen and (max-width:400px){
#nav-btn:checked + .main-navbar {
display: flex;
flex-direction: column;
visibility: visible;
}
.Nav-bar:hover {
color: rgb(241, 182, 217);
background-color: rgba(34, 19, 51, 1);
}
}

.Nav-bar{
right: -30%;
}

@media screen and (max-width: 400px) {
.Nav-bar {
right: -30%;
}
}
4 changes: 4 additions & 0 deletions periodo/components/navbar.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

import React from "react"
import Link from "next/link"
import Typography from '@material-ui/core/Typography';
import { useUser } from '@auth0/nextjs-auth0';
import { Header, Nav, PageBody } from "./styles.js";
import styles from "./navbar.module.css";


const Navbar = ({ children }) => {
const { user } = useUser();
return (

<React.Fragment>
<header className={styles.mobileNav}>
<Header>
Expand Down Expand Up @@ -50,6 +53,7 @@ const Navbar = ({ children }) => {
</div>
</label>
</div>

</Nav>

</Header>
Expand Down
20 changes: 5 additions & 15 deletions periodo/components/styles.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
import styled from "@emotion/styled"

export const Header = styled("div")`
width:100%;
color:white;
background-color:black;
display:flex;
justify-content: space-between;
align-items: center;
`

export const Nav = styled("div")
`
width:auto;
`
width: auto;
height: 70px;
padding: 30px;
`;


export const PageBody = styled("div")`
width: 100%;
height: 100%;
padding: 2em;
`
Loading