feat: Minor updates to try and deploy to digital ocean
This commit is contained in:
@@ -50,12 +50,18 @@ extension ViewController: DependencyKey {
|
||||
switch request.route {
|
||||
case .index:
|
||||
return MainPage {
|
||||
div {
|
||||
div(.class("space-y-6")) {
|
||||
div(.class("pb-8")) {
|
||||
p(.class("dark:text-gray-200")) {
|
||||
"Professional calculators for HVAC system design and troubleshooting."
|
||||
}
|
||||
}
|
||||
|
||||
WarningBox(
|
||||
"This site is still under construction, not all it's functionality is working.",
|
||||
"This page needs updated to display a grid of calculators.",
|
||||
"Below are the SVG's used on the site, for making sure they work."
|
||||
)
|
||||
div {
|
||||
p(.class("font-2xl dark:text-gray-200 pb-6")) {
|
||||
"SVG's"
|
||||
|
||||
@@ -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" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,12 @@ struct RoomPressureForm: HTML, Sendable {
|
||||
div(.class("relative")) {
|
||||
FormHeader(label: "Room Pressure Calculator", svg: .leftRightArrow)
|
||||
|
||||
// FIX: Remove when done testing.
|
||||
WarningBox(
|
||||
"This calculator is currently under construction, so it does not do anything when the form is submitted."
|
||||
)
|
||||
.attributes(.class("mb-8"))
|
||||
|
||||
// Mode toggle / buttons.
|
||||
div(.class("absolute top-0 right-0 flex items-center gap-x-0")) {
|
||||
switch mode {
|
||||
|
||||
Reference in New Issue
Block a user