package state
const (
CDNPath = "https://cdn.sonr.id"
)
var (
serviceWorkerHandle = templ.NewOnceHandle()
stylesHandle = templ.NewOnceHandle()
alpineHandle = templ.NewOnceHandle()
htmxHandle = templ.NewOnceHandle()
)
func cdnPath(path string, local bool) string {
if local {
return path
}
return CDNPath + path
}
templ RegisterServiceWorker() {
}
templ Styles(local bool) {
@stylesHandle.Once() {
}
}
templ Alpine(local bool) {
@alpineHandle.Once() {
}
}
templ Htmx(local bool) {
@htmxHandle.Once() {
}
}