2024-03-15 17:55:28 +00:00
|
|
|
package layouts
|
|
|
|
|
2024-03-16 04:50:24 +00:00
|
|
|
import "git.staur.ca/stobbsm/clustvirt/view/components"
|
2024-03-15 17:55:28 +00:00
|
|
|
|
2024-03-16 04:50:24 +00:00
|
|
|
templ StaticPage(title string, subtitle string, navBarItems []components.NavItem) {
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html class={ "text-uigrey-100" , "bg-uigrey-900" }>
|
|
|
|
<head>
|
|
|
|
<title>Clustvirt</title>
|
|
|
|
<link href="/static/css/style.css" type="text/css" rel="stylesheet"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
@header(title, subtitle, navBarItems)
|
|
|
|
</header>
|
|
|
|
<div id="content" name="content" class={ "flex" , "flex-col" , "gap-2" }>
|
|
|
|
{ children... }
|
|
|
|
</div>
|
|
|
|
<footer>
|
|
|
|
@footer()
|
|
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|
2024-03-15 17:55:28 +00:00
|
|
|
}
|
|
|
|
|
2024-03-16 04:50:24 +00:00
|
|
|
templ hero(title string) {
|
|
|
|
<h1 class={ "text-2xl", "font-bold", "text-uiblue-200", "md:order-1" }>{ title }</h1>
|
2024-03-15 17:55:28 +00:00
|
|
|
}
|
|
|
|
|
2024-03-16 04:50:24 +00:00
|
|
|
templ header(title string, subtitle string, navBarItems []components.NavItem) {
|
|
|
|
<h2 class={ "text-lg" , "font-semibold" , "italic" , "h-6" }>{ subtitle }</h2>
|
|
|
|
@components.NavBar(hero(title), navBarItems)
|
2024-03-15 17:55:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
templ footer() {
|
2024-03-16 04:50:24 +00:00
|
|
|
<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>
|
2024-03-15 17:55:28 +00:00
|
|
|
}
|