mirror of
https://github.com/Patiun/com.gregkilmer.www.git
synced 2026-11-07 19:58:24 +00:00
TCGs
This commit is contained in:
@@ -234,6 +234,39 @@ It's idempotent — run it again any time you add games to the JSON.
|
||||
|
||||
---
|
||||
|
||||
## TCGs (Trading Card Games page)
|
||||
|
||||
The TCGs page (`src/pages/interests/tcgs.astro`) is hand-built, like the other
|
||||
interest pages. Two parts are data-driven:
|
||||
|
||||
- **The games I play** and **Proxy making** are inline frontmatter arrays of
|
||||
`{ icon, title, body }` — edit them directly on the page.
|
||||
- **Magic: The Gathering decks** are pulled **live from Archidekt** on the
|
||||
server (the site is SSR, so no CORS or API key is needed).
|
||||
|
||||
### Archidekt integration
|
||||
|
||||
`src/lib/archidekt.ts` fetches Greg's public decks from:
|
||||
|
||||
```
|
||||
GET https://archidekt.com/api/decks/v3/?ownerUsername=<username>
|
||||
```
|
||||
|
||||
- The username is the `ARCHIDEKT_USERNAME` export (currently `Patiun`). Change
|
||||
it there to point at a different account.
|
||||
- Results are cached to `node_modules/.cache/archidekt-<username>.json` for
|
||||
`CACHE_TTL_MS` (default **1 hour**) so repeat visits are instant and we're
|
||||
gentle on Archidekt. Tune the TTL via that export.
|
||||
- Only public, non-unlisted decks are shown. If Archidekt is unreachable, the
|
||||
section falls back to a "Manage on Archidekt" link — it never breaks the page.
|
||||
|
||||
Each deck renders as a `DeckCard` (featured card art, mana-color pips, card
|
||||
count, format, last-updated) linking to its Archidekt page. To add or remove
|
||||
decks, just change them on Archidekt — the page picks them up automatically
|
||||
(within the cache window).
|
||||
|
||||
---
|
||||
|
||||
## Interest pages
|
||||
|
||||
Each interest is a hand-built page in `src/pages/interests/`. They follow the
|
||||
|
||||
Reference in New Issue
Block a user