Storyline: split the chapter page, dock the notes at the bottom

The chapter page now fills the viewport as two horizontal panes: the
chapter scrolls in the top ~2/3, the notes sit in a fixed dock in the
bottom ~1/3, always visible while you read. Drag the divider to change
the ratio, click the "Chapter notes" header to collapse the dock to a
bar; both the height and the collapsed state persist in localStorage.

- base.html.twig: add a {% block body_class %} hook on <body>.
- chapter.html.twig sets body class "storyline-chapter-page"; the split
  layout CSS is scoped to it and falls back to normal stacked flow under
  768px wide or 560px tall.
- app.js publishes the navbar height as --app-nav-h so the split can size
  itself to viewport-minus-navbar even when the navbar wraps.
- new chapter_notes Stimulus controller: drag-resize + collapse + persist.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-08 19:00:49 +02:00
co-authored by Claude Sonnet 5
parent 5c821bd7ad
commit 90345ecd38
5 changed files with 318 additions and 74 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body class="d-flex flex-column">
<body class="d-flex flex-column {% block body_class %}{% endblock %}">
{% block navbar %}
<nav class="navbar navbar-expand-lg bg-body-tertiary border-bottom">
<div class="container">