feat: Adds minimal home page, change license to cc-by-nc-sa license in prep for public availablility.
Some checks failed
CI / Linux Tests (push) Failing after 5m41s
Some checks failed
CI / Linux Tests (push) Failing after 5m41s
This commit is contained in:
@@ -17,6 +17,10 @@ extension ViewController.Request {
|
||||
@Dependency(\.pdfClient) var pdfClient
|
||||
|
||||
switch route {
|
||||
case .home:
|
||||
return await view {
|
||||
HomeView()
|
||||
}
|
||||
case .test:
|
||||
// let projectID = UUID(uuidString: "E796C96C-F527-4753-A00A-EBCF25630663")!
|
||||
// return await view {
|
||||
|
||||
77
Sources/ViewController/Views/Home.swift
Normal file
77
Sources/ViewController/Views/Home.swift
Normal file
@@ -0,0 +1,77 @@
|
||||
import Elementary
|
||||
import ElementaryHTMX
|
||||
|
||||
struct HomeView: HTML, Sendable {
|
||||
|
||||
var body: some HTML {
|
||||
div(.class("hero min-h-screen")) {
|
||||
div(
|
||||
.class(
|
||||
"""
|
||||
hero-content text-center bg-base-200 dark:bg-base-300
|
||||
min-w-[80%] min-h-[400px] rounded-3xl shadow-3xl
|
||||
"""
|
||||
)
|
||||
) {
|
||||
div {
|
||||
header
|
||||
a(
|
||||
.class("btn btn-ghost text-md italic"),
|
||||
.href("https://git.housh.dev/michael/swift-manual-d"),
|
||||
.target(.blank)
|
||||
) {
|
||||
"Open source residential duct design program"
|
||||
}
|
||||
p(.class("text-xl py-6")) {
|
||||
"""
|
||||
Manual-D™ speed sheet, but on the web!
|
||||
"""
|
||||
}
|
||||
button(
|
||||
.class("btn btn-xl bg-violet-600 mt-6"),
|
||||
.hx.get(route: .signup(.index)),
|
||||
.hx.target("body"),
|
||||
.hx.swap(.outerHTML)
|
||||
) {
|
||||
"Get Started"
|
||||
}
|
||||
p(.class("text-xs italic mt-8")) {
|
||||
"""
|
||||
Manual-D™ is a trademark of Air Conditioning Contractors of America (ACCA).
|
||||
|
||||
This site is not designed by or affiliated with ACCA.
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var header: some HTML<HTMLTag.div> {
|
||||
div(.class("flex justify-center items-center")) {
|
||||
div(
|
||||
.class(
|
||||
"""
|
||||
flex border-b-8 border-sky-600
|
||||
text-8xl font-bold my-auto space-2
|
||||
"""
|
||||
)
|
||||
) {
|
||||
h1(.class("me-2")) { "Duct Calc" }
|
||||
div(.class("")) {
|
||||
span(
|
||||
.class(
|
||||
"""
|
||||
bg-violet-600 rounded-md
|
||||
text-5xl rotate-180 p-2
|
||||
"""
|
||||
),
|
||||
.style("writing-mode: vertical-rl")
|
||||
) {
|
||||
"Pro"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,13 @@ public struct MainPage<Inner: HTML>: SendableHTMLDocument where Inner: Sendable
|
||||
p {
|
||||
"Copyright © \(Date().description.prefix(4)) - All rights reserved by Michael Housh"
|
||||
}
|
||||
a(
|
||||
.class("btn btn-ghost"),
|
||||
.href("https://git.housh.dev/michael/swift-manual-d/src/branch/main/LICENSE"),
|
||||
.target(.blank)
|
||||
) {
|
||||
"Openly licensed via CC-BY-NC-SA 4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user