From c2233c16395bd5cb3cc54e647adb25b5999b163e Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Mon, 6 Jul 2026 21:21:17 -0500 Subject: [PATCH] feat: add shared layout template --- src/Views/layout.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/Views/layout.php diff --git a/src/Views/layout.php b/src/Views/layout.php new file mode 100644 index 0000000..d8addef --- /dev/null +++ b/src/Views/layout.php @@ -0,0 +1,34 @@ +` content (e.g. a per-template script tag). + */ +function render_layout(callable $body, string $csrf, string $title, string $extraHead = ''): void +{ + $e = static fn (string $v): string => Escape::html($v); + $a = static fn (string $v): string => Escape::attr($v); + ?> + + + + + <?= $e($title) ?> + + + + + + + + +