From cc4fbf425d7ed3e1cf5050ac93c0092613ca1459 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 6 Sep 2026 14:36:17 +0200 Subject: [PATCH] Add nav menu with Characters, NPC's and Storyline pages Navbar (collapsible) with active-state highlighting driven by a nav list in base.html.twig. Three routed, auth-gated controllers each rendering a shared placeholder partial - data models still to be designed. Co-Authored-By: Claude Sonnet 5 --- src/Controller/CharacterController.php | 18 ++++++++++++ src/Controller/NpcController.php | 18 ++++++++++++ src/Controller/StorylineController.php | 18 ++++++++++++ .../_partials/page_placeholder.html.twig | 13 +++++++++ templates/base.html.twig | 29 +++++++++++++++++-- templates/characters/index.html.twig | 11 +++++++ templates/npc/index.html.twig | 11 +++++++ templates/storyline/index.html.twig | 11 +++++++ 8 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 src/Controller/CharacterController.php create mode 100644 src/Controller/NpcController.php create mode 100644 src/Controller/StorylineController.php create mode 100644 templates/_partials/page_placeholder.html.twig create mode 100644 templates/characters/index.html.twig create mode 100644 templates/npc/index.html.twig create mode 100644 templates/storyline/index.html.twig diff --git a/src/Controller/CharacterController.php b/src/Controller/CharacterController.php new file mode 100644 index 0000000..260cf6a --- /dev/null +++ b/src/Controller/CharacterController.php @@ -0,0 +1,18 @@ +render('characters/index.html.twig'); + } +} diff --git a/src/Controller/NpcController.php b/src/Controller/NpcController.php new file mode 100644 index 0000000..102b9db --- /dev/null +++ b/src/Controller/NpcController.php @@ -0,0 +1,18 @@ +render('npc/index.html.twig'); + } +} diff --git a/src/Controller/StorylineController.php b/src/Controller/StorylineController.php new file mode 100644 index 0000000..5aa7b3e --- /dev/null +++ b/src/Controller/StorylineController.php @@ -0,0 +1,18 @@ +render('storyline/index.html.twig'); + } +} diff --git a/templates/_partials/page_placeholder.html.twig b/templates/_partials/page_placeholder.html.twig new file mode 100644 index 0000000..73de273 --- /dev/null +++ b/templates/_partials/page_placeholder.html.twig @@ -0,0 +1,13 @@ +{# Temporary empty state for pages whose data model isn't built yet. #} +
+

{{ title }}

+
+ +
+
+
{{ icon }}
+

+ {{ blurb }} +

+
+
diff --git a/templates/base.html.twig b/templates/base.html.twig index 49cb88a..5de5bc7 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -18,9 +18,32 @@
๐ŸŽฒ dmtools {% if app.user %} -
- {{ app.user.userIdentifier }} - Log out + + {% endif %}
diff --git a/templates/characters/index.html.twig b/templates/characters/index.html.twig new file mode 100644 index 0000000..94e7fa7 --- /dev/null +++ b/templates/characters/index.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}Characters ยท dmtools{% endblock %} + +{% block body %} + {{ include('_partials/page_placeholder.html.twig', { + title: 'Characters', + icon: '๐Ÿง', + blurb: 'Player characters will live here โ€” list, sheet details and party overview. Data model to be designed.', + }) }} +{% endblock %} diff --git a/templates/npc/index.html.twig b/templates/npc/index.html.twig new file mode 100644 index 0000000..0a08c18 --- /dev/null +++ b/templates/npc/index.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}NPC's ยท dmtools{% endblock %} + +{% block body %} + {{ include('_partials/page_placeholder.html.twig', { + title: "NPC's", + icon: '๐Ÿง™', + blurb: 'Non-player characters will live here โ€” searchable list with faction, location and notes. Data model to be designed.', + }) }} +{% endblock %} diff --git a/templates/storyline/index.html.twig b/templates/storyline/index.html.twig new file mode 100644 index 0000000..1be6bda --- /dev/null +++ b/templates/storyline/index.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}Storyline ยท dmtools{% endblock %} + +{% block body %} + {{ include('_partials/page_placeholder.html.twig', { + title: 'Storyline', + icon: '๐Ÿ“œ', + blurb: 'The campaign storyline will live here. Shape still to be decided โ€” session log, plot threads, or a wiki-style document.', + }) }} +{% endblock %}