This commit is contained in:
maddalax 2024-10-29 05:11:35 -05:00
parent 60e1a161ca
commit d44cd0b2ed
4 changed files with 4 additions and 5 deletions

View file

@ -49,7 +49,7 @@ js.SetClassOnSibling(string, string)
js.RemoveClassOnSibling(string, string)
```
For more usages: see https://github.com/maddalax/htmgo/blob/master/htmgo-site/pages/form.go
For more usages: see https://htmgo.dev/examples/form
**Example:** Evaluating arbitrary JS

View file

@ -3,8 +3,7 @@
htmgo supports server-sent events (SSE) out of the box.
This allows you to push data from the server to the client in real-time.
Example of this can be found in the [chat-app](https://github.com/maddalax/htmgo/tree/master/examples/chat) example.
Demo: https://chat-example.htmgo.dev
Example of this can be found in the [chat-app](https://htmgo.dev/examples/chat) example.
## How it works ##
1. The client sends a request to the server to establish a connection.

View file

@ -7,7 +7,7 @@ This is useful for things such as:
<br>
**Example:** https://github.com/maddalax/htmgo/blob/master/htmgo-site/pages/form.go#L17
**Example:** https://htmgo.dev/examples/form
In this example: The trigger-children extension will trigger **hx-before-request** and **hx-after-request**
on all children of the form when the form is submitted, and the button reacts to that by showing a loading state.

View file

@ -16,7 +16,7 @@ import (
)
func GetGithubPath(path string) string {
path = strings.ReplaceAll(path, "/partials/examples/", "/partials/snippets/")
path = strings.ReplaceAll(path, "/examples/", "/snippets/")
return fmt.Sprintf("https://github.com/maddalax/htmgo/tree/master/htmgo-site/partials%s.go", path)
}