templates/boilerplate.gohtml (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<!DOCTYPE html> <head> <meta charset="utf-8"> <title>Guestbook</title> <script src="https://unpkg.com/htmx.org@1.9.11" integrity="sha384-0gxUXCCR8yv9FM2b+U3FDbsKthCI66oH5IA9fHppQq9DDMHuMauqq1ZHBpJxQ0J0" crossorigin="anonymous"></script> </head> <body> <form hx-post="add-post/" hx-target="#rendered-posts" hx-swap="afterbegin" hx-indicator="#spinner" hx-on::after-request="if(event.detail.successful) this.reset()" > <div> <textarea rows="4" cols="50" name="msg" id="post-msg" required ></textarea> </div> <button type="submit"> <span id="spinner" class="htmx-indicator">br..</span>post </button> </form> {{ template "guestbookbody" . }} </body> |