package components import "net/http" templ TextInput(name string, placeholder string, method string, endpoint string, hxTrigger string) { } templ NewSiteForm(endpoint string) {
Please enter name of your new Hugo site below 👇
@TextInput("name","Enter Name","post",endpoint,"keyup changed delay:100ms") } func NewSite(w http.ResponseWriter, r *http.Request) { if r.FormValue("name") != "" { w.Write([]byte("New site created: " + r.FormValue("name") + " ✅" )) return } w.Write([]byte("Please enter name of your new Hugo site below 👇")) }