Template
1
0
Fork 0

Made HTMX non-blocking

This commit is contained in:
Atridad Lahiji 2024-02-03 00:03:57 -07:00
parent 9c3e3b5ab7
commit bfc56fffcf
No known key found for this signature in database
5 changed files with 15 additions and 2 deletions

View file

@ -16,3 +16,6 @@ GOTH // Blog
{{end}}
</section>
{{end}}
{{define "foot"}}
{{end}}

View file

@ -49,3 +49,6 @@ GOTH // Home
</div>
</span>
{{end}}
{{define "foot"}}
{{end}}

View file

@ -17,6 +17,7 @@
<main class="container flex flex-col items-center justify-center gap-3 sm:gap-6 p-4 text-center mx-auto min-h-[calc(100%-64px)]">
{{template "main" .}}
</main>
{{template "foot" .}}
</body>
</html>
{{end}}

View file

@ -12,3 +12,6 @@ GOTH // Post
{{define "main"}}
{{.Content}}
{{end}}
{{define "foot"}}
{{end}}

View file

@ -5,8 +5,6 @@ GOTH // SSE <div class="badge badge-accent">DEMO</div>
{{end}}
{{define "head"}}
<script src="/public/js/htmx.min.js"></script>
<script src="/public/js/htmx.sse.js"></script>
{{end}}
{{define "main"}}
@ -27,3 +25,8 @@ GOTH // SSE <div class="badge badge-accent">DEMO</div>
<button type="submit" class="btn btn-primary">Send Event</button>
</form>
{{end}}
{{define "foot"}}
<script src="/public/js/htmx.min.js"></script>
<script src="/public/js/htmx.sse.js"></script>
{{end}}