Files
vapor-po/Sources/App/Views/RouteHeaderView.swift

27 lines
492 B
Swift

import Elementary
import ElementaryHTMX
struct RouteHeaderView: HTML {
let title: String
let description: String
init(title: String, description: String) {
self.title = title
self.description = description
}
init(route: ViewRoute) {
self.init(title: route.title, description: route.description)
}
var content: some HTML {
div(.class("container"), .style("padding: 20px 20px;")) {
h1 { title }
br()
p { description }
br()
}
}
}