Add temporary close and open menu icons

This commit is contained in:
gabehab 2021-02-28 20:37:59 -08:00
parent f741a60867
commit 18806c15cf
2 changed files with 38 additions and 10 deletions

View File

@ -10,8 +10,6 @@ import UpdateNotice from 'components/common/UpdateNotice';
import UserButton from 'components/settings/UserButton'; import UserButton from 'components/settings/UserButton';
import Logo from 'assets/logo.svg'; import Logo from 'assets/logo.svg';
import styles from './Header.module.css'; import styles from './Header.module.css';
import Sun from 'assets/sun.svg';
import Moon from 'assets/moon.svg';
export default function Header() { export default function Header() {
const user = useSelector(state => state.user); const user = useSelector(state => state.user);
@ -40,9 +38,13 @@ export default function Header() {
aria-expanded="false" aria-expanded="false"
> >
{active ? ( {active ? (
<Icon icon={<Sun />} size="large" className={styles.logo} /> <div> X </div>
) : ( ) : (
<Icon icon={<Moon />} size="large" className={styles.logo} /> <>
<span></span>
<span></span>
<span></span>
</>
)} )}
</button> </button>
{user && ( {user && (

View File

@ -29,11 +29,11 @@
.nav { .nav {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
font-size: var(--font-size-normal); font-size: var(--font-size-normal);
font-weight: 600; font-weight: 600;
width: 100%; width: 100%;
justify-content: space-between;
} }
.items { .items {
@ -57,12 +57,15 @@
@media only screen and (max-width: 992px) { @media only screen and (max-width: 992px) {
.nav { .nav {
font-size: var(--font-size-large); font-size: var(--font-size-large);
justify-content: center; justify-content: space-between;
padding: 20px 0; margin: 20px 0;
}
.items {
flex-wrap: wrap;
} }
} }
@media only screen and (max-width: 576px) { @media only screen and (max-width: 768px) {
.header { .header {
padding: 0 15px; padding: 0 15px;
} }
@ -70,6 +73,9 @@
.nav { .nav {
font-size: var(--font-size-normal); font-size: var(--font-size-normal);
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center;
flex-direction: column;
position: relative;
} }
.items { .items {
@ -95,11 +101,31 @@
.burger { .burger {
display: block; display: block;
color: #4a4a4a; /* color: #4a4a4a; */
cursor: pointer; cursor: pointer;
height: 3.25rem; height: 3.25rem;
position: relative;
width: 3.25rem; width: 3.25rem;
margin-left: auto; margin-left: auto;
position: absolute;
right: 0;
top: 0;
}
.burger span {
transform: translateX(-50%);
padding: 1px 0px;
margin: 6px 0;
width: 20px;
display: block;
background-color: white;
}
.burger div {
height: 100%;
color: white;
text-align: center;
margin: auto;
font-size: 1.5rem;
transform: translateX(-50%);
} }
} }