Badges: member name moves to the clear band under the art's text (it overlapped ACHIEVEMENT UNLOCKED); long names shrink to fit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+8
-6
@@ -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);
|
||||
|
||||
+1
-1
@@ -1012,7 +1012,7 @@
|
||||
<script src="/assets/tools.js?v=20261011a"></script>
|
||||
<script src="/assets/wallet.js?v=20261018a"></script>
|
||||
<script src="/assets/promo.js?v=20261009b"></script>
|
||||
<script src="/assets/my.js?v=20261018a"></script>
|
||||
<script src="/assets/my.js?v=20261018b"></script>
|
||||
<script src="/assets/chat.js?v=20261016a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user