Presentation sponsor card: a capped bio ends on a whole word with an ellipsis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,9 @@
|
||||
const tok = ref || (sp && sp.ref) || '';
|
||||
if (sp && sp.name && tok && !sp.own) {
|
||||
$('prHead').innerHTML = 'Shared with you by <b>' + esc(sp.name) + '</b>';
|
||||
$('prText').textContent = sp.bio ? sp.bio : 'They can help you get set up in a few minutes, and they will be your sponsor on every platform in the network.';
|
||||
// /api/sponsor caps the bio at 220 characters, so a capped bio ends mid-word: trim it back to a word and add an ellipsis
|
||||
const bio = sp.bio && sp.bio.length >= 220 ? sp.bio.slice(0, sp.bio.lastIndexOf(' ')).replace(/[\s,;:.—-]+$/, '') + '…' : sp.bio;
|
||||
$('prText').textContent = bio ? bio : 'They can help you get set up in a few minutes, and they will be your sponsor on every platform in the network.';
|
||||
$('prJoin').textContent = 'Join with ' + sp.name;
|
||||
$('prJoin').href = '/join/' + encodeURIComponent(tok) + '?v=wide';
|
||||
$('prIni').textContent = String(sp.name).replace(/^@/, '').slice(0, 1).toUpperCase() || '?';
|
||||
|
||||
@@ -86,6 +86,6 @@
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20261015a"></script><script src="/assets/presentation.js?v=20261015a"></script>
|
||||
<script src="/assets/common.js?v=20261015a"></script><script src="/assets/presentation.js?v=20261015b"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user