package templates
templ head(title string) {
{ title }
}
templ footer(timestamp string) {
}
templ navbar(loggedIn bool) {
}
templ loginButton(loggedIn bool) {
if loggedIn {
Profile
} else {
}
}
templ ErrorMessage(title string, content string) {
{ content }
}
// wrapBase handles the basics of HTML
templ wrapBase(metaContent MetaContent, title string) {
@head(title)
@navbar(metaContent.IsLoggedIn)
if metaContent.ErrorText != "" {
@ErrorMessage(metaContent.ErrorTitle, metaContent.ErrorText)
}
{ children... }
@footer(metaContent.Timestamp)
}
templ Empty() {
}