Skip to content

Commit 443fb1e

Browse files
committed
fix scrollbar mobile with fix-top navbar
1 parent c59c1ce commit 443fb1e

6 files changed

Lines changed: 20 additions & 11 deletions

File tree

frontend/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ export default function App() {
2020
<div className={`container-fluid`}>
2121
<div className={`row ${navStyles.fullHeightRow}`}>
2222
<ScreenSizeProvider>
23-
<div className={`col-md-4 col-lg-2 col-xl-2 ${tagStyles.sideMenu}`}>
23+
<div
24+
className={`col-md-4 col-lg-2 col-xl-1 fixed-top ${tagStyles.sideMenu}`}
25+
>
2426
<NewBookmarkCard />
2527
<TagList />
2628
</div>
2729
</ScreenSizeProvider>
28-
<div
29-
className={`col-md-8 col-lg-10 col-xl-10 ${navStyles.scrollableColumn}`}
30-
>
30+
<div className={` col-md-8 col-lg-10 ${navStyles.scrollableColumn}`}>
3131
<BookmarkCardsView />
3232
</div>
3333
</div>

frontend/components/CardView/BookmarkCardsView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export default function BookmarkCardsView() {
5050
return (
5151
<div>
5252
{!bookmarks.loading ? (
53-
<div className={`${cardView.content} row`}>
53+
<div
54+
className={`${cardView.content} row`}
55+
style={{ marginTop: "60px" }}
56+
>
5457
{filterBookmarks(bookmarks.fetchedBookmarks).map((b) => {
5558
return (
5659
<div

frontend/components/Navbar/Navbar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ const GlobalNavbar: React.FC = () => {
5353
return (
5454
<Navbar
5555
expand="md"
56-
style={{ borderBottom: "1px solid", height: "auto", minHeight: "60px" }}
56+
fixed="top"
57+
style={{
58+
borderBottom: "1px solid",
59+
height: "auto",
60+
minHeight: "60px",
61+
}}
5762
className="bg-body-tertiary"
5863
>
5964
<Container className={navbarView.navContainer}>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.content {
22
padding-top: 3px;
33

4-
@media (max-width: 768px) {
5-
padding-bottom: 100px;
4+
margin-left: 250px;
5+
6+
@media (max-width: 760px) {
7+
margin-left: 0px;
68
}
79
}

frontend/styles/navbar.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122

123123
/* navStyles or a shared CSS file */
124124
.fullHeightRow {
125-
height: calc(100vh - 60px);
126125
flex-wrap: nowrap;
127126
}
128127

frontend/styles/tag.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.sideMenu {
2+
margin-top: 60px;
23
padding-bottom: 5px;
34
padding-top: 10px;
4-
max-width: 300px;
5-
min-width: 250px;
5+
width: 250px;
66
background-color: var(--tag-list-bg);
77
height: 100%;
88
display: flex;

0 commit comments

Comments
 (0)