feat: Minor updates to try and deploy to digital ocean

This commit is contained in:
2025-02-28 20:17:18 -05:00
parent 3be0f7a828
commit c1aa2a8ad1
5 changed files with 59 additions and 31 deletions

View File

@@ -39,6 +39,7 @@ struct MainPage<Inner: HTML>: SendableHTMLDocument where Inner: Sendable {
Header()
PageContent(body: inner)
}
Footer()
}
}
}
@@ -61,39 +62,49 @@ private struct Header: HTML {
nav(.class("flex flex-row gap-2 p-2 mt-2")) {
// TODO: Add class active, to button that is the active route.
ul(.class("flex flex-wrap gap-x-2 lg:gap-x-5 \(text: .yellow) font-bold")) {
li {
a(
.class("hover:border-b \(border: .yellow)"),
.hx.get(route: .moldRisk(.index)), .hx.target("#content"), .hx.pushURL(true)
) {
"Mold-Risk"
navLink(label: "Mold-Risk", route: .moldRisk(.index))
navLink(label: "Dehumidifier-Sizing", route: .dehumidifierSize(.index))
navLink(label: "HVAC-System-Performance", route: .hvacSystemPerformance(.index))
navLink(label: "Room-Pressure", route: .roomPressure(.index))
}
}
}
}
func navLink(label: String, route: SiteRoute.View) -> some HTML<HTMLTag.li> {
li {
a(.class("hover:border-b border-yellow-300"), .hx.get(route: route), .hx.target("#content"), .hx.pushURL(true)) {
label
}
}
}
}
private struct Footer: HTML {
var content: some HTML {
div(.class("bg-blue-500 text-yellow-300 text-sm font-semibold border-t border-yellow-300")) {
div(.class("sm:grid sm:grid-cols-1 lg:flex lg:justify-between")) {
div(.class("grid grid-cols-1 p-4")) {
div(.class("flex")) {
span { "Toolbox icon by" }
a(.class("mx-1"), .href("https://dribbble.com/Laridae?ref=svgrepo.com"), .target(.blank)) {
u { "Laridae" }
}
span { "in CC Attribution License via" }
a(.class("mx-1"), .href("https://www.svgrepo.com/"), .target(.blank)) { u { "SVG Repo" } }
}
li {
a(
.class("[&:hover]:border-b \(border: .yellow)"),
.hx.get(route: .dehumidifierSize(.index)), .hx.target("#content"), .hx.pushURL(true)
) {
"Dehumidifier-Sizing"
}
}
li {
a(
.class("hover:border-b \(border: .yellow)"),
.hx.get(route: .hvacSystemPerformance(.index)), .hx.target("#content"), .hx.pushURL(true)
) {
"HVAC-System-Performance"
}
}
li {
a(
.class("hover:border-b \(border: .yellow)"),
.hx.get(route: .roomPressure(.index)), .hx.target("#content"), .hx.pushURL(true)
) {
"Room-Pressure"
}
div(.class("flex")) {
span { "Other SVG's by" }
a(.class("mx-1"), .href("https://lucide.dev"), .target(.blank)) { u { "Lucide" } }
span { "and licensed under" }
a(.class("mx-1"), .href("https://lucide.dev/license")) { u { "MIT." } }
}
}
div(.class("lg:p-8 sm:p-4")) {
p { "© Copyright 2025 Michael Housh and Dustin Cole" }
}
}
}
}