How d-joz/pokedex works
Purpose and Entry Points
This is a static Pokémon gallery intended for GitHub Pages. index.html is the primary gallery entry point; individual type pages such as fire.html, water.html, and psychic.html provide filtered or themed views. Styling is loaded from style.css, card.css, and colors.css.
Generated Static-Site Model
The published site is pre-rendered HTML rather than an application with a server or client data layer. Pokémon card markup is repeated/generated into static pages, allowing direct hosting with no runtime API calls. Key outputs include:
• index.html
• fire.html
• dragon.html
Shared Presentation Layer
CSS separates global page layout, card structure, and palette/type colors:
• style.css defines overall document and gallery presentation.
• card.css defines reusable Pokémon card visuals.
• colors.css centralizes color choices, likely including type-associated colors.
This establishes a boundary between generated content markup and reusable visual design.
Data Acquisition and Local Dataset
Generation source data is stored locally in script/pokemons.json. script/generate_data.js is the data-ingestion stage intended to fetch Pokémon information from PokeAPI, likely handling the multiple requests and rate-limit pacing described in the README.
External dependency:
• PokeAPI (https://pokeapi.co/) during offline/build-time data collection.
No external API dependency is required when visitors load the published pages.
Page Generation Pipeline
script/generate_page.js is the build stage that transforms local Pokémon data into static HTML pages. It is driven by templates:
• script/index_template.html
• script/type_template.html
• script/card_template.html
The likely flow is: PokeAPI → script/generate_data.js → script/pokemons.json → script/generate_page.js + templates → root-level HTML gallery/type pages.
Templates and Content Boundaries
The generator/template directory is intentionally separate from deployable page assets:
• script/card_template.html supplies the repeated card unit.
• script/index_template.html supplies the all-Pokémon page shell.
• script/type_template.html supplies type-page shells.
script/backup.html appears to be a saved/generated reference artifact rather than a primary runtime entry point. bug.html and the other root type pages are generated site deliverables.
Runtime and Deployment
The site runtime is a browser serving plain HTML and CSS; it has no indicated framework, package manager, backend, or database. Build scripts are JavaScript and the README explicitly suggests Deno, though the repository does not expose runtime metadata. Deployment target is GitHub Pages, with index.html required as the hosting entry point.
Main entry points: generate_page.js Page generator · index.html Main gallery · fire.html Type galleries · style.css Global styles
Components 15
Offline generation
Local data collection and static-page generation.
- Data generator · Fetches and prepares Pokémon records.
script/generate_data.js - Pokémon dataset · Local source data for page generation.
script/pokemons.json - Page generator · Renders dataset records into static HTML.
script/generate_page.js
Templates
Reusable HTML shells and card markup.
- Gallery template
script/index_template.html - Type-page template
script/type_template.html - Card template · Repeated Pokémon card markup.
script/card_template.html
Published static site
Files deployed for browser-only rendering.
- Main gallery · GitHub Pages entry point.
index.html - Type galleries · Generated filtered or themed pages.
fire.html - Dragon gallery · One generated type-page output.
dragon.html - Global styles · Document and gallery layout.
style.css - Card styles · Reusable card presentation.
card.css - Type colors · Shared palette and type-associated colors.
colors.css
Other components
- PokeAPI · Used only during offline data collection.
- Browser · Renders HTML and CSS with no runtime API calls.
- GitHub Pages · Deploys the generated site.
Connections 19
- PokeAPI → Data generator: build-time fetch
- Data generator → Pokémon dataset: writes
- Pokémon dataset → Page generator: input
- Gallery template → Page generator: page shell
- Type-page template → Page generator: type shells
- Card template → Page generator: card markup
- Page generator → Main gallery: generates
- Page generator → Type galleries: generates
- Page generator → Dragon gallery: generates
- Global styles → Main gallery: styles
- Card styles → Main gallery: styles
- Type colors → Main gallery: styles
- Global styles → Type galleries: styles
- Card styles → Type galleries: styles
- Type colors → Type galleries: styles
- Main gallery → GitHub Pages: deployed
- Type galleries → GitHub Pages: deployed
- Dragon gallery → GitHub Pages: deployed
- GitHub Pages → Browser: serves