Skip to content

Commit a7a2058

Browse files
Refactor: Improve Home page authentication form styling
Improved the styling and layout of the authentication form on the Home page using custom CSS instead of Material UI components. This provides a more visually appealing and consistent design, enhancing user experience. The changes include a custom-styled form with updated colors, rounded corners, shadows, and improved spacing. The form elements are now styled individually for greater control and visual consistency.
1 parent 4c5a5c1 commit a7a2058

File tree

1 file changed

+94
-23
lines changed

1 file changed

+94
-23
lines changed

src/pages/Home/Home.tsx

Lines changed: 94 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -142,30 +142,101 @@ const Home: React.FC = () => {
142142
}}
143143
>
144144
{/* Authentication Form */}
145-
<Paper elevation={1} sx={{ p: 2, mb: 4 }}>
146-
<form onSubmit={handleSubmit}>
147-
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap" }}>
148-
<TextField
149-
label="GitHub Username"
150-
value={username}
151-
onChange={(e) => setUsername(e.target.value)}
152-
required
153-
sx={{ flex: 1 }}
154-
/>
155-
<TextField
156-
label="Personal Access Token"
157-
value={token}
158-
onChange={(e) => setToken(e.target.value)}
159-
type="password"
160-
required
161-
sx={{ flex: 1 }}
162-
/>
163-
<Button type="submit" variant="contained" sx={{ minWidth: "120px",borderRadius: "8px" }}>
164-
Fetch Data
165-
</Button>
166-
</Box>
145+
<div
146+
style={{
147+
marginBottom: "2.5rem",
148+
padding: "2.5rem 2rem",
149+
borderRadius: "22px",
150+
background: "rgba(255,255,255,0.18)",
151+
boxShadow: "0 8px 32px 0 rgba(31,38,135,0.18)",
152+
backdropFilter: "blur(12px)",
153+
WebkitBackdropFilter: "blur(12px)",
154+
border: "1.5px solid rgba(255,255,255,0.25)",
155+
display: "flex",
156+
flexDirection: "column",
157+
alignItems: "center",
158+
maxWidth: "370px",
159+
marginLeft: "auto",
160+
marginRight: "auto",
161+
}}
162+
>
163+
<form
164+
onSubmit={handleSubmit}
165+
style={{
166+
width: "100%",
167+
display: "flex",
168+
flexDirection: "column",
169+
gap: "1.3rem",
170+
}}
171+
autoComplete="off"
172+
>
173+
<h2
174+
style={{
175+
margin: 0,
176+
marginBottom: "1.2rem",
177+
color: "#232946",
178+
fontWeight: 700,
179+
letterSpacing: "1px",
180+
textAlign: "center",
181+
textShadow: "0 2px 8px rgba(0,0,0,0.07)",
182+
}}
183+
>
184+
GitHub Login
185+
</h2>
186+
<input
187+
type="text"
188+
placeholder="GitHub Username"
189+
value={username}
190+
onChange={(e) => setUsername(e.target.value)}
191+
required
192+
style={{
193+
padding: "0.85rem 1rem",
194+
borderRadius: "10px",
195+
border: "none",
196+
background: "rgba(255,255,255,0.35)",
197+
fontSize: "1rem",
198+
outline: "none",
199+
boxShadow: "0 2px 8px rgba(31,38,135,0.07)",
200+
color: "#232946",
201+
}}
202+
/>
203+
<input
204+
type="password"
205+
placeholder="Personal Access Token"
206+
value={token}
207+
onChange={(e) => setToken(e.target.value)}
208+
required
209+
style={{
210+
padding: "0.85rem 1rem",
211+
borderRadius: "10px",
212+
border: "none",
213+
background: "rgba(255,255,255,0.35)",
214+
fontSize: "1rem",
215+
outline: "none",
216+
boxShadow: "0 2px 8px rgba(31,38,135,0.07)",
217+
color: "#232946",
218+
}}
219+
/>
220+
<button
221+
type="submit"
222+
style={{
223+
padding: "0.9rem 1rem",
224+
borderRadius: "10px",
225+
border: "none",
226+
background: "linear-gradient(90deg, #6a82fb 0%, #fc5c7d 100%)",
227+
color: "#fff",
228+
fontWeight: 600,
229+
fontSize: "1.1rem",
230+
cursor: "pointer",
231+
boxShadow: "0 2px 8px rgba(31,38,135,0.07)",
232+
transition: "background 0.2s",
233+
letterSpacing: "0.5px",
234+
}}
235+
>
236+
Fetch Data
237+
</button>
167238
</form>
168-
</Paper>
239+
</div>
169240

170241
{/* Filters Section */}
171242
<Box

0 commit comments

Comments
 (0)