Increase mobile web font size: target 50 cols instead of 80
At 320px viewport this gives 10px font instead of 6px, making the TUI readable on phones. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,12 +153,12 @@
|
|||||||
window.location.href = getStartUrl();
|
window.location.href = getStartUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-select font size for mobile to fit ~80 columns
|
// Auto-select font size for mobile to fit ~50 columns
|
||||||
(function() {
|
(function() {
|
||||||
var url = new URL(window.location.href);
|
var url = new URL(window.location.href);
|
||||||
if (!url.searchParams.has("fontsize") && window.innerWidth < 768) {
|
if (!url.searchParams.has("fontsize") && window.innerWidth < 768) {
|
||||||
// xterm char width is ~0.6 * fontSize; target 80 cols
|
// xterm char width is ~0.6 * fontSize; target 50 cols for readability
|
||||||
var fontSize = Math.max(6, Math.floor(window.innerWidth / (80 * 0.6)));
|
var fontSize = Math.max(8, Math.floor(window.innerWidth / (50 * 0.6)));
|
||||||
url.searchParams.set("fontsize", fontSize);
|
url.searchParams.set("fontsize", fontSize);
|
||||||
window.location.replace(url.toString());
|
window.location.replace(url.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user