);
}
```
**Step 3: Create the chapter page route**
Create `src/app/[game]/[chapter]/page.tsx`:
```tsx
import { notFound } from "next/navigation";
import { getAllGames, getGame, getChapter, getAdjacentChapters } from "@/lib/content";
import ChapterReader from "@/components/ChapterReader";
interface PageProps {
params: Promise<{ game: string; chapter: string }>;
}
export async function generateStaticParams() {
const games = getAllGames();
const paths: { game: string; chapter: string }[] = [];
for (const gameMeta of games) {
const game = getGame(gameMeta.slug);
for (const chapter of game.chapters) {
paths.push({ game: gameMeta.slug, chapter: chapter.slug });
}
}
return paths;
}
export async function generateMetadata({ params }: PageProps) {
const { game: gameSlug, chapter: chapterSlug } = await params;
try {
const game = getGame(gameSlug);
const chapter = getChapter(gameSlug, chapterSlug);
return {
title: `${chapter.title} - ${game.title} | Cronicas de los Reinos`,
description: `Capitulo ${chapter.number} de ${game.title}`,
};
} catch {
return { title: "No encontrado" };
}
}
export default async function ChapterPage({ params }: PageProps) {
const { game: gameSlug, chapter: chapterSlug } = await params;
try {
const game = getGame(gameSlug);
const chapter = getChapter(gameSlug, chapterSlug);
const { prev, next } = getAdjacentChapters(gameSlug, chapterSlug);
return (
);
} catch {
notFound();
}
}
```
**Step 4: Commit**
```bash
git add -A
git commit -m "feat: add chapter reader with reading progress bar and navigation"
```
---
### Task 6: Content - World of Warcraft (3 chapters)
**Files:**
- Create: `content/wow/01-origenes.mdx`
- Create: `content/wow/02-primera-guerra.mdx`
- Create: `content/wow/03-arthas-y-la-plaga.mdx`
**Step 1: Write WoW Chapter 1 - Origenes**
Create `content/wow/01-origenes.mdx` with frontmatter `title: "Los Origenes de Azeroth"` followed by ~600-800 words of narrative lore covering: the Titans discovering Azeroth, the ordering of the world, the Old Gods imprisoned beneath the surface, the creation of the Dragon Aspects, and the Well of Eternity.
**Step 2: Write WoW Chapter 2 - Primera Guerra**
Create `content/wow/02-primera-guerra.mdx` with frontmatter `title: "La Primera Guerra"` followed by ~600-800 words covering: the Orcs on Draenor, Medivh's corruption, the opening of the Dark Portal, the Orcish Horde invasion of Azeroth, the fall of Stormwind.
**Step 3: Write WoW Chapter 3 - Arthas y la Plaga**
Create `content/wow/03-arthas-y-la-plaga.mdx` with frontmatter `title: "Arthas y la Plaga"` followed by ~600-800 words covering: Prince Arthas Menethil, the plague of undeath at Stratholme, the journey to Northrend, Frostmourne, Arthas becoming the Lich King.
**Step 4: Verify chapters render**
Run: `npm run dev`
Navigate to http://localhost:3000/wow then click Chapter 1.
Expected: Full narrative text renders in e-reader style.
**Step 5: Commit**
```bash
git add -A
git commit -m "feat: add World of Warcraft lore chapters (origins, first war, arthas)"
```
---
### Task 7: Content - Ragnarok Online (3 chapters)
**Files:**
- Create: `content/ragnarok/01-creacion-de-midgard.mdx`
- Create: `content/ragnarok/02-guerra-de-los-dioses.mdx`
- Create: `content/ragnarok/03-heroes-de-rune-midgard.mdx`
**Step 1: Write Ragnarok Chapter 1 - Creacion de Midgard**
Create `content/ragnarok/01-creacion-de-midgard.mdx` with frontmatter `title: "La Creacion de Midgard"` followed by ~600-800 words covering: Odin and the gods, the creation of the world of Midgard, the Norse mythology roots, the Yggdrasil tree, the races of the world.
**Step 2: Write Ragnarok Chapter 2 - Guerra de los Dioses**
Create `content/ragnarok/02-guerra-de-los-dioses.mdx` with frontmatter `title: "La Guerra de los Dioses"` followed by ~600-800 words covering: the conflict between gods, the thousand-year war, Satan Morocc, the seal of the demons, the aftermath.
**Step 3: Write Ragnarok Chapter 3 - Heroes de Rune-Midgard**
Create `content/ragnarok/03-heroes-de-rune-midgard.mdx` with frontmatter `title: "Los Heroes de Rune-Midgard"` followed by ~600-800 words covering: the adventurers' guilds, the classes, the quest to prevent Ragnarok, the monsters and dungeons.
**Step 4: Commit**
```bash
git add -A
git commit -m "feat: add Ragnarok Online lore chapters (midgard, gods war, heroes)"
```
---
### Task 8: Content - MapleStory (3 chapters)
**Files:**
- Create: `content/maplestory/01-mundo-del-arce.mdx`
- Create: `content/maplestory/02-heroes-legendarios.mdx`
- Create: `content/maplestory/03-el-mago-negro.mdx`
**Step 1: Write MapleStory Chapter 1 - Mundo del Arce**
Create `content/maplestory/01-mundo-del-arce.mdx` with frontmatter `title: "El Mundo del Arce"` followed by ~600-800 words covering: Maple World geography (Victoria Island, Ossyria, etc.), the Maple Tree, the peaceful beginnings, the different peoples.
**Step 2: Write MapleStory Chapter 2 - Heroes Legendarios**
Create `content/maplestory/02-heroes-legendarios.mdx` with frontmatter `title: "Los Heroes Legendarios"` followed by ~600-800 words covering: the six heroes (Aran, Mercedes, Phantom, Luminous, Evan, Shade), their battle against the Black Mage, their sacrifice and freezing in time.
**Step 3: Write MapleStory Chapter 3 - El Mago Negro**
Create `content/maplestory/03-el-mago-negro.mdx` with frontmatter `title: "El Mago Negro"` followed by ~600-800 words covering: the origin of the Black Mage, his quest for ultimate power, the corruption, the Commanders of the Black Mage, the return.
**Step 4: Commit**
```bash
git add -A
git commit -m "feat: add MapleStory lore chapters (maple world, heroes, black mage)"
```
---
### Task 9: Content - Tales of Pirates (3 chapters)
**Files:**
- Create: `content/tales-of-pirates/01-el-mar-infinito.mdx`
- Create: `content/tales-of-pirates/02-islas-del-tesoro.mdx`
- Create: `content/tales-of-pirates/03-era-de-los-piratas.mdx`
**Step 1: Write Tales of Pirates Chapter 1 - El Mar Infinito**
Create `content/tales-of-pirates/01-el-mar-infinito.mdx` with frontmatter `title: "El Mar Infinito"` followed by ~600-800 words covering: the vast ocean world, the mysterious origins, the first sailors, the discovery of scattered islands.
**Step 2: Write Tales of Pirates Chapter 2 - Islas del Tesoro**
Create `content/tales-of-pirates/02-islas-del-tesoro.mdx` with frontmatter `title: "Las Islas del Tesoro"` followed by ~600-800 words covering: Argent City, the major islands, the treasures hidden across the seas, the legends of great pirates.
**Step 3: Write Tales of Pirates Chapter 3 - Era de los Piratas**
Create `content/tales-of-pirates/03-era-de-los-piratas.mdx` with frontmatter `title: "La Era de los Piratas"` followed by ~600-800 words covering: the rise of pirate crews, the class system, naval battles, the endless quest for glory.
**Step 4: Commit**
```bash
git add -A
git commit -m "feat: add Tales of Pirates lore chapters (sea, islands, pirate era)"
```
---
### Task 10: Tailwind Typography Plugin + Final Polish
**Files:**
- Modify: `package.json` (add @tailwindcss/typography)
- Modify: `tailwind.config.ts` (add typography plugin)
- Modify: `src/app/globals.css` (prose customizations)
**Step 1: Install typography plugin**
Run:
```bash
npm install @tailwindcss/typography
```
**Step 2: Add plugin to Tailwind config**
Add to `tailwind.config.ts` plugins array:
```ts
plugins: [require("@tailwindcss/typography")],
```
**Step 3: Add custom prose styles for the book feel**
Add to `src/app/globals.css`:
```css
@layer components {
.prose p:first-of-type::first-letter {
font-family: var(--font-playfair), serif;
font-size: 3.5em;
float: left;
line-height: 0.8;
margin-right: 0.1em;
margin-top: 0.1em;
color: #44403c;
}
}
```
**Step 4: Full build test**
Run: `npm run build`
Expected: Build succeeds with all static pages generated.
**Step 5: Run production preview**
Run: `npm run start`
Expected: All pages load correctly.
**Step 6: Commit**
```bash
git add -A
git commit -m "feat: add typography plugin and drop cap styling for book feel"
```
---
### Task 11: Responsive + Mobile Polish
**Files:**
- Modify: `src/components/BookShelf.tsx` (responsive grid)
- Modify: `src/components/BookSpine.tsx` (mobile sizing)
- Modify: `src/components/ChapterReader.tsx` (mobile padding)
**Step 1: Test on mobile viewport**
Open dev tools, test at 375px width.
Note any layout issues.
**Step 2: Fix any responsive issues**
Adjust components as needed: ensure books wrap on small screens, reading text has adequate padding on mobile, navigation is touch-friendly.
**Step 3: Final build verification**
Run: `npm run build && npm run start`
Expected: Clean build, all pages render correctly.
**Step 4: Commit**
```bash
git add -A
git commit -m "feat: responsive polish for mobile and tablet viewports"
```