Skip to content

Commit f74d7a6

Browse files
committed
Move search input
1 parent 1fb930c commit f74d7a6

File tree

2 files changed

+54
-14
lines changed

2 files changed

+54
-14
lines changed

packages/skin-database/app/(modern)/scroll/BottomMenuBar.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import {
44
Smartphone,
5-
Search,
65
Info,
76
Grid3x3,
87
Menu,
@@ -80,14 +79,6 @@ export default function BottomMenuBar() {
8079
setIsHamburgerOpen(false);
8180
}}
8281
/>
83-
<HamburgerMenuItem
84-
href="/upload"
85-
icon={<Upload size={20} />}
86-
label="Upload"
87-
onClick={() => {
88-
setIsHamburgerOpen(false);
89-
}}
90-
/>{" "}
9182
<HamburgerMenuItem
9283
href="/scroll/feedback"
9384
icon={<MessageSquare size={20} />}
@@ -147,12 +138,11 @@ export default function BottomMenuBar() {
147138
label="Feed"
148139
isActive={pathname.startsWith("/scroll/skin")}
149140
/>
150-
151141
<MenuButton
152-
href="/"
153-
icon={<Search size={24} />}
154-
label="Search"
155-
isActive={false}
142+
href="/upload"
143+
icon={<Upload size={24} />}
144+
label="Upload"
145+
isActive={pathname === "/upload"}
156146
/>
157147
<MenuButton
158148
icon={<Menu size={24} />}

packages/skin-database/app/(modern)/scroll/Grid.tsx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { useWindowSize } from "../../../legacy-client/src/hooks";
1414
import {
1515
SCREENSHOT_WIDTH,
1616
SKIN_RATIO,
17+
MOBILE_MAX_WIDTH,
1718
} from "../../../legacy-client/src/constants";
1819
import { getMuseumPageSkins, GridSkin } from "./getMuseumPageSkins";
1920

@@ -166,6 +167,55 @@ export default function SkinTable({
166167

167168
return (
168169
<div id="infinite-skins">
170+
{/* Floating Search Bar */}
171+
<div
172+
style={{
173+
position: "fixed",
174+
bottom: "5rem",
175+
left: "50%",
176+
transform: "translateX(-50%)",
177+
width: "calc(100% - 2rem)",
178+
maxWidth: MOBILE_MAX_WIDTH,
179+
padding: "0 1rem",
180+
zIndex: 998,
181+
}}
182+
>
183+
<form
184+
action="/"
185+
method="GET"
186+
style={{
187+
width: "100%",
188+
}}
189+
>
190+
<input
191+
type="search"
192+
name="q"
193+
placeholder="Search skins..."
194+
style={{
195+
width: "100%",
196+
padding: "0.75rem 1rem",
197+
fontSize: "1rem",
198+
backgroundColor: "rgba(26, 26, 26, 0.85)",
199+
backdropFilter: "blur(10px)",
200+
border: "1px solid rgba(255, 255, 255, 0.2)",
201+
borderRadius: "9999px",
202+
color: "#fff",
203+
outline: "none",
204+
fontFamily: "inherit",
205+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.3)",
206+
}}
207+
onFocus={(e) => {
208+
e.currentTarget.style.backgroundColor = "rgba(26, 26, 26, 0.95)";
209+
e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.3)";
210+
}}
211+
onBlur={(e) => {
212+
e.currentTarget.style.backgroundColor = "rgba(26, 26, 26, 0.85)";
213+
e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.2)";
214+
}}
215+
/>
216+
</form>
217+
</div>
218+
169219
<Grid
170220
ref={gridRef}
171221
itemKey={itemKey}

0 commit comments

Comments
 (0)