made htmx logging a flag that can be toggled
This commit is contained in:
@@ -3,10 +3,12 @@ package layout
|
||||
import "git.haelnorr.com/h/oslstats/internal/view/component/popup"
|
||||
import "git.haelnorr.com/h/oslstats/internal/view/component/nav"
|
||||
import "git.haelnorr.com/h/oslstats/internal/view/component/footer"
|
||||
import "git.haelnorr.com/h/oslstats/pkg/contexts"
|
||||
|
||||
// Global page layout. Includes HTML document settings, header tags
|
||||
// navbar and footer
|
||||
templ Global(title string) {
|
||||
{{ htmxLogging := contexts.HTMXLog(ctx) }}
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
lang="en"
|
||||
@@ -27,10 +29,11 @@ templ Global(title string) {
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4" integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/@alpinejs/persist@3.x.x/dist/cdn.min.js"></script>
|
||||
<script src="https://unpkg.com/alpinejs" defer></script>
|
||||
<script>
|
||||
// uncomment this line to enable logging of htmx events
|
||||
// htmx.logAll();
|
||||
</script>
|
||||
if htmxLogging {
|
||||
<script>
|
||||
htmx.logAll();
|
||||
</script>
|
||||
}
|
||||
<script>
|
||||
const bodyData = {
|
||||
showError500: false,
|
||||
|
||||
Reference in New Issue
Block a user