summaryrefslogtreecommitdiffhomepage
path: root/templates/base.templ
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-08 21:32:28 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-08 21:32:28 +0200
commit0f3b1051228328718798fe0b40d02fdb72e3481f (patch)
tree2e3035d10e2ce7dcae2461615e6f428d7ab1a2cd /templates/base.templ
parentd02494343cbf2d77fa16e2c3ee56426c73654135 (diff)
Rename some components
Diffstat (limited to 'templates/base.templ')
-rw-r--r--templates/base.templ32
1 files changed, 32 insertions, 0 deletions
diff --git a/templates/base.templ b/templates/base.templ
new file mode 100644
index 0000000..88a9e77
--- /dev/null
+++ b/templates/base.templ
@@ -0,0 +1,32 @@
+package templates
+
+import "git.thomasvoss.com/euro-cash.eu/i18n"
+
+templ Base(head, body templ.Component) {
+ {{ p := ctx.Value("printer").(i18n.Printer) }}
+ <!DOCTYPE html>
+ <html lang={ p.Locale.Bcp } data-theme={ ctx.Value("theme").(string) }>
+ <head>
+ <meta charset="UTF-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <link rel="stylesheet" type="text/css" href="/style.css"/>
+ <title>Euro Cash</title>
+ if head != nil {
+ @head
+ }
+ </head>
+ <body>
+ if body != nil {
+ @body
+ }
+ <footer>
+ <p>
+ <small>
+ { p.T("Found a mistake or want to contribute missing information?") }
+ <a href="/">{ p.T("Feel free to contact us!") }</a>
+ </small>
+ </p>
+ </footer>
+ </body>
+ </html>
+}