Files
dmtools/templates/storyline/chapter.html.twig
T
FrankandClaude Sonnet 5 56f4641564 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>
2026-09-08 18:19:07 +02:00

52 lines
2.4 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}{{ chapter.title }} · Storyline · dmtools{% endblock %}
{% block body %}
<div class="row g-4 storyline-layout">
<nav class="col-lg-3 order-lg-2">
<div class="storyline-toc">
<a href="{{ path('app_storyline') }}" class="text-decoration-none small d-inline-block mb-2">&larr; All chapters</a>
<div class="text-uppercase small text-body-secondary fw-semibold mb-2" style="letter-spacing:.08em">Chapters</div>
<ol class="list-unstyled mb-0">
{% for s, c in chapters %}
<li>
<a href="{{ path('app_storyline_chapter', {slug: s}) }}"
class="storyline-toc-link{{ s == slug ? ' is-active' }}">
<span class="storyline-toc-num">{{ c.tag }}</span>{{ c.title }}
</a>
</li>
{% endfor %}
</ol>
</div>
</nav>
<div class="col-lg-9 order-lg-1">
<article class="storyline-doc">
<header class="storyline-doc-head">
<div class="storyline-eyebrow">Storyline &middot; {{ chapter.eyebrow }}</div>
<h1>{{ chapter.title }}</h1>
<p class="storyline-standfirst">{{ chapter.summary }}</p>
</header>
{{ include(chapter.template) }}
</article>
<nav class="storyline-pager">
{% if prev %}
<a href="{{ path('app_storyline_chapter', {slug: prev}) }}" class="storyline-pager-link">
<span class="storyline-pager-dir">&larr; Previous</span>
<span class="storyline-pager-title">{{ chapters[prev].title }}</span>
</a>
{% else %}<span></span>{% endif %}
{% if next %}
<a href="{{ path('app_storyline_chapter', {slug: next}) }}" class="storyline-pager-link text-lg-end">
<span class="storyline-pager-dir">Next &rarr;</span>
<span class="storyline-pager-title">{{ chapters[next].title }}</span>
</a>
{% else %}<span></span>{% endif %}
</nav>
</div>
</div>
{% endblock %}