Skip to content

Commit

Permalink
Fixed Toggle Option Visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavesh1334 committed Mar 23, 2021
1 parent efc8cc4 commit 425bd12
Show file tree
Hide file tree
Showing 5 changed files with 6,904 additions and 2,748 deletions.
125 changes: 64 additions & 61 deletions periodo/components/navbar.css
Original file line number Diff line number Diff line change
@@ -1,74 +1,77 @@
/** @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;
}
.main-navbar{
width: 100%;
margin-right: 10px;
font-size: 20px;
font-weight: 700;
}
.Nav-bar:hover{
border-radius: 2rem;
box-shadow: 2px 2px 3px 3px cyan,
2px 2px 5px 4px cyan;
color: turquoise;
.main-navbar {
width: 100%;
margin-right: 10px;
}
#nav-btn,.toggle{
display: none;
.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;
}


/***********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;
}

}
.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;
}

#nav-btn:checked+.main-navbar{
display: flex;
flex-direction: column;
visibility: visible;
}
.Nav-bar:hover{
color: red;
}
#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);
}
}

@media screen and (max-width:400px){

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

}
@media screen and (max-width: 400px) {
.Nav-bar {
right: -30%;
}
}
72 changes: 37 additions & 35 deletions periodo/components/navbar.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
import React from "react";
import Link from "next/link";
import { Header, Nav, PageBody } from "./styles.js";
/** @format */

import React from 'react';
import Link from 'next/link';
// import 'navbar.css';
import { Header, Nav, PageBody } from './styles.js';

const Navbar = ({ children }) => {
return (
<React.Fragment>

<Header>
<img src="Logo.png" height="64px" width="160px" padding="10px" class="nav-img"></img>
<React.Fragment>
<Header>
<img src='Logo.png' height='64px' width='160px' padding='10px' class='nav-img'></img>
<Nav>
<input type= "checkbox" id="nav-btn"></input>
<div class="main-navbar">
<Link href="/">
<a class="Nav-bar Nav-Active">Home</a>
</Link>
<Link href="/tips">
<a class="Nav-bar">Tips</a>
</Link>
<Link href="/Gynac">
<a class="Nav-bar">GynacHelp</a>
</Link>
<Link href = "/analysis">
<a class="Nav-bar">Quiz</a>
</Link>
<Link href="/calender">
<a class="Nav-bar">Calendar</a>
</Link>
<Link href="/about">
<a class="Nav-bar">AboutUs</a>
</Link>
<Link href="/notes">
<a class="Nav-bar">Notes</a>
</Link>
<input type='checkbox' id='nav-btn'></input>
<div class='main-navbar'>
<Link href='/'>
<a class='Nav-bar Nav-Active'>Home</a>
</Link>
<Link href='/tips'>
<a class='Nav-bar'>Tips</a>
</Link>
<Link href='/Gynac'>
<a class='Nav-bar'>GynacHelp</a>
</Link>
<Link href='/analysis'>
<a class='Nav-bar'>Quiz</a>
</Link>
<Link href='/calender'>
<a class='Nav-bar'>Calendar</a>
</Link>
<Link href='/about'>
<a class='Nav-bar'>AboutUs</a>
</Link>
<Link href='/notes'>
<a class='Nav-bar'>Notes</a>
</Link>
</div>
<label for="nav-btn">
<div class="toggle">
<div class="toggel-btn"></div>
<div class="toggel-btn"></div>
<div class="toggel-btn"></div>
<label for='nav-btn'>
<div class='toggle'>
<div class='toggel-btn'></div>
<div class='toggel-btn'></div>
<div class='toggel-btn'></div>
</div>
</label>
</Nav>
Expand Down
32 changes: 17 additions & 15 deletions periodo/components/styles.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import styled from "@emotion/styled"
/** @format */

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;
`
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;
height: 70px;
padding: 30px;
`;

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

0 comments on commit 425bd12

Please sign in to comment.