Skip to content

Commit c09365c

Browse files
committed
unbreak mobile
1 parent c7a95ec commit c09365c

5 files changed

Lines changed: 40 additions & 46 deletions

File tree

frontend/components/Bookmark/BookmarkCard.tsx

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,40 @@ export default function BookmarkCard({ bookmark }: Readonly<BookmarkProp>) {
235235

236236
function Content(): ReactNode {
237237
return bookmark.screenshotUrl ? (
238-
<OverlayCard
239-
url={imgApi}
240-
changeEditMode={changeEditMode}
241-
bookmark={bookmark}
242-
currentBookmark={currentBookmark}
243-
inEditMode={inEditMode}
244-
edit={edit}
245-
/>
238+
<div>
239+
<OverlayCard
240+
url={imgApi}
241+
changeEditMode={changeEditMode}
242+
bookmark={bookmark}
243+
currentBookmark={currentBookmark}
244+
inEditMode={inEditMode}
245+
edit={edit}
246+
/>
247+
<div
248+
style={{
249+
marginBottom: "2px",
250+
marginLeft: "15px",
251+
marginTop: "0px",
252+
textAlign: "justify",
253+
}}
254+
>
255+
{window.innerWidth < 768 ? (
256+
<a target="_blank" href={bookmark.url}>
257+
{bookmark.url}
258+
</a>
259+
) : null}
260+
</div>
261+
</div>
246262
) : (
247-
<PlainCard
248-
changeEditMode={changeEditMode}
249-
bookmark={bookmark}
250-
currentBookmark={currentBookmark}
251-
inEditMode={inEditMode}
252-
edit={edit}
253-
></PlainCard>
263+
<div>
264+
<PlainCard
265+
changeEditMode={changeEditMode}
266+
bookmark={bookmark}
267+
currentBookmark={currentBookmark}
268+
inEditMode={inEditMode}
269+
edit={edit}
270+
></PlainCard>
271+
</div>
254272
);
255273
}
256274

frontend/components/Bookmark/CardBody.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ export default function CardBody({
2323
}: Readonly<CardBodyProp>) {
2424
const [isScrapable, setIsScrapable] = useState(bookmark.scrapable);
2525

26-
const handleClick = () => {
27-
const isMobile = window.innerWidth < 768;
28-
if (isMobile) {
29-
window.open(bookmark.url);
30-
}
31-
};
3226
return (
3327
<Card.Body className={``}>
34-
<Card.Title className={`${style.cTitle}`} onClick={handleClick}>
28+
<Card.Title className={`${style.cTitle}`}>
3529
{inEditMode ? (
3630
<EditableField
3731
fieldValue={bookmark.title}
@@ -68,13 +62,11 @@ export default function CardBody({
6862
/>
6963
</div>
7064
</div>
71-
) : (
72-
<ScreenSizeProvider>
73-
<Card.Link target="_blank" href={bookmark.url}>
74-
{bookmark.url}
75-
</Card.Link>
76-
</ScreenSizeProvider>
77-
)}
65+
) : bookmark.screenshotUrl == null ? (
66+
<Card.Link target="_blank" href={bookmark.url}>
67+
{bookmark.url}
68+
</Card.Link>
69+
) : null}
7870
{highlight ? (
7971
<div>
8072
<hr />

frontend/components/Logo.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

frontend/components/Navbar/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const GlobalNavbar: React.FC = () => {
7171
width="38"
7272
height="30"
7373
className="d-inline-block align-top"
74-
alt="Find First logo"
74+
alt="findFirst logo"
7575
/>
7676
FindFirst
7777
</Navbar.Brand>

frontend/styles/navbar.module.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@
9696
-0.2em 0em 0.2em #29b5bf;
9797
}
9898

99-
.searchBar:active {
100-
position: fixed;
101-
background: red !important;
102-
bottom: 50%;
103-
}
104-
10599
.navBtns {
106100
order: 3;
107101
margin-left: 0 !important;

0 commit comments

Comments
 (0)