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

fix: User menu alignment on mobile. #2682

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/components/HeaderNav/HeaderNav.module.css
Expand Up @@ -74,9 +74,21 @@ ul.dropdownList {
}

@media screen and (max-width: 768px) {
.loggedInContainer {
width: 100%;
padding: 0 var(--container-padding-right) 0 var(--container-padding-left);
display: flex;
justify-content: space-between;
}

ul.dropdownList {
left: 0;
}

.themeToggleWrapper {
border-right: 0;
}

.navContainer {
width: 100%;
justify-content: space-between;
Expand All @@ -86,7 +98,7 @@ ul.dropdownList {
@media screen and (max-width: 560px) {
div.dropdown {
position: relative;
right: 2.4rem;
right: 0;
}

div.noCreditsDropdown {
Expand Down
33 changes: 12 additions & 21 deletions src/components/NavigationDrawer/NavigationDrawer.jsx
Expand Up @@ -4,31 +4,22 @@ import React from "react";
import HeaderNav from "../HeaderNav";
import SidebarContent from "../SidebarContent";
import styles from "./NavigationDrawer.module.css";
import HamburgerMenu from "src/components/HamburgerMenu";

const NavigationDrawer = ({ show, fullScreen, toggleShowMenu }) => {
const NavigationDrawer = ({ show, fullScreen }) => {
useLockBodyScrollOnTrue(show);
return (
<>
{/* this div is used when tabIng makes the page scroll down so the user can close the Navigation Drawer */}
{show && (
<div className={styles.navigationDrawerHeader}>
<HamburgerMenu toggleShowMenu={toggleShowMenu} showMenu={show} />
</div>
)}
<div
className={classNames(
fullScreen
? styles.navigationDrawerFullScreen
: styles.navigationDrawer,
show && styles.navigationDrawerShow
)}>
<div className={classNames(styles.navWrapper, "margin-bottom-s")}>
<HeaderNav />
</div>
<SidebarContent />
<div
className={classNames(
fullScreen
? styles.navigationDrawerFullScreen
: styles.navigationDrawer,
show && styles.navigationDrawerShow
)}>
<div className={classNames(styles.navWrapper, "margin-bottom-s")}>
<HeaderNav />
</div>
</>
<SidebarContent />
</div>
);
};

Expand Down