// A coach page, 5xyourteam.com/: the coach card (since, positions, picks started) and the team as trading cards. Public: // milestones only, never earnings or contact details. (async function () { FX.renderNav(''); FX.renderFooter(); const $ = FX.$, esc = FX.esc; const u = decodeURIComponent(location.pathname.replace(/^\/|\/$/g, '')); document.body.dataset.pageRef = u; // framed: new-tab sign-in and Get a Position links carry ?ref= (common.js) const d = await FX.getJSON('/api/coach?u=' + encodeURIComponent(u)); if (d.error) { $('cName').textContent = 'No coach by that name yet'; return; } $('cName').textContent = '@' + d.username; $('cSince').textContent = 'Coach since ' + FX.when(d.since); $('cStats').innerHTML = '
Positions' + FX.n(d.positions) + '
On the team' + FX.n(d.team.length) + '
Picks started' + FX.n(d.started) + '
'; $('cTeam').innerHTML = d.team.length ? d.team.map(x => FX.card(x)).join('') : '

Their first picks show here.

'; $('cJoin').href = d.joinUrl; $('cJoin').textContent = 'Join the network free under @' + d.username; FX.frameLinks(); })();