Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: blank.mjs — measure wrapped description text to position BUY button below it

Use text.box() to get actual wrapped height instead of hardcoded y=90,
so the button never overlaps the prose on narrow screens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+10 -4
+10 -4
system/public/aesthetic.computer/disks/blank.mjs
··· 179 179 } 180 180 181 181 function paint($) { 182 - const { wipe, ink, line, screen, dark: isDark, tri } = $; 182 + const { wipe, ink, line, screen, dark: isDark, tri, text } = $; 183 183 frame += 1; 184 184 const w = screen.width; 185 185 const h = screen.height; ··· 725 725 // Title + product description (painted on top of laptop wireframe) 726 726 ink(sr, sg, sb, shadowAlpha).write("AC Blank Laptop", { center: "x", y: 30 + shadowOff, size: 2, screen }); 727 727 ink(fg).write("AC Blank Laptop", { center: "x", y: 30, size: 2, screen }); 728 - ink(sr, sg, sb, shadowAlpha).write(DESCRIPTION_PLAIN, { center: "x", y: 54 + shadowOff, screen }, undefined, floor(w * 0.85)); 729 - ink(fgDim).write(DESCRIPTION, { center: "x", y: 54, screen }, undefined, floor(w * 0.85)); 728 + // Measure wrapped description to position buy button below it 729 + const descBounds = floor(w * 0.85); 730 + const descY = 54; 731 + const descBox = text.box(DESCRIPTION_PLAIN, { center: "x", y: descY, screen }, descBounds); 732 + const descBottom = descY + (descBox ? descBox.box.height : charH); 733 + 734 + ink(sr, sg, sb, shadowAlpha).write(DESCRIPTION_PLAIN, { center: "x", y: descY + shadowOff, screen }, undefined, descBounds); 735 + ink(fgDim).write(DESCRIPTION, { center: "x", y: descY, screen }, undefined, descBounds); 730 736 731 737 // Buy button — custom rendered in Unifont for larger, more active CTA 732 738 const $btn = { ink }; ··· 737 743 const boxW = buyText.length * unifontCharW + padX * 2; 738 744 const boxH = unifontH + padY * 2; 739 745 const boxX = floor((screen.width - boxW) / 2); 740 - const boxY = 90; // directly under the prose 746 + const boxY = descBottom + 6; // directly under the prose 741 747 buyBtn.btn.box.x = boxX; 742 748 buyBtn.btn.box.y = boxY; 743 749 buyBtn.btn.box.w = boxW;