Renamed the Error page in the Website library target as NotFound.
This commit is contained in:
+7
-7
@@ -4,7 +4,7 @@ import Infrastructure
|
||||
import Localization
|
||||
|
||||
/// The HTML page rendered for a not-found response, with its text localized to a given locale.
|
||||
struct ErrorPage {
|
||||
struct NotFoundPage {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
@@ -36,29 +36,29 @@ struct ErrorPage {
|
||||
|
||||
// MARK: Page
|
||||
|
||||
extension ErrorPage: Page {
|
||||
extension NotFoundPage: Page {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
var content: some HTML {
|
||||
h1 {
|
||||
localize("error.heading", locale: locale)
|
||||
localize("notFound.heading", locale: locale)
|
||||
}
|
||||
p {
|
||||
localize("error.message", locale: locale)
|
||||
localize("notFound.message", locale: locale)
|
||||
}
|
||||
}
|
||||
|
||||
var scripts: [any Asset] {
|
||||
[StaticFile.error, StaticFile.shared]
|
||||
[StaticFile.notFound, StaticFile.shared]
|
||||
}
|
||||
|
||||
var stylesheets: [any Asset] {
|
||||
[StaticFile.shared, StaticFile.error]
|
||||
[StaticFile.shared, StaticFile.notFound]
|
||||
}
|
||||
|
||||
var title: String {
|
||||
localize("error.title", locale: locale)
|
||||
localize("notFound.title", locale: locale)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user