backseat-music/backseat/httpUtil/basePage.templ
Abigail Pain 69890c9b84 Alter 5 files
Update index.templ
Update index_templ.go
Update recentlyListened.go
Update basePage.templ
Update basePage_templ.go
2025-07-25 19:30:09 +01:00

52 lines
No EOL
1.3 KiB
Text

package httpUtil
templ BasePage(title string) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>{ title } - Backseat Music</title>
<link rel="stylesheet" href="/assets/main.css" />
<meta name="htmx-config" content='{"includeIndicatorStyles":false}'>
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.6/dist/htmx.js"></script>
<style>
.htmx-indicator {
display: none;
}
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator {
display: block;
}
.htmx-request .htmx-not-indicator {
display: none;
}
</style>
</head>
<body>
<main>
{ children... }
</main>
<div id="modal-target"></div>
</body>
</html>
}
templ LoadingSpinner() {
<span class="loader"></span>
}
templ ModalTarget() {
<div id="modal-target" hx-swap-oob="true">
{ children... }
</div>
}
templ Modal() {
<dialog id="modal">
{ children... }
</dialog>
<script>
document.getElementById("modal").showModal()
</script>
}