mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Switching a card from M to XL made it wider, enlarged the printer name and the thumbnail, and left everything else where it was. The AMS slot labels, temperatures, filament names, status text and every small button stayed pinned between 8 and 11 pixels -- under the smallest size used anywhere else in the app -- so a full-width card carried the same tiny text as the compact one. Browser zoom does not answer this: it enlarges the whole page and so preserves the very disparity being reported. The card root now carries ten custom properties derived from cardSize, and the 200 fixed sizes in its subtree reference them: text-[10px] becomes text-[length:var(--pc-t10,10px)], w-3 h-3 becomes w-[var(--pc-i3,0.75rem)]. L draws the body 20% larger and XL 40%, icons included, so the controls grow with the text instead of staying fiddly to hit. Custom properties rather than an em-based root font-size. Setting font-size on the card would silently reshape any text that declares no size of its own, and would break for portalled content. Each converted class names its old fixed value as the fallback, so anything rendering outside a card root is untouched -- which is what leaves the portalled temperature popover exactly as it is. Its four sites stay fixed on purpose, as does the page chrome; the conversion was scoped from the function declarations rather than line numbers, and afterwards only those four intended sites still hold a literal px value. S and M stay at 1.0. S is the dense fleet view where density is the point and M is the default, so an existing install looks identical until the user reaches for a size that is already asking for more room -- the same control the request asked this to follow. The AMS-HT card needed separate work, because its temperature and humidity readings sit beside the slot rather than under it. That single slot was the only growable item on its row, so it took every spare pixel and pushed the readings hard against the card's edge; it is now capped at roughly two ordinary slots, which keeps them clear at any card width. The card itself is capped at one full AMS card's width, so a unit that wraps onto a line of its own no longer stretches that slot across the whole card. The AMS slot minimums are deliberately NOT scaled. Raising them was tried and reverted: those cards already grow to fill their row, so 3.5rem is a floor they sit well above, and raising it only cost a unit its place on the row -- which is what pushed the AMS-HT onto a line by itself and exposed the stretching above. A test pins them at 3.5rem at XL so this reads as a decision rather than a missed spot.
41 lines
1.8 KiB
HTML
41 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<!-- L-4: Restrict Referer header to origin-only on cross-origin navigation so
|
|
sensitive tokens in query parameters are not leaked to third-party servers. -->
|
|
<meta name="referrer" content="strict-origin-when-cross-origin" />
|
|
<title>Bambuddy</title>
|
|
|
|
<!-- PWA Meta Tags -->
|
|
<meta name="description" content="Monitor and manage your Bambu Lab 3D printers" />
|
|
<meta name="theme-color" content="#00ae42" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="apple-mobile-web-app-title" content="Bambuddy" />
|
|
|
|
<!-- Manifest -->
|
|
<link rel="manifest" href="/manifest.json" />
|
|
|
|
<!-- Favicons -->
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png" />
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png" />
|
|
|
|
<!-- Splash screens for iOS -->
|
|
<link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
|
|
<script type="module" crossorigin src="/assets/index-B67xFyee.js"></script>
|
|
<link rel="stylesheet" crossorigin href="/assets/index-B3jj6-fz.css">
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
|
|
<!-- Service Worker Registration (skip on SpoolBuddy kiosk).
|
|
Kept as an external file so the CSP `script-src 'self'` covers it
|
|
without needing 'unsafe-inline' or per-build hashes. -->
|
|
<script src="/sw-register.js"></script>
|
|
</body>
|
|
</html>
|