31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
package pages
|
|
|
|
templ Overlay() {
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>zaply</title>
|
|
<link href="/css/tailwind.css" rel="stylesheet">
|
|
<link href="/css/zap.css" rel="stylesheet">
|
|
<script src={ GetBaseUrl(ctx) + "/js/htmx.min.js" } integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script>
|
|
<script src={ GetBaseUrl(ctx) + "/js/htmx-sse.js" } crossorigin="anonymous"></script>
|
|
if GetEnv(ctx) == "development" {
|
|
<script src={ GetBaseUrl(ctx) + "/js/livereload.js" }></script>
|
|
}
|
|
</head>
|
|
<body>
|
|
<div hx-ext="sse" sse-connect="/overlay/sse" sse-swap="zap" hx-swap="beforeend" class="fixed bottom-0 right-0" />
|
|
<script>
|
|
document.body.addEventListener('htmx:sseMessage', function (e) {
|
|
setTimeout(() => {
|
|
const div = document.getElementById(e.detail.lastEventId)
|
|
div.classList.add('zap-animate-out')
|
|
div.addEventListener('animationend', div.remove)
|
|
}, 60_000)
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|
|
}
|