Skip to content

Commit

Permalink
Merge pull request from /feature/responsivity
Browse files Browse the repository at this point in the history
Responsivity on NavBar
  • Loading branch information
Pyments authored Jan 12, 2024
2 parents 82ea7e5 + 1f2888c commit cc7a165
Show file tree
Hide file tree
Showing 16 changed files with 512 additions and 258 deletions.
44 changes: 38 additions & 6 deletions src/components/Footer/Footer.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
@import "../../variables";

// * {
// border: 1px solid black;
// }
.footer-title {
letter-spacing: $letter-spacing-max;
font-size: 1.7rem;
font-weight: 600;
font-weight: 800;
}

.main-footer {
color: $ui-lightest;
width: 100%;
.footer-realizacao {
background-color: $red-ligh;
flex-wrap: wrap;
padding: 1.8rem;
display: flex;
@media only screen and (max-width: 980px) {
flex-direction: column;
span {
margin-bottom: 2rem;
font-size: clamp(1rem, 1rem + 1vw, 3rem);
}
}
span {
display: block;
display: inline-block;
width: 100%;
}
img {
Expand All @@ -28,8 +36,17 @@
padding-top: 3rem;
display: flex;
padding: 1rem;
@media only screen and (max-width: 980px) {
flex-direction: column;
}
.footer-lais {
img{
@media only screen and (max-width: 980px) {
margin: 1rem 0rem;
img {
width: 50%;
}
}
img {
filter: brightness(0) invert(1);
width: 12rem;
}
Expand All @@ -39,9 +56,18 @@
}
}
.footer-links-uteis {
@media only screen and (max-width: 980px) {
margin: 2rem 0rem;
ul {
a {
li {
text-align: center;
}
}
}
}
ul {
list-style: none;
padding: 1rem;
width: 12rem;
a {
text-decoration: none;
Expand All @@ -65,6 +91,12 @@
padding-top: 1.5rem;
display: flex;
width: 8rem;
@media only screen and (max-width: 980px) {
width: 10rem;
img {
width: fit-content;
}
}
a {
padding: 0.35rem;
}
Expand Down
58 changes: 0 additions & 58 deletions src/components/MainHeader/MainHeader.scss

This file was deleted.

44 changes: 0 additions & 44 deletions src/components/MainHeader/MainHeader.tsx

This file was deleted.

137 changes: 137 additions & 0 deletions src/components/MainHeader/NavigationBar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
@import "../../variables";

// * {
// border: 1px solid black;
// }


.Navbar {
border-bottom: 2px solid $ui-lighter;
justify-content: space-between;
background: $ui-lightest;
align-items: center;
position: fixed;
display: flex;
z-index: 999;
height: auto;
width: 100%;
}

.Navbar > .nav-logo {
color: $ui-darker;
font-weight: 700;
font-size: 21px;
margin: 15px;
}

.Navbar > .nav-items > a {
text-decoration: none;
position: relative;
border-radius: 2px;
color: $ui-darker;
font-size: 16px;
margin: 15px;
opacity: 0.9;
}

.Navbar > .nav-items > a:hover {
opacity: 1;
}

.Navbar > .nav-items > a::before {
background: $ui-darker;
transition: all 0.45s;
position: absolute;
content: "";
height: 2px;
bottom: 0;
width: 0;
left: 0;
}

.Navbar > .nav-items > a:hover::before {
width: 100%;
}

.Navbar > .nav-toggle {
display: none;
}

@media (max-width: 700px) {
.Navbar > .nav-items {
transform: translateX(-100%);
backdrop-filter: blur(12px);
background: #ffEFEFD0;
flex-direction: column;
transition: all 0.45s;
position: absolute;
display: flex;
height: 100dvh;
width: 100%;
top: 70px;
right: 0;
}

.Navbar > .nav-items > a::before {
background: transparent;
}

.Navbar > .nav-items.open {
transform: translateX(0);
}

.Navbar > .nav-toggle {
justify-content: center;
align-items: center;
cursor: pointer;
display: flex;
height: 50px;
width: 50px;
}

.nav-toggle > .bar {
transition: all 200ms ease-in-out;
background: $ui-darker;
position: relative;
border-radius: 2px;
width: 32px;
height: 2px;
right: 0;
}

.nav-toggle > .bar::before,
.nav-toggle > .bar::after {
transition: all 200ms ease-in-out;
background: $ui-darker;
position: absolute;
border-radius: 2px;
content: "";
height: 2px;
}

.nav-toggle > .bar::before {
transform: translateY(-8px);
width: 32px;
right: 0;
}

.nav-toggle > .bar::after {
transform: translateY(8px);
width: 32px;
right: 0;
}

.nav-toggle.open > .bar {
transform: translateX(-40px);
background: transparent;
}

.nav-toggle.open > .bar::before {
transform: rotate(45deg) translate(26px, -26px);
width: 32px;
}

.nav-toggle.open > .bar::after {
transform: rotate(-45deg) translate(26px, 26px);
}
}
59 changes: 59 additions & 0 deletions src/components/MainHeader/NavigationBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { useState } from "react";
import { Link } from "react-router-dom";

import "./NavigationBar.scss";

import logoSmall from "../../assets/images/logo-small.png";

const NavigationBar = () => {
const [isOpen, setIsOpen] = useState(false);

return (
<>
<nav>
<div className="Navbar">
<span className="nav-logo"><img src={logoSmall}/></span>
<div className={`nav-items ${isOpen && "open"}`}>
<Link to="/AVASUS/">Início</Link>
<Link to="/AVASUS/sobre">Sobre</Link>
<Link to="/AVASUS/cursos">Cursos</Link>
<Link to="/AVASUS/parceiros">Parceiros</Link>
<Link to="/AVASUS/transparencia">Transparência</Link>
<Link to="/AVASUS/contato">Contato</Link>
</div>
<div
className={`nav-toggle ${isOpen && "open"}`}
onClick={() => setIsOpen(!isOpen)}
>
<div className="bar"></div>
</div>
</div>
</nav>
</>
);
};

/* <Link to="/AVASUS/" className="navBar-logo">
<img src={logoSmall} alt="Logo AVASUS" className="navLogo-img" />
</Link>
<div className={`navBar-items ${IsOpen && "open"}`}>
<Link to="/AVASUS/">Início</Link>
<Link to="/AVASUS/sobre">Sobre Nós</Link>
<Link to="/AVASUS/cursos">Cursos</Link>
<Link to="/AVASUS/parceiros">Parceiros</Link>
<Link to="/AVASUS/transparencia">Transparência</Link>
<Link to="/AVASUS/contato">Contato</Link>
<div className={`navBar-toggle ${IsOpen && "open"}`} onClick={() => setIsOpen(!IsOpen)}>
<span className="navBar-toggle-icon"></span>
</div>
</div> */


/* <div>
<input type="text" placeholder="Pesquisar..." />
<button>Entrar</button>
<button>Cadastrar</button>
</div> */


export default NavigationBar;
Loading

0 comments on commit cc7a165

Please sign in to comment.