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: mobile nav position #1292

Merged
merged 2 commits into from
Feb 5, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/web/src/components/Bytes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ const Bytes = () => {
return (
<div className="relative mt-16 h-[calc(100vh-7rem)] overflow-y-hidden focus-visible:outline-none md:h-[calc(100vh-4rem)]">
<MetaTags title="Bytes" />
<style jsx global>{`
html {
overflow-y: hidden;
}
`}</style>
<div
ref={sliderRef}
className="keen-slider h-[calc(100vh-7rem)] snap-y snap-mandatory focus-visible:outline-none md:h-[calc(100vh-4rem)]"
Expand Down
7 changes: 4 additions & 3 deletions apps/web/src/components/Common/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ const Layout: FC<Props> = ({
{!skipNav && <Navbar />}
<div
className={tw(
'relative focus-visible:outline-none',
!skipPadding &&
'ultrawide:px-8 ultrawide:pb-8 laptop:px-6 px-4 pb-6 pt-20'
'ultrawide:pb-8 relative pb-6 focus-visible:outline-none',
{
'ultrawide:px-8 laptop:px-6 px-4 pt-20': !skipPadding
}
)}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Common/MobileBottomNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const MobileBottomNav = () => {
const isActivePath = (path: string) => router.pathname === path

return (
<div className="pb-safe absolute inset-x-0 bottom-0 z-10 border-t-[0.5px] border-gray-300 bg-white/90 backdrop-blur-xl md:hidden dark:border-gray-700 dark:bg-black/90">
<div className="pb-safe sticky inset-x-0 bottom-0 z-10 border-t-[0.5px] border-gray-300 bg-white/90 backdrop-blur-xl md:hidden dark:border-gray-700 dark:bg-black/90">
<div className="grid grid-cols-5 py-3">
<Link
href="/"
Expand Down