Potion/internal/templates/layouts/app_layout.templ
Hayden Hargreaves 47b8386844 (FEAT): Errors can now be displayed using the RenderErrorBanner fx.
This is found in the components domain. Make sure only HTMX routes call
it. Although, I think I put this into the page handlers WHICH IS WRONG.

However, it does work, ish. But it does not load into the DOM properly.
But it seems to display just fine.
2025-09-03 22:22:23 -07:00

27 lines
793 B
Plaintext

package templates
// AppLayout is the main application layout, this does not contain any content other than
// meta data, links, scripts and whatever is passed into it as a component.
templ AppLayout(title string, child templ.Component) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{ title }</title>
<link rel="stylesheet" href="/v1/web/static/css/tailwind.css"/>
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
</head>
<body class="bg-gray-100">
<div id="error-toast"></div>
@child
<script>
function hideError() {
const err = document.getElementById("error-toast");
err.classList.add("hidden");
}
</script>
</body>
</html>
}