Parent directory

subscription_templ.go

2054 bytes
 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
11func subscriptionModal() templ.Component {
12	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
13		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
14		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
15			return templ_7745c5c3_CtxErr
16		}
17		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
18		if !templ_7745c5c3_IsBuffer {
19			defer func() {
20				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
21				if templ_7745c5c3_Err == nil {
22					templ_7745c5c3_Err = templ_7745c5c3_BufErr
23				}
24			}()
25		}
26		ctx = templ.InitializeContext(ctx)
27		templ_7745c5c3_Var1 := templ.GetChildren(ctx)
28		if templ_7745c5c3_Var1 == nil {
29			templ_7745c5c3_Var1 = templ.NopComponent
30		}
31		ctx = templ.ClearChildren(ctx)
32		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"modal fade\" id=\"subscription-modal\" tabindex=\"-1\"><div class=\"modal-dialog\"><div class=\"modal-content\"><div class=\"modal-header\"><h1 class=\"modal-title fs-5\">Subscribe to channel</h1><button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"></button></div><div class=\"modal-body\"><form id=\"subscription-form\" class=\"d-flex\" data-on:submit__prevent=\"$channelID = el.querySelector('input').value; @post('/subscribe')\"><input type=\"text\" placeholder=\"Channel ID, username, or URL\" class=\"form-control\" autocomplete=\"off\"> <button type=\"submit\" class=\"btn btn-primary ms-3\"><i class=\"bi bi-bookmark-plus\"></i></button></form></div></div></div></div>")
33		if templ_7745c5c3_Err != nil {
34			return templ_7745c5c3_Err
35		}
36		return nil
37	})
38}
39
40var _ = templruntime.GeneratedTemplate