Tracker: unfold a combatant's stat block inline

- extract the 5e stat-block markup into enemy/_statblock.html.twig
  (sb.block(enemy) macro); the enemy detail page now uses it too
- each tracker combatant gets a "stat block" toggle that expands the
  block in place (Bootstrap collapse), so you don't have to leave the
  encounter to check AC / attacks
- open blocks are remembered in localStorage and re-opened after each
  damage/heal reload, and the caret rotates when expanded

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-06 19:29:52 +02:00
co-authored by Claude Sonnet 5
parent cbe4b0a0e1
commit 2ed169fc78
5 changed files with 137 additions and 59 deletions
+12
View File
@@ -112,3 +112,15 @@ table.dataTable {
max-width: 100%;
height: auto;
}
/* --- Tracker: unfoldable stat blocks --------------------------------- */
[data-bs-toggle="collapse"] .sb-caret {
display: inline-block;
transition: transform 0.15s ease;
}
[data-bs-toggle="collapse"][aria-expanded="true"] .sb-caret {
transform: rotate(90deg);
}
.statblock-collapse h3 {
margin-top: 0.75rem;
}