Skip to content

Commit

Permalink
Responsive header design
Browse files Browse the repository at this point in the history
  • Loading branch information
woobaik committed Jun 24, 2020
1 parent e9cd868 commit 573d304
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
8 changes: 5 additions & 3 deletions src/components/layouts/header/Header.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Link } from "react-router-dom"
import "./Header.styles.scss"

import MovieNavigation from "../../movies/movieNavBar/MovieNavigationBar.component"

import MovieSearchBar from "../../movies/movieSearchBar/MovieSearchBar.component"

import { GiHamburgerMenu } from "react-icons/gi"

const Header = () => {
const [scrollY, setScrollY] = useState(window.pageYOffset)
const [visible, setVisible] = useState(true)
Expand All @@ -31,9 +32,10 @@ const Header = () => {
<div className="logo-name">WHAT TO WATCH?</div>
<div className="logo-pill"></div>
</Link>
<div className="header-search"></div>
<div className="header-burger">
<GiHamburgerMenu />
</div>
</div>

<MovieNavigation
toggleSearch={() => setSearchVisible(!searchVisible)}
/>
Expand Down
39 changes: 14 additions & 25 deletions src/components/layouts/header/Header.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
font-family: "Work Sans", sans-serif;
font-weight: bold;
display: flex;

align-items: center;
justify-content: space-around;
top: 0;
width: 100%;
}

.header-left {
width: fit-content;
display: flex;
}

.logo-and-text {
display: flex;
padding: 1rem;
padding: 1rem 0rem 1rem 4rem;
}

.logo-name {
Expand All @@ -50,18 +51,6 @@
-webkit-text-fill-color: transparent;
}

.logo-pill {
background: linear-gradient(to right, rgb(45, 187, 207), rgb(8, 181, 226));
border-radius: 10px;

width: 70px;
height: 25px;
}

.header-search {
width: 45vw;
}

.user-authenticate {
display: flex;
align-items: center;
Expand All @@ -74,16 +63,6 @@
color: white;
}

@media (max-width: 700px) {
.logo-name {
display: none;
}

.header-search {
display: none;
}
}

// custom bootstrap button

.btn-outline-primary {
Expand All @@ -98,3 +77,13 @@
.logo-and-text:hover {
text-decoration: none;
}

@media (max-width: 700px) {
.header-burger {
color: white;
font-size: 2rem;
position: absolute;
top: 4px;
left: 20px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@
}
}
}

@media (max-width: 700px) {
.Movie-navigation {
display: none;
}
}

0 comments on commit 573d304

Please sign in to comment.