Skip to content

Commit b52a982

Browse files
committed
bottom nav?
1 parent d6108a5 commit b52a982

11 files changed

Lines changed: 55 additions & 24 deletions

File tree

frontend/app/globals.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ a {
5656

5757
[data-bs-theme="light"] {
5858
background-color: #8cabae;
59-
--tag-list-bg: #8cabae;
59+
--tag-list-bg: var(--bs-body-bg);
6060
--card-bg: #f6faf9;
6161
}
6262

frontend/app/page.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import UseAuth from "@components/UseAuth";
33
import TagList from "@components/Tags/TagList";
44
import tagStyles from "@/styles/tag.module.scss";
55
import navStyles from "@/styles/navbar.module.scss";
6+
import sideStyles from "@/styles/sidemenu.module.scss";
67
import BookmarkCardsView from "@components/CardView/BookmarkCardsView";
78
import { ScreenSizeProvider } from "@/contexts/ScreenSizeContext";
89
import NewBookmarkCard from "@components/Bookmark/NewBookmarkCard";
9-
10+
import Image from "next/image";
1011
export default function App() {
1112
const userAuth = UseAuth();
1213

@@ -23,6 +24,18 @@ export default function App() {
2324
<div
2425
className={`col-md-4 col-lg-2 col-xl-1 fixed-top ${tagStyles.sideMenu}`}
2526
>
27+
<div className={`${sideStyles.logo}`}>
28+
<div className="">
29+
<Image
30+
src="/basic-f-v2-dark-mode-v2-fav.png"
31+
width="38"
32+
height="30"
33+
className="d-inline-block align-top"
34+
alt="FindFirst Logo"
35+
/>
36+
<h4 className="d-inline-block">FindFirst</h4>
37+
</div>
38+
</div>
2639
<NewBookmarkCard />
2740
<TagList />
2841
</div>

frontend/components/Bookmark/CardBody.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Bookmark from "@type/Bookmarks/Bookmark";
44
import EditableField from "./EditableField";
55
import { ScrapableBookmarkToggle } from "./ScrapableToggle";
66
import style from "./bookmarkCard.module.scss";
7-
import { ScreenSizeProvider } from "@/contexts/ScreenSizeContext";
87

98
interface CardBodyProp {
109
bookmark: Readonly<Bookmark>;

frontend/components/Bookmark/NewBookmarkCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default function NewBookmarkCard() {
104104

105105
const handleOnSubmit = async (
106106
submittedBmk: NewBookmarkForm,
107-
actions: any
107+
actions: any,
108108
) => {
109109
// Get the last inputted string and all the tags already entered.
110110
let tags: Tag[] = strTags.map((t) => ({ title: t, id: -1 }));

frontend/components/Bookmark/bookmarkCard.module.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,15 @@
150150
}
151151

152152
.bookmarkCard {
153-
// min-height: 250px;
153+
// min-height: 250px
154+
margin-top: 0px;
154155
margin-bottom: 20px;
155156
background-color: var(--card-bg);
156157
border: 0px;
158+
159+
padding: 0px !important;
160+
.card-body {
161+
}
157162
}
158163

159164
.newBookmarkCard {

frontend/components/CardView/BookmarkCardsView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function BookmarkCardsView() {
5252
{!bookmarks.loading ? (
5353
<div
5454
className={`${cardView.content} row`}
55-
style={{ marginTop: "60px" }}
55+
style={{ marginBottom: "60px" }}
5656
>
5757
{filterBookmarks(bookmarks.fetchedBookmarks).map((b) => {
5858
return (

frontend/components/Navbar/Navbar.tsx

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,22 @@ import Export from "./Export";
99
import Image from "next/image";
1010
import Searchbar from "./Searchbar";
1111
import navbarView from "styles/navbar.module.scss";
12+
import { useEffect, useState } from "react";
1213

1314
const GlobalNavbar: React.FC = () => {
1415
const userAuth = useAuth();
1516
const user = authService.getUser();
17+
let [isMobile, setIsMobile] = useState<boolean | null>(null);
18+
19+
useEffect(() => {
20+
setIsMobile(window.innerWidth <= 767.98);
21+
22+
const checkWindowWidth = () => {
23+
setIsMobile(window.innerWidth <= 767.98);
24+
};
25+
26+
window.addEventListener("resize", checkWindowWidth);
27+
}, []);
1628

1729
const router = useRouter();
1830
function authButton() {
@@ -53,7 +65,7 @@ const GlobalNavbar: React.FC = () => {
5365
return (
5466
<Navbar
5567
expand="md"
56-
fixed="top"
68+
fixed="bottom"
5769
style={{
5870
borderBottom: "1px solid",
5971
height: "auto",
@@ -62,19 +74,20 @@ const GlobalNavbar: React.FC = () => {
6274
className="bg-body-tertiary"
6375
>
6476
<Container className={navbarView.navContainer}>
65-
<Navbar.Brand
66-
onClick={() => router.push("/")}
67-
className={`cursor-pointer ${navbarView.navBrand}`}
68-
>
69-
<Image
70-
src="/basic-f-v2-dark-mode-v2-fav.png"
71-
width="38"
72-
height="30"
73-
className="d-inline-block align-top"
74-
alt="findFirst logo"
75-
/>
76-
FindFirst
77-
</Navbar.Brand>
77+
{isMobile ? (
78+
<Navbar.Brand
79+
onClick={() => router.push("/")}
80+
className={` ${navbarView.navBrand}`}
81+
>
82+
<Image
83+
src="/basic-f-v2-dark-mode-v2-fav.png"
84+
width="38"
85+
height="30"
86+
className="d-inline-block align-top"
87+
alt="FindFirst Logo"
88+
/>
89+
</Navbar.Brand>
90+
) : null}
7891

7992
{/* Search bar stays visible always */}
8093
{userAuth === AuthStatus.Authorized ? <Searchbar /> : null}

frontend/styles/cardView.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
@media (max-width: 760px) {
77
margin-left: 0px;
8-
padding-bottom: 75px;
8+
padding-bottom: 85px;
99
}
1010
}

frontend/styles/navbar.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
.searchBar {
8787
position: fixed;
88-
bottom: 35px;
88+
bottom: 105px;
8989
right: 10%;
9090
width: 80vw;
9191
z-index: 1;
@@ -129,5 +129,4 @@
129129
.gridContainer {
130130
display: grid;
131131
grid-template-columns: minmax(250px, 300px) 1fr; /* taglist min 250px, max 300px, rest fills */
132-
height: calc(100vh - 60px);
133132
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.logo {
2+
margin-left: 5px;
3+
}

0 commit comments

Comments
 (0)