2026-06-28 05:07:19 +00:00
|
|
|
import Elementary
|
|
|
|
|
|
|
|
|
|
/// The HTML page rendered for a not-found response.
|
|
|
|
|
struct ErrorPage: HTMLDocument, Sendable {
|
|
|
|
|
|
|
|
|
|
// MARK: Document
|
|
|
|
|
|
|
|
|
|
/// The page's content.
|
|
|
|
|
var body: some HTML {
|
|
|
|
|
h1 { "Page Not Found" }
|
|
|
|
|
p { "Sorry, but the page you were trying to view does not exist." }
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 14:18:04 +00:00
|
|
|
/// The metadata and stylesheet link placed in the document head.
|
2026-06-28 05:07:19 +00:00
|
|
|
var head: some HTML {
|
|
|
|
|
meta(.charset(.utf8))
|
|
|
|
|
meta(
|
|
|
|
|
.name(.viewport),
|
|
|
|
|
.content("width=device-width, initial-scale=1")
|
|
|
|
|
)
|
2026-06-28 14:18:04 +00:00
|
|
|
link(
|
|
|
|
|
.rel(.stylesheet),
|
|
|
|
|
.href("/css/error.css")
|
|
|
|
|
)
|
2026-06-28 05:07:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// The document language.
|
|
|
|
|
var lang: String { "en" }
|
|
|
|
|
|
|
|
|
|
/// The document title.
|
|
|
|
|
var title: String { "Page Not Found" }
|
|
|
|
|
|
|
|
|
|
}
|