Shared HTML template for the Website service (#22)
This PR contains the work done to define a `Page` protocol that extracts the HTML scaffolding that `IndexPage` and `ErrorPage` pages duplicated, so every page of the website declares only what makes it unique — its content, title, and assets — while the document structure lives in one place. Also cleans up imports across the workspace. Reviewed-on: rock-n-code/loud-amsterdam#22 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit is contained in:
@@ -25,7 +25,9 @@ public struct RootController<Context: LocalizedRequestContext> {
|
||||
|
||||
/// Creates a root controller.
|
||||
public init() {
|
||||
self.responses = .init { IndexPage(locale: $0) }
|
||||
self.responses = .init {
|
||||
IndexPage(locale: $0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user