clustvirt/view/components/index.templ
Matthew Stobbs 9c35be1fcf really liking templ
- made multiple components for reuse in templ
- going to start on actual data displaying templates
2024-03-14 21:56:49 -06:00

47 lines
1.0 KiB
Plaintext

package components
templ Index(content ...templ.Component) {
<!DOCTYPE html>
<html class={ "text-nosferatu-100" , "bg-nosferatu-900" }>
<head>
<title>Clustvirt</title>
<link href="/static/css/style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<header>
@header()
</header>
<div id="content" name="content">
for _, cnt := range content {
@cnt
}
</div>
<footer>
@footer()
</footer>
</body>
</html>
}
templ header() {
<h1 class={ "text-2xl", "font-bold" }>Clustvirt</h1>
<h2 class={ "text-sm", "font-thin", "italic" }>Libvirtd simplified and clustered</h2>
<nav>
<ul>
<li>Server 1</li>
<li>Server 2</li>
</ul>
</nav>
}
templ footer() {
<div class="flex gap-4 md:gap-6 sm:gap-8 divide divide-solid">
<div id="footer_left" class="flex-auto basis-1/4 md:basis-1/3 p-2">Left</div>
<div id="footer_middle" class="flex-auto basis-1/2 md:basis-1/3 p-2">Middle</div>
<div id="footer_right" class="flex-auto basis-1/4 md:basis-1/3 p-2">Right</div>
</div>
}