init - add project files

This commit is contained in:
2025-03-06 23:54:11 -05:00
commit e724ff1120
1363 changed files with 897467 additions and 0 deletions

21
ui/alpine.go Normal file
View File

@@ -0,0 +1,21 @@
package ui
import (
"fmt"
. "maragu.dev/gomponents"
. "maragu.dev/gomponents/html"
)
type AlpineStore map[string]string
func (as AlpineStore) Init() Node {
script := "document.addEventListener('alpine:init', () => {"
for k, v := range as {
script += fmt.Sprintf("Alpine.store('%s', %s);", k, v)
}
script += "})"
return Script(Raw(script))
}