goipam/web/templates/views.templ

37 lines
933 B
Plaintext

package templates
import "git.jmbit.de/jmb/goipam/utils"
// wrapBase handles the basics of HTML
templ wrapBase(metaContent utils.MetaContent, title string) {
<!DOCTYPE HTML>
<html>
@head(title)
<body class="has-navbar-fixed-top">
@navbar(metaContent.IsLoggedIn)
{ children... }
@footer(metaContent.Timestamp)
</body>
</html>
}
templ Login(metaContent utils.MetaContent, title string) {
@wrapBase(metaContent, title) {
@loginForm()
}
}
templ Index(metaContent utils.MetaContent) {
@wrapBase(metaContent, "goipam") {
<div class="columns is-centered">
<div class="column">
<div class="container">
<h2 class="title">Placeholder Title</h2>
<p>Placeholder Text. This goipam thingy was made using Go, Gin, Gorm, Templ and HTMX. It's put together into this mess to prevent me from having write a bunch of boilerplate code everytime I start a new Project </p>
</div>
</div>
</div>
}
}