refactor: move CDN assets to js/ folder

This commit is contained in:
Prad Nukala
2024-10-07 20:24:18 -04:00
parent d0dddbfe01
commit ddf745f39a
4 changed files with 86 additions and 10 deletions
+8 -1
View File
@@ -1,12 +1,13 @@
package cdn
const (
CDNPath = "https://cdn.sonr.id"
PublicOrigin = "https://cdn.sonr.id"
)
var (
stylesHandle = templ.NewOnceHandle()
alpineHandle = templ.NewOnceHandle()
dexieHandle = templ.NewOnceHandle()
htmxHandle = templ.NewOnceHandle()
)
@@ -22,6 +23,12 @@ templ Alpine() {
}
}
templ Dexie() {
@dexieHandle.Once() {
<script src={ "/js/dexie.min.js" }></script>
}
}
templ Htmx() {
@htmxHandle.Once() {
<script src={ "/js/htmx.min.js" }></script>