summaryrefslogtreecommitdiffhomepage
path: root/templates/base_templ.go
diff options
context:
space:
mode:
Diffstat (limited to 'templates/base_templ.go')
-rw-r--r--templates/base_templ.go97
1 files changed, 0 insertions, 97 deletions
diff --git a/templates/base_templ.go b/templates/base_templ.go
deleted file mode 100644
index 399b577..0000000
--- a/templates/base_templ.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Code generated by templ - DO NOT EDIT.
-
-// templ: version: v0.2.747
-package templates
-
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-
-import "github.com/a-h/templ"
-import templruntime "github.com/a-h/templ/runtime"
-
-import "git.thomasvoss.com/euro-cash.eu/i18n"
-
-func Base(head, body templ.Component) templ.Component {
- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
- if !templ_7745c5c3_IsBuffer {
- defer func() {
- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err == nil {
- templ_7745c5c3_Err = templ_7745c5c3_BufErr
- }
- }()
- }
- ctx = templ.InitializeContext(ctx)
- templ_7745c5c3_Var1 := templ.GetChildren(ctx)
- if templ_7745c5c3_Var1 == nil {
- templ_7745c5c3_Var1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- p := ctx.Value("printer").(i18n.Printer)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var2 string
- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.Locale.Bcp)
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `base.templ`, Line: 8, Col: 26}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><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><script type=\"text/javascript\">\n\t\t\t\tconst validate = theme =>\n\t\t\t\t\t[\"light\", \"dark\"].includes(theme) ? theme : \"light\";\n\n\t\t\t\tconst toggle = theme =>\n\t\t\t\t\ttheme == \"light\" ? \"dark\" : \"light\";\n\n\t\t\t\tconst setTheme = theme => {\n\t\t\t\t\tlocalStorage.setItem(\"theme\", theme);\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementsByTagName(\"html\")[0]\n\t\t\t\t\t\t.setAttribute(\"data-theme\", theme);\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById(`nav-icon-theme-${theme}`)\n\t\t\t\t\t\t.style.display = '';\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById(`nav-icon-theme-${toggle(theme)}`)\n\t\t\t\t\t\t.style.display = 'none';\n\t\t\t\t};\n\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', _ => {\n\t\t\t\t\tdocument.getElementById(\"theme-button\").onclick = () => {\n\t\t\t\t\t\tsetTheme(toggle(validate(localStorage.getItem(\"theme\"))));\n\t\t\t\t\t};\n\t\t\t\t\tsetTheme(validate(localStorage.getItem(\"theme\")));\n\t\t\t\t});\n\t\t\t</script>")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- if head != nil {
- templ_7745c5c3_Err = head.Render(ctx, templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</head><body>")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- if body != nil {
- templ_7745c5c3_Err = body.Render(ctx, templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<footer><p><small>")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var3 string
- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Found a mistake or want to contribute missing information?"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `base.templ`, Line: 52, Col: 73}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <a href=\"/\">")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- var templ_7745c5c3_Var4 string
- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Feel free to contact us!"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `base.templ`, Line: 53, Col: 51}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></small></p></footer></body></html>")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- return templ_7745c5c3_Err
- })
-}