add_video_modal_templ.go
2016 bytes
1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.3.1020
4
5package pages
6
7//lint:file-ignore SA4006 This context is only used if a nested component is present.
8
9import "github.com/a-h/templ"
10import templruntime "github.com/a-h/templ/runtime"
11
12func addVideoModal() 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, "<div class=\"modal fade\" id=\"add-video-modal\" tabindex=\"-1\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h1 class=\"modal-title fs-5\">Add video to list</h1><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"></button></div><div class=\"modal-body\"><form id=\"add-video-form\" class=\"d-flex\" data-on:submit__prevent=\"$videoID = el.querySelector('input').value; @post('/videos')\"><input type=\"text\" placeholder=\"Video ID\" class=\"form-control\" autocomplete=\"off\"> <button type=\"submit\" class=\"btn btn-primary ms-3\"><i class=\"bi bi-camera-video\"></i></button></form></div></div></div></div>")
34 if templ_7745c5c3_Err != nil {
35 return templ_7745c5c3_Err
36 }
37 return nil
38 })
39}
40
41var _ = templruntime.GeneratedTemplate