Skip to content

Commit a101a3c

Browse files
committed
tried to fix replies on mobile
1 parent 835fad3 commit a101a3c

File tree

1 file changed

+120
-7
lines changed

1 file changed

+120
-7
lines changed

index.html

Lines changed: 120 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,60 @@
185185
.reply-indicator {
186186
bottom: calc(80px + env(safe-area-inset-bottom, 0px));
187187
padding: 6px 15px;
188+
margin: 0 10px;
189+
border-radius: 4px;
190+
left: 0;
191+
right: 0;
188192
}
189193

190194
.reply-indicator-content {
191195
font-size: 11px;
196+
line-height: 1.3;
197+
overflow: hidden;
198+
}
199+
200+
.reply-indicator-text {
201+
max-width: 180px;
202+
white-space: nowrap;
203+
overflow: hidden;
204+
text-overflow: ellipsis;
205+
display: inline-block;
206+
vertical-align: bottom;
192207
}
193208

194209
.cancel-reply {
195210
font-size: 11px;
211+
padding: 4px 8px;
212+
min-height: 28px;
213+
min-width: 28px;
214+
border-radius: 3px;
215+
flex-shrink: 0;
216+
}
217+
218+
.cancel-reply:active {
219+
transform: scale(0.95);
220+
}
221+
}
222+
223+
@media (max-width: 480px) {
224+
.reply-indicator {
225+
margin: 0 5px;
226+
padding: 5px 12px;
227+
}
228+
229+
.reply-indicator-content {
230+
font-size: 10px;
231+
}
232+
233+
.reply-indicator-text {
234+
max-width: 120px;
235+
}
236+
237+
.cancel-reply {
238+
font-size: 10px;
196239
padding: 3px 6px;
240+
min-height: 24px;
241+
min-width: 24px;
197242
}
198243
}
199244

@@ -292,21 +337,25 @@
292337
margin-bottom: 5px;
293338
line-height: 1.4;
294339
display: flex;
295-
align-items: center;
296-
gap: 8px;
340+
flex-direction: column;
341+
align-items: stretch;
342+
gap: 3px;
297343
position: relative;
298344
}
299345

300346
.message-content {
301347
flex: 1;
348+
display: flex;
349+
align-items: center;
350+
gap: 8px;
351+
padding-right: 50px; /* Leave space for reply button */
302352
}
303353

304354
.reply-button {
305355
display: none;
306356
position: absolute;
307-
right: 40px;
308-
top: 50%;
309-
transform: translateY(-50%);
357+
right: 10px;
358+
bottom: 8px;
310359
color: #00ff00;
311360
opacity: 0.6;
312361
cursor: pointer;
@@ -315,6 +364,7 @@
315364
border: 1px solid transparent;
316365
background: rgba(0, 17, 0, 0.8);
317366
transition: opacity 0.2s, border-color 0.2s;
367+
border-radius: 3px;
318368
}
319369

320370
.message:hover .reply-button {
@@ -330,9 +380,30 @@
330380
@media (max-width: 768px) {
331381
.reply-button {
332382
display: block;
333-
opacity: 0.4;
383+
opacity: 0.6;
334384
font-size: 10px;
335-
right: 20px;
385+
right: 15px;
386+
padding: 4px 6px;
387+
min-height: 24px;
388+
min-width: 40px;
389+
background: rgba(0, 17, 0, 0.9);
390+
border-radius: 3px;
391+
}
392+
393+
.reply-button:active {
394+
opacity: 1;
395+
background: rgba(0, 255, 0, 0.2);
396+
transform: scale(0.95);
397+
}
398+
}
399+
400+
@media (max-width: 480px) {
401+
.reply-button {
402+
font-size: 9px;
403+
right: 10px;
404+
padding: 3px 5px;
405+
min-height: 22px;
406+
min-width: 35px;
336407
}
337408
}
338409

@@ -366,6 +437,48 @@
366437
vertical-align: bottom;
367438
}
368439

440+
/* Mobile reply preview improvements */
441+
@media (max-width: 768px) {
442+
.reply-preview {
443+
margin-bottom: 5px;
444+
padding-left: 8px;
445+
display: block;
446+
width: 100%;
447+
}
448+
449+
.reply-preview .reply-text {
450+
max-width: calc(100vw - 100px);
451+
font-size: 11px;
452+
display: block;
453+
margin-top: 2px;
454+
}
455+
456+
.reply-preview .reply-nick {
457+
font-size: 11px;
458+
display: inline-block;
459+
}
460+
461+
/* Mobile-specific adjustments */
462+
.message-content {
463+
padding-right: 45px; /* Slightly less space needed on mobile */
464+
}
465+
}
466+
467+
@media (max-width: 480px) {
468+
.reply-preview .reply-text {
469+
max-width: calc(100vw - 80px);
470+
font-size: 10px;
471+
}
472+
473+
.reply-preview .reply-nick {
474+
font-size: 10px;
475+
}
476+
477+
.message-content {
478+
padding-right: 35px; /* Less space needed on very small screens */
479+
}
480+
}
481+
369482
.message.highlight {
370483
animation: messageHighlight 2s ease-out;
371484
}

0 commit comments

Comments
 (0)