feat: Begins vapor application, begins view controller.

This commit is contained in:
2025-12-30 10:12:45 -05:00
parent 6eedb7396d
commit 4e1be161b1
15 changed files with 586 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
import Elementary
public struct MainPage<Inner: HTML>: SendableHTMLDocument where Inner: Sendable {
public var title: String { "Manual-D" }
public var lang: String { "en" }
let inner: Inner
init(_ inner: () -> Inner) {
self.inner = inner()
}
public var head: some HTML {
meta(.charset(.utf8))
script(.src("https://unpkg.com/htmx.org@2.0.8")) {}
script(.src("/js/main.js")) {}
link(.rel(.stylesheet), .href("/css/main.css"))
link(.rel(.icon), .href("/images/favicon.ico"), .custom(name: "type", value: "image/x-icon"))
}
public var body: some HTML {
inner
}
}
public protocol SendableHTMLDocument: HTMLDocument, Sendable {}