Files
gateway-gamers.net/sites/aos-rankings/README.md
T

59 lines
2.3 KiB
Markdown
Raw Normal View History

# aos-rankings.gateway-gamers.net
A Warhammer Age of Sigmar leaderboard for Gateway Gamers team members, ranked
by ITC points in an AoS league on Best Coast Pairings (BCP). It's a slimmer
copy of [40k-rankings](../40k-rankings/README.md), without the Lord Marshal
Conference and ELO columns.
## What it serves
A single page (`index.html`) with:
- **Team Leader card** showing the top-ranked member's name, ITC points, win
rate and global ITC rank.
- **Stat strip** with players placed, top ITC points, combined team win % and
the best league rank held by any member.
- **Sortable leaderboard**, one row per team member who has placed in the
league. Each row shows ITC points, WLT record and win % (with career
totals underneath) and ITC rank.
The page reads from BCP in the viewer's browser on every load. It caches the
last result in `localStorage` (`gg_aos_board_v1`) and shows that straight away
while the live data arrives. The **Refresh** button fetches again.
## Data sources
| Data | Source |
| --- | --- |
| Team roster | BCP `teams/{teamId}` |
| ITC points, rank, record | BCP `placings` for `leagueId`, filtered to `regionId` |
| Career WLT | BCP `placings?userId=…` for each member |
All calls go to `https://newprod-api.bestcoastpairings.com/v1` without
authentication. Nothing is stored on the server.
## Configuration
Everything you'd normally change is in the `CONFIG` block at the top of
`src/main.js`:
- `teamId`: the BCP team whose members are shown (the same team as 40k-rankings)
- `leagueId` / `regionId`: which AoS league and region to rank against
- `memberIds`: fallback roster, used if the team endpoint ever stops returning
members without auth
- `useSample`: set to `true` to render placeholder rows with no network calls
## Files
- `index.html`, `src/main.js`, `src/style.css`: the page
- `nav.html`: this site's header nav entries (see the root README)
- `aos-rankings.gateway-gamers.net.conf`: reference nginx config for the live
server block
## Deploy
`.gitea/workflows/deploy-aos-rankings.yml` builds the site and rsyncs `dist/`
to `/var/www/domains/gateway-gamers.net/aos-rankings/` on every push to `main`
that touches `sites/aos-rankings/` or `shared/`. See the root README for local
dev commands and the shared header, footer and images.