refactor: replace hardcoded hex colors with theme tokens, move data/ to root
- Add --color-green-mid token (#4a7a55) to @theme for dimmer stat values
- Replace all text-[#hex]/bg-[#hex] arbitrary values with named tokens:
text-green, text-green-light, text-green-sec, text-green-muted,
text-green-dark, text-green-mid, text-text, bg-card, bg-bg, border-border
- Replace rgba(34,197,94,X) inline styles with bg-green/X opacity modifiers
- Convert single-prop style={{ borderColor/background }} to className
- Fix SVG stroke="#dff5e8" → stroke="currentColor"
- Use CSS variables in globals.css base styles (background-color, color)
- Move app/data/wikipedia/ → data/ (project root, not inside Next.js app dir)
- Update Dockerfile, seed.ts, scrape-wikipedia.ts paths accordingly
- Remove unused app/data/world_cup.csv
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Scrape English Wikipedia for World Cup data and write JSON files to
|
||||
* app/data/wikipedia/{year}/.
|
||||
* data/wikipedia/{year}/.
|
||||
*
|
||||
* Usage:
|
||||
* pnpm scrape # all years, matches + squads
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from '../lib/wiki-scraper'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const DATA_DIR = path.join(__dirname, '../app/data/wikipedia')
|
||||
const DATA_DIR = path.join(__dirname, '../data/wikipedia')
|
||||
|
||||
const YEARS = [
|
||||
1930,1934,1938,1950,1954,1958,1962,1966,1970,1974,
|
||||
@@ -95,7 +95,7 @@ async function main() {
|
||||
console.log()
|
||||
}
|
||||
|
||||
console.log('\nDone! Files written to app/data/wikipedia/{year}/')
|
||||
console.log('\nDone! Files written to data/wikipedia/{year}/')
|
||||
}
|
||||
|
||||
main().catch(e => { console.error(e); process.exit(1) })
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import { normalizeTeam } from '../lib/wiki-scraper'
|
||||
|
||||
const DATABASE_URL = process.env.DATABASE_URL ?? 'postgres://wc:wc@localhost:5432/worldcup'
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const WC_DIR = path.join(__dirname, '../app/data/wikipedia')
|
||||
const WC_DIR = path.join(__dirname, '../data/wikipedia')
|
||||
|
||||
const YEARS = [
|
||||
1930,1934,1938,1950,1954,1958,1962,1966,1970,1974,
|
||||
|
||||
Reference in New Issue
Block a user