clustvirt/view/layouts/manager.templ
Matthew Stobbs dca1385e27 added onload trigger to manager
- now shows a loading graphic before loading clusterinfo on initial load
2024-03-23 11:39:25 -06:00

36 lines
1.3 KiB
Plaintext

package layouts
import "git.staur.ca/stobbsm/clustvirt/view/components"
templ Manager(title string, subtitle string) {
<!DOCTYPE html>
<html class={ "text-slate-50" , "bg-slate-900" }>
<head>
<title>{ title } - { subtitle }</title>
<link href="/static/css/style.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div class={ "flex" , "flex-col" , "h-screen" }>
<header class={ "px-4" }>
@header(title, subtitle, components.DefaultNavBar)
</header>
<main class={ "px-4" , "h-full" }>
<div class={ "flex", "flex-row", "h-full", "mt-2" }>
@components.HostNav()
<div id="sysContent" class={ "w-3/4" , "px-2" } >
<img class={ "inline-block"} hx-trigger="load delay:1s" hx-target="#sysContent" hx-get="/htmx/cluster" src="/static/images/bars.svg"/>
</div>
</div>
</main>
<footer class={ "px-4" , "bottom-0", "w-full" , "justify-self-end" }>
@footer()
</footer>
</div>
<!-- Load HTMX -->
<script src=" https://unpkg.com/htmx.org@1.9.11" integrity="sha384-0gxUXCCR8yv9FM2b+U3FDbsKthCI66oH5IA9fHppQq9DDMHuMauqq1ZHBpJxQ0J0" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.2/dist/chart.umd.min.js"></script>
</body>
</html>
}