diff --git a/components/header.module.css b/components/header.module.css
index e4be5d3da7..f0287a740c 100644
--- a/components/header.module.css
+++ b/components/header.module.css
@@ -72,7 +72,7 @@
.navbarNav {
width: 100%;
align-items: center;
- height: 39px;
+ height: var(--navbar-height);
align-content: center;
}
@@ -101,12 +101,21 @@
padding-left: 0 !important;
}
+.navbarSpacer {
+ height: var(--navbar-total-height);
+}
+
.sticky {
position: fixed;
- border-bottom: 1px solid var(--theme-toolbarActive);
- width: 100vw;
- top: -1px;
- padding-top: 1px;
+ left: 0;
+ right: 0;
+ top: 0;
+ padding-top: var(--navbar-padding-top);
background-color: var(--bs-body-bg);
+ border-bottom: var(--navbar-border-width) solid transparent;
z-index: 1000;
}
+
+.sticky.scrolled {
+ border-bottom-color: var(--theme-toolbarActive);
+}
diff --git a/components/nav/desktop/top-bar.js b/components/nav/desktop/top-bar.js
index c1e0169d65..41ea95d32b 100644
--- a/components/nav/desktop/top-bar.js
+++ b/components/nav/desktop/top-bar.js
@@ -1,27 +1,39 @@
-import { Nav, Navbar } from 'react-bootstrap'
+import { Nav, Navbar, Container } from 'react-bootstrap'
import styles from '../../header.module.css'
import { AnonCorner, Back, Brand, MeCorner, NavPrice, SearchItem } from '../common'
import { useMe } from '../../me'
import { useCommentsNavigatorContext, CommentsNavigator } from '@/components/use-comments-navigator'
+import classNames from 'classnames'
+import { useScrollThreshold } from '@/components/use-scroll-threshold'
export default function TopBar ({ prefix, sub, path, topNavKey, dropNavKey }) {
const { me } = useMe()
const { navigator, commentCount } = useCommentsNavigatorContext()
+ const { sentinelRef, past } = useScrollThreshold(0)
+
return (
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+ >
)
}
diff --git a/components/nav/index.js b/components/nav/index.js
index beacbd6fcf..8e5e5b3d8d 100644
--- a/components/nav/index.js
+++ b/components/nav/index.js
@@ -1,7 +1,6 @@
import { useRouter } from 'next/router'
import DesktopHeader from './desktop/header'
import MobileHeader from './mobile/header'
-import StickyBar from './sticky-bar'
import { PriceCarouselProvider } from './price-carousel'
export default function Navigation ({ sub }) {
@@ -20,7 +19,6 @@ export default function Navigation ({ sub }) {
-
)
}
diff --git a/components/nav/mobile/header.js b/components/nav/mobile/header.js
index a3b0cf775b..17ed86d201 100644
--- a/components/nav/mobile/header.js
+++ b/components/nav/mobile/header.js
@@ -1,13 +1,13 @@
import { Container } from 'react-bootstrap'
import TopBar from './top-bar'
-import SecondBar from './second-bar'
+import NavSelectBar from './navselect-bar'
export default function Header (props) {
return (
+
-
)
diff --git a/components/nav/mobile/navselect-bar.js b/components/nav/mobile/navselect-bar.js
new file mode 100644
index 0000000000..cdba95a9c5
--- /dev/null
+++ b/components/nav/mobile/navselect-bar.js
@@ -0,0 +1,22 @@
+import { Nav, Navbar } from 'react-bootstrap'
+import styles from '../../header.module.css'
+import { Back, NavSelect, hasNavSelect } from '../common'
+import SecondBar from './second-bar'
+
+export default function NavSelectBar ({ sub, topNavKey, path, pathname }) {
+ if (!hasNavSelect({ path, pathname })) return null
+ return (
+ <>
+
+
+
+
+ >
+ )
+}
diff --git a/components/nav/mobile/second-bar.js b/components/nav/mobile/second-bar.js
index 25ac2def2b..d8e71f651d 100644
--- a/components/nav/mobile/second-bar.js
+++ b/components/nav/mobile/second-bar.js
@@ -1,12 +1,12 @@
import { Nav, Navbar } from 'react-bootstrap'
-import { NavPrice, NavWalletSummary, Sorts, hasNavSelect } from '../common'
+import { NavPrice, NavWalletSummary, Sorts } from '../common'
import styles from '../../header.module.css'
import { useMe } from '@/components/me'
export default function SecondBar (props) {
const { me } = useMe()
const { topNavKey } = props
- if (!hasNavSelect(props)) return null
+
return (