aboutsummaryrefslogtreecommitdiff
path: root/xess/xess.templ
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-03-17 19:33:07 -0400
committerXe Iaso <me@xeiaso.net>2025-03-17 19:33:07 -0400
commit9923878c5c8b68df7f132efd28f76ce5478a1f1a (patch)
treec18dfc413495c09886b0d622a275f142f3e9c333 /xess/xess.templ
downloadanubis-9923878c5c8b68df7f132efd28f76ce5478a1f1a.tar.xz
anubis-9923878c5c8b68df7f132efd28f76ce5478a1f1a.zip
initial import from /x/ monorepo
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'xess/xess.templ')
-rw-r--r--xess/xess.templ41
1 files changed, 41 insertions, 0 deletions
diff --git a/xess/xess.templ b/xess/xess.templ
new file mode 100644
index 0000000..4c010b7
--- /dev/null
+++ b/xess/xess.templ
@@ -0,0 +1,41 @@
+package xess
+
+templ Base(title string, headArea, navBar, bodyArea, footer templ.Component) {
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>{ title }</title>
+ <link rel="stylesheet" href={ URL }/>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ if headArea != nil {
+ @headArea
+ }
+ </head>
+ <body id="top">
+ <main>
+ if navBar != nil {
+ <nav>
+ @navBar
+ </nav>
+ }
+ <h1>{ title }</h1>
+ @bodyArea
+ if footer != nil {
+ <footer>
+ @footer
+ </footer>
+ }
+ </main>
+ </body>
+ </html>
+}
+
+templ Simple(title string, body templ.Component) {
+ @Base(
+ title,
+ nil,
+ nil,
+ body,
+ nil,
+ )
+}