diff --git a/static/app.js b/static/app.js index 62c566b..77d6209 100644 --- a/static/app.js +++ b/static/app.js @@ -2665,8 +2665,8 @@ function rosterNav() { function roster() { const ordered = [...S.players].sort((a, b) => online(b) - online(a)); // stable: by donations within each - const view = (id, label) => ``; - return `
${view("cards", "▦ Cards")}${view("table", "☰ Table")}
` + const view = (id, icon, label) => ``; + return `
${view("cards", "▦", "Cards")}${view("table", "☰", "Table")}
` + (rosterView === "table" ? rosterTable(ordered) : rosterCards(ordered)); } @@ -2713,15 +2713,15 @@ function rosterTable(players) {
${crest(p.look, 30)}${presence(p)}
${rosterSub(p)}${lastSeen(p)}
${p.total} -
${rosterDoing(p)}${p.garrison ? `🛡️` : ""}${joinButton(p)}
+
${rosterDoing(p)}${p.garrison ? `🛡️` : ""}${joinButton(p)}
${skills.map((s) => { const lvl = p.levels[s.id]; return `${lvl}`; }).join("")} ${fmt(p.donated)}`).join(""); return `
- ${groups.map(([name, list]) => ``).join("")} - ${skills.map((s) => ``).join("")} + ${groups.map(([name, list]) => ``).join("")} + ${skills.map((s) => ``).join("")}${rows}
${esc(name)}
PlayerTotalDoing${s.icon}${FAVOUR}
${esc(name)}
PlayerTotalDoing${s.icon}${FAVOUR}
`; } diff --git a/static/styles.css b/static/styles.css index 9f655ee..d10784c 100644 --- a/static/styles.css +++ b/static/styles.css @@ -318,7 +318,8 @@ table.parts td:last-child { text-align: right; font-variant-numeric: tabular-num .ledger li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .ledger .when { color: var(--muted); font-size: 12px; display: block; } .ledger .got { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; } -.roster-views { margin-bottom: 14px; } +.tabs.sm.roster-views { justify-content: flex-end; margin: -6px 0 10px; } +.roster-views .tab { padding: 3px 9px; font-size: 15px; line-height: 1.2; } .avatar { position: relative; flex: none; line-height: 0; } .avatar .online { position: absolute; top: -2px; right: -4px; margin: 0; border: 2px solid var(--panel); box-sizing: content-box; } button.who { background: none; border: 0; padding: 0; font-weight: 700; text-align: left; } @@ -347,8 +348,6 @@ button.who { background: none; border: 0; padding: 0; font-weight: 700; text-ali .roster-table table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; } .roster-table th { color: var(--muted); font-weight: 600; padding: 6px 4px; font-size: 12px; } .roster-table th .gi { width: 15px; height: 15px; } -/* The player column stays put while the skills scroll on a phone. */ -.roster-table tbody td:first-child, .roster-table thead tr:last-child th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); } .roster-table th.grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); } .roster-table td { padding: 9px 4px; border-top: 1px solid var(--line); text-align: center; white-space: nowrap; } .roster-table tbody tr { cursor: pointer; } @@ -360,6 +359,13 @@ button.who { background: none; border: 0; padding: 0; font-weight: 700; text-ali .roster-table td.favour, .roster-table th.favour { text-align: right; } .who-cell, .roster-table .doing { display: flex; align-items: center; gap: 8px; } .who-cell { gap: 10px; min-width: 170px; } +/* Phone: crest and name only, no Doing column, so the skills get the room. */ +@media (max-width: 700px) { + .roster-table { padding: 4px 8px; } + .roster-table .doing-col, .who-cell .small { display: none; } + .who-cell { min-width: 0; gap: 6px; } + .roster-table td, .roster-table th { padding-left: 3px; padding-right: 3px; } +} /* --- character sheet -------------------------------------------------- */