htmx_templ.go
1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.3.1020
4package pages
5
6//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
8import "github.com/a-h/templ"
9import templruntime "github.com/a-h/templ/runtime"
10
11// Adds HTMX script via CDN
12func HTMX() templ.Component {
13 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
14 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
15 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
16 return templ_7745c5c3_CtxErr
17 }
18 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
19 if !templ_7745c5c3_IsBuffer {
20 defer func() {
21 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
22 if templ_7745c5c3_Err == nil {
23 templ_7745c5c3_Err = templ_7745c5c3_BufErr
24 }
25 }()
26 }
27 ctx = templ.InitializeContext(ctx)
28 templ_7745c5c3_Var1 := templ.GetChildren(ctx)
29 if templ_7745c5c3_Var1 == nil {
30 templ_7745c5c3_Var1 = templ.NopComponent
31 }
32 ctx = templ.ClearChildren(ctx)
33 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/htmx.min.js\" integrity=\"sha384-H5SrcfygHmAuTDZphMHqBJLc3FhssKjG7w/CeCpFReSfwBWDTKpkzPP8c+cLsK+V\" crossorigin=\"anonymous\"></script>")
34 if templ_7745c5c3_Err != nil {
35 return templ_7745c5c3_Err
36 }
37 return nil
38 })
39}
40
41var _ = templruntime.GeneratedTemplate