diff --git a/public/assets/my.js b/public/assets/my.js index 53c7cf3..c780560 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -69,11 +69,11 @@ } // achievement badges: the milestone ladder as unlockable medals + share-to-image - const BADGES = [ // ribbonY = vertical center of each badge's name ribbon (art differs per tier) - { key: 'payouts', label: 'Spark', sub: 'payouts on', img: '/badges/badge-spark.jpg', ribbonY: 0.728 }, - { key: 'firstBuyer', label: 'Surge', sub: 'first qualifying buyer', img: '/badges/badge-surge.jpg?v=2', ribbonY: 0.76 }, - { key: 'level2', label: 'Circuit', sub: '2 qualifying buyers', img: '/badges/badge-circuit.jpg?v=2', ribbonY: 0.72 }, - { key: 'level3', label: 'Nexus', sub: 'fully qualified', img: '/badges/badge-nexus.jpg?v=2', ribbonY: 0.73 } + const BADGES = [ // ribbonY = vertical center of the member's name: the clear band between the art's body line and the footer bar (all four share it) + { key: 'payouts', label: 'Spark', sub: 'payouts on', img: '/badges/badge-spark.jpg', ribbonY: 0.873 }, + { key: 'firstBuyer', label: 'Surge', sub: 'first qualifying buyer', img: '/badges/badge-surge.jpg?v=2', ribbonY: 0.873 }, + { key: 'level2', label: 'Circuit', sub: '2 qualifying buyers', img: '/badges/badge-circuit.jpg?v=2', ribbonY: 0.873 }, + { key: 'level3', label: 'Nexus', sub: 'fully qualified', img: '/badges/badge-nexus.jpg?v=2', ribbonY: 0.873 } ]; let lastMilestones = []; function renderBadges(d) { @@ -116,7 +116,9 @@ x.drawImage(img, 0, 0); if (who) { x.textAlign = 'center'; x.textBaseline = 'middle'; - x.font = 'bold ' + Math.round(c.width * 0.055) + 'px Sora, "Segoe UI", sans-serif'; + let fs = Math.round(c.width * 0.052); // the name sits in the clear band under the art's own text (Marty 2026-10-18: it overlapped ACHIEVEMENT UNLOCKED) + x.font = 'bold ' + fs + 'px Sora, "Segoe UI", sans-serif'; + while (fs > 20 && x.measureText(who).width > c.width * 0.8) { fs -= 2; x.font = 'bold ' + fs + 'px Sora, "Segoe UI", sans-serif'; } const y = c.height * (b.ribbonY || 0.75); x.lineJoin = 'round'; x.lineWidth = Math.max(3, Math.round(c.width * 0.008)); x.strokeStyle = 'rgba(4,20,15,.9)'; x.strokeText(who, c.width / 2, y); diff --git a/public/my.html b/public/my.html index bf55560..32cf90d 100644 --- a/public/my.html +++ b/public/my.html @@ -1012,7 +1012,7 @@ - +