Skip to content

Commit 7400aff

Browse files
committed
Improved mobile UX
1 parent 1cc53e8 commit 7400aff

File tree

2 files changed

+123
-2
lines changed

2 files changed

+123
-2
lines changed

src/public/css/style.css

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
body {
32
margin: 0;
43
margin-bottom: 25px;
@@ -199,3 +198,124 @@ code, .filepath, .app-info {
199198
background-color: #d9edf7;
200199
border-color: #4083a3;
201200
}
201+
202+
/* Form styles */
203+
.form-section {
204+
width: 100%;
205+
max-width: 600px;
206+
margin: 0 auto;
207+
padding: 1rem;
208+
box-sizing: border-box;
209+
}
210+
211+
.form-row {
212+
display: flex;
213+
flex-direction: row;
214+
align-items: center;
215+
margin-bottom: 1rem;
216+
gap: 1rem;
217+
width: 100%;
218+
}
219+
220+
.form-row label {
221+
flex: 0 0 150px;
222+
text-align: right;
223+
}
224+
225+
.form-row input[type="text"] {
226+
flex: 1;
227+
min-width: 0;
228+
padding: 0.5rem;
229+
border: 1px solid #ccc;
230+
border-radius: 4px;
231+
width: 100%;
232+
box-sizing: border-box;
233+
}
234+
235+
.home-search-input,
236+
.home-search-distro-input {
237+
width: 100% !important;
238+
box-sizing: border-box;
239+
margin: 0;
240+
}
241+
242+
.search-btn {
243+
background-color: #03c;
244+
color: white;
245+
padding: 0.75rem 1.5rem;
246+
border: none;
247+
border-radius: 4px;
248+
cursor: pointer;
249+
font-size: 1rem;
250+
}
251+
252+
.search-btn:hover {
253+
background-color: #02a;
254+
}
255+
256+
.checkbox-container {
257+
display: flex;
258+
align-items: center;
259+
gap: 0.5rem;
260+
}
261+
262+
/* Mobile responsive styles */
263+
@media screen and (max-width: 768px) {
264+
.form-row {
265+
flex-direction: column;
266+
align-items: stretch;
267+
gap: 0.5rem;
268+
width: 100%;
269+
margin: 0 0 1rem 0;
270+
}
271+
272+
.form-row label {
273+
flex: none;
274+
text-align: left;
275+
margin-bottom: 0.25rem;
276+
width: 100%;
277+
}
278+
279+
.form-row input[type="text"] {
280+
width: 100%;
281+
margin: 0;
282+
}
283+
284+
.form-section {
285+
padding: 0.5rem;
286+
width: 100%;
287+
}
288+
289+
.search-btn {
290+
width: 100%;
291+
}
292+
293+
.alert {
294+
margin: 0.5rem;
295+
padding: 0.75rem 1rem;
296+
}
297+
298+
.checkbox-container {
299+
margin-left: 0;
300+
width: 100%;
301+
}
302+
303+
body {
304+
background-size: contain;
305+
}
306+
}
307+
308+
/* Small mobile devices */
309+
@media screen and (max-width: 480px) {
310+
body {
311+
font-size: 14px;
312+
}
313+
314+
.form-section {
315+
padding: 0.25rem;
316+
}
317+
318+
.form-row input[type="text"] {
319+
padding: 0.75rem;
320+
}
321+
}

src/views/index.tt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<% USE Math; %>
2+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
23
<div align="center" class="home">
34
<a href="/" class="big-logo" alt="meta::cpan"></a>
45
<div class="form-section">
@@ -21,7 +22,7 @@
2122
<!-- Only Search In Distro -->
2223
<div class="form-row">
2324
<label for="only-files-input">Search only in Distro:</label>
24-
<input type="text" name="qd" size="35" id="qd" class="form-control home-search-distro-input optional-input" placeholder="MyDistro, ^App-.*" title="search in distro">
25+
<input type="text" name="qd" id="qd" class="form-control home-search-distro-input optional-input" placeholder="MyDistro, ^App-.*" title="search in distro">
2526
</div>
2627

2728
<!-- Ignore Files -->

0 commit comments

Comments
 (0)