Storyline: add the Prologue chapter, extend the layout for sessions

Chapters now carry an eyebrow ("Overview", "Prologue", ...) and a short
tag for the list/sidebar badge, instead of a bare running number, so
non-numbered entries read correctly.

New chapter: "Prologue - The Long Road to Brackenford", the session
outline formatted as a runnable document -- an at-a-glance metadata band
(levels, duration, locations, hook), the in-world courier notice as a
posted handout, numbered scenes, GM callouts for the "ask the players"
prompts, label/body rows for the skill-check clues and travel-day
prompts, a three-stage encounter block, dramatic beat lines, and a
before/after panel for the legend the party's own retelling becomes.
Cross-links the Hearthburrow to Enemies and the closing line to the
overview's "Five and the Five".

Tests: render every chapter partial headless (no HTTP/DB) so a broken
variable or path() fails loudly, check each registered chapter has its
template file, and assert the /storyline routes sit behind the login gate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-08 18:19:07 +02:00
co-authored by Claude Sonnet 5
parent 7fbf6f1569
commit 56f4641564
7 changed files with 480 additions and 7 deletions
+14 -2
View File
@@ -15,14 +15,27 @@ class StorylineController extends AbstractController
* Twig partial under templates/storyline/chapters/. Add a chapter by adding
* a row here and the matching template; order in this array is reading order.
*
* @var array<string, array{title: string, summary: string, template: string}>
* - eyebrow: the kicker shown above the chapter title ("Overview", "Prologue",
* "Session 1", ...)
* - tag: 1-2 characters for the little badge in the chapter list / sidebar
*
* @var array<string, array{title: string, eyebrow: string, tag: string, summary: string, template: string}>
*/
private const CHAPTERS = [
'overview' => [
'title' => 'Campaign Overview',
'eyebrow' => 'Overview',
'tag' => 'Ov',
'summary' => 'The whole shape of the Brackenford campaign, from the sealing of Kyuss four centuries ago to the final crisis — the truth behind the blood, the red herring around Sir Aldren, and how it can resolve.',
'template' => 'storyline/chapters/overview.html.twig',
],
'prologue-the-long-road' => [
'title' => 'Prologue — The Long Road to Brackenford',
'eyebrow' => 'Prologue',
'tag' => 'Pr',
'summary' => "The courier job that carries the party to Brackenford: hired in Bellhaven to deliver Edric Vale's estate to his nephew Eamon, twenty days on the road, and one night in a guest cottage that won't let anyone sleep. Levels 1 to 2, about 2.5 hours.",
'template' => 'storyline/chapters/prologue-the-long-road.html.twig',
],
];
#[Route('/storyline', name: 'app_storyline', methods: ['GET'])]
@@ -46,7 +59,6 @@ class StorylineController extends AbstractController
return $this->render('storyline/chapter.html.twig', [
'chapters' => self::CHAPTERS,
'slug' => $slug,
'number' => $pos + 1,
'chapter' => self::CHAPTERS[$slug],
'prev' => $pos > 0 ? $slugs[$pos - 1] : null,
'next' => $pos < \count($slugs) - 1 ? $slugs[$pos + 1] : null,