go-recipe-book/pkg/web/tpl/pages/base_templ.go
Alessio b121b75b30
Some checks failed
Build / build (push) Failing after 1m12s
Build / release (push) Has been skipped
Add templ generated go files
2025-02-19 19:37:37 -08:00

62 lines
4.2 KiB
Go

// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.793
package pages
//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"
func Base(title string) 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
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
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)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><title>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/tpl/pages/base.templ`, Line: 8, Col: 17}
}
_, 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(" | Recipe Book</title><link rel=\"shortcut icon\" href=\"/static/chili-garlic.png\" type=\"image/x-icon\"><link rel=\"stylesheet\" href=\"/static/styles.css\"><!-- <link rel='stylesheet' href='/static/vendor/fonts.css'> --><!-- <script src=\"https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js\" integrity=\"sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=\" crossorigin=\"anonymous\"></script> --><!-- <script src=\"https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js\" integrity=\"sha256-9yRP/2EFlblE92vzCA10469Ctd0jT48HnmmMw5rJZrA=\" crossorigin=\"anonymous\"></script> --><!-- <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css\" integrity=\"sha256-zaSoHBhwFdle0scfGEFUCwggPN7F+ip9XRglo8IWb4w=\"> --><script src=\"/static/vendor/htmx.min.js\" integrity=\"sha384-oecSB0HeI5gdFcssloeKf3nByrZ7XjyAKxoykSkH8A4WPwT6suR+Ie4wGSLaQJBu\" crossorigin=\"anonymous\"></script><script src=\"/static/vendor/htmx-extension-json-enc.js\"></script><!-- <link rel=\"manifest\" href=\"/static/pwa/manifest.json\"> --><!-- <script>\n\t\t\t\tif ('serviceWorker' in navigator) {\n\t\t\t\t\tnavigator.serviceWorker.register('/static/pwa/service-worker.js')\n\t\t\t\t\t\t.then(function(registration) {\n\t\t\t\t\t\t\tconsole.log('Service Worker registered with scope:', registration.scope);\n\t\t\t\t\t\t}).catch(function(error) {\n\t\t\t\t\t\t\tconsole.log('Service Worker registration failed:', error);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t</script> --></head><body><nav><img id=\"logo\" src=\"/static/chili-garlic.png\"><ul><li><a hx-get=\"/ingredients\" hx-target=\"body\" hx-push-url=\"true\">Ingredients</a></li><li><a hx-get=\"/recipes\" hx-target=\"body\" hx-push-url=\"true\">Recipes</a></li></ul><ul><li><a hx-get=\"/about\" hx-target=\"body\" hx-push-url=\"true\">About this app</a></li><li><a hx-get=\"/help\" hx-target=\"body\" hx-push-url=\"true\">Help</a></li><li><a hx-get=\"/changelog\" hx-target=\"body\" hx-push-url=\"true\">Changelog</a></li></ul></nav><main>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></body></html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate