feat: Updates tailwind config to properly track swift files.

This commit is contained in:
2025-02-25 15:56:53 -05:00
parent 9ba5d5e7e4
commit ba0eb95f26
4 changed files with 35 additions and 104 deletions

View File

@@ -7,7 +7,7 @@ extension ViewController: DependencyKey {
public static var liveValue: ViewController {
.init(view: { _ in
MainPage {
h1(.class("text-red-100")) { "It works!" }
h1(.class("text-sky-500")) { "It works!" }
}
})
}

View File

@@ -1,7 +1,7 @@
import Elementary
struct MainPage<Inner: HTML>: SendableHTMLDocument where Inner: Sendable {
let title = "HVAC Toolbox"
let title = "HVAC-Toolbox"
let lang = "en-US"
let inner: @Sendable () -> Inner
@@ -30,16 +30,39 @@ struct MainPage<Inner: HTML>: SendableHTMLDocument where Inner: Sendable {
}
var body: some HTML {
main {
div(.class("min-h-screen bg-linear-to-br from-green-50 to-blue-50")) {
header(.class("header")) {
h1(.class("text-red-600")) { title }
main(.class("bg-white dark:bg-gray-800")) {
div(.class("min-h-screen")) {
Header()
div(.class("container")) {
inner()
}
inner()
}
}
}
}
struct Header: HTML {
var content: some HTML {
header(.class("bg-blue-500")) {
a(.href("/")) {
div(.class("flex flex-row gap-2 p-2 mb-8")) {
img(.src("/favicon-32x32.png"))
h2(.class("text-2xl text-white font-extrabold")) { "HVAC-Toolbox" }
// img(.class("text-yellow-300"), .src("/images/wind.svg"))
HTMLRaw("""
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="w-8 h-8 text-yellow-300">
<path d="M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2"></path>
<path d="M9.6 4.6A2 2 0 1 1 11 8H2"></path>
<path d="M12.6 19.4A2 2 0 1 0 14 16H2"></path>
</svg>
""")
}
}
}
}
}
protocol SendableHTMLDocument: HTMLDocument, Sendable {}