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}} {{end}}
</section> </section>
{{end}} {{end}}
{{define "foot"}}
{{end}}

View file

@ -49,3 +49,6 @@ GOTH // Home
</div> </div>
</span> </span>
{{end}} {{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)]"> <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" .}} {{template "main" .}}
</main> </main>
{{template "foot" .}}
</body> </body>
</html> </html>
{{end}} {{end}}

View file

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

View file

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