Expand website and game trackers
Some checks failed
Test and deploy staging / staging (push) Failing after 5m29s

This commit is contained in:
2026-09-25 22:43:04 +00:00
parent f6b34150d4
commit c2ba8febb4
4076 changed files with 97237 additions and 1453 deletions

View File

@@ -0,0 +1,15 @@
import releases from '../../../data/pokemon-releases.json';
import { base } from '$app/paths';
const dates: Record<string, string> = releases.dates;
export function pokemonRelease(slug: string | null) {
return dates[slug ?? ''] ?? '';
}
export function chronologicalPokemon<T extends { slug: string | null; id: number }>(games: T[]) {
return [...games].sort(
(a, b) => pokemonRelease(a.slug).localeCompare(pokemonRelease(b.slug)) || a.id - b.id
);
}
export function pokemonImage(number: number, kind: 'sprite' | 'shiny' | 'artwork' = 'sprite') {
return `${base}/game-art/pokemon/${kind}/${number}.webp`;
}