feat: Mostly working user view with elementary html.

This commit is contained in:
2025-01-14 22:55:34 -05:00
parent 8842957cf3
commit cf28e52fa2
13 changed files with 297 additions and 12 deletions

View File

@@ -0,0 +1,27 @@
import Elementary
struct Float<C: HTML>: HTML {
let id: String
let body: C?
init(id: String = "float") {
self.id = id
self.body = nil
}
init(id: String = "float", @HTMLBuilder body: () -> C) {
self.id = id
self.body = body()
}
var content: some HTML {
div(.id(id), .class("float")) {
if let body {
body
}
}
}
}
extension Float: Sendable where C: Sendable {}