summaryrefslogtreecommitdiff
path: root/yhttpd/src
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-03 23:49:13 +0300
committerPaul Buetow <paul@buetow.org>2026-07-03 23:49:13 +0300
commit64ba6d89c2adbc8fbb5a94425641565a7eb373f8 (patch)
tree0a8323551e5105fd8f9954b094379c6601555940 /yhttpd/src
parentb8faffb5e57f92654e801c44628ba12f1815d4a5 (diff)
ychat: make the chat UI mobile-friendly (task is0)
frameset.html used a classic HTML <frameset> (cols=*,150 / rows=*,0) to split the screen into message stream, userlist, and input areas. Framesets can't reflow via CSS media queries (cols/rows are fixed HTML attributes, not CSS) and are deprecated/unreliable in modern mobile browsers, making this the main mobile blocker. Replaced it with named iframes inside a flexbox layout (style.css: body.chatlayout and friends) — named iframes still expose the same window.<name> access the existing JS relies on (parent.stream.autoscroll()/stopscroll()), so no JS changes were needed. A media query restacks the userlist below the stream and grows the input row's height on narrow viewports instead of it eating ~40% of a phone's width as a fixed side column. Other mobile fixes: - Added <meta name="viewport"> to every template (was missing everywhere). - style.css: capped .text input width (size=60/40 attributes overflowed a ~375px screen; CSS width wins over the size attribute so one rule fixes every such field), set 16px input font-size to stop iOS Safari's auto-zoom-on-focus, gave submit/button inputs larger tap targets, and let wide tables (color picker, admin/help content) scroll horizontally instead of blowing out the page width. - input.html: replaced the two position:absolute control rows (fixed pixel offsets, no reflow) with wrapping flexbox rows (.input-row/.input-links) so the message box and action links stack on narrow screens. Verified by building the Dockerfile image, running it, registering/logging in a test user via curl, and confirming the *served* (token-substituted) HTML for index.html, register.html, frameset.html, and the stream/online/ input frames it references all contain the viewport meta tag and new CSS classes, with %%tmpid%% correctly substituted in iframe src URLs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'yhttpd/src')
0 files changed, 0 insertions, 0 deletions