diff --git a/views/stats.ejs b/views/stats.ejs index 9b46da9..27a26a3 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -14,14 +14,24 @@ .chart .ax { fill:var(--pico-muted-color); font-size:10px; } .tip { position:absolute; pointer-events:none; background:var(--pico-card-background-color); border:1px solid var(--pico-muted-border-color); border-radius:8px; padding:.25rem .5rem; font-size:.8rem; box-shadow:0 4px 12px rgba(0,0,0,.35); white-space:nowrap; display:none; z-index:5; } - .boards { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:1rem; } + .boards { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:1rem; } .board { border:1px solid var(--pico-muted-border-color); border-radius:12px; padding:.6rem .8rem; } .board h4 { margin:0 0 .3rem; font-size:.95rem; } - .board table { margin:0; font-size:.85rem; } - .board td, .board th { padding:.2rem .35rem; } - .board td.n { text-align:right; font-variant-numeric:tabular-nums; } - .board td.r { width:1.6em; color:var(--pico-muted-color); } - .board a { text-decoration:none; } + .board ol { list-style:none; margin:0; padding:0; } + .board li { list-style:none; display:grid; grid-template-columns:1.6rem minmax(0, 1fr) var(--nw, 4.6rem); align-items:center; gap:.5rem; + height:2rem; margin:0; padding:0 .2rem; border-bottom:1px solid var(--pico-muted-border-color); font-size:.88rem; } + .board li:last-child { border-bottom:0; } + .board .r { color:var(--pico-muted-color); text-align:right; font-variant-numeric:tabular-nums; } + .board .who { display:flex; align-items:center; gap:.4rem; min-width:0; } + .board .who a { text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; } + .board .lvl { flex:none; font-size:.66rem; padding:.02rem .45rem; border-radius:99px; border:1px solid var(--pico-muted-border-color); + color:var(--pico-muted-color); white-space:nowrap; } + .board .n { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; } + /* points: the main board, twice as wide, level in its own column so the pills line up */ + .board.wide { grid-column:span 2; } + .board.wide li { grid-template-columns:1.6rem minmax(0, 1fr) 8.5rem var(--nw, 4.6rem); } + .board.wide .lvl { justify-self:start; } + @media (max-width: 700px) { .board.wide { grid-column:auto; } } .emotes { display:flex; flex-wrap:wrap; gap:.5rem; } .emote { display:flex; align-items:center; gap:.35rem; border:1px solid var(--pico-muted-border-color); border-radius:99px; padding:.15rem .6rem .15rem .25rem; font-size:.8rem; } .emote img { width:26px; height:26px; object-fit:contain; } @@ -89,20 +99,22 @@
nothing yet
| ${i + 1} | ${(r.name || r.login || '?').replace(/[<>&"]/g, '')}${extra ? ` ` : ''} | ${fmt(r.n)} |