summaryrefslogtreecommitdiff
path: root/src/Settlr/Views/ErrorNotFound.hs
diff options
context:
space:
mode:
authorHannes Schulze <contact@haschu.me>2026-10-03 23:23:51 +0200
committerHannes Schulze <contact@haschu.me>2026-10-03 23:23:51 +0200
commit41dc555f3a4d53a8773a03ac24bed9aea8143bfa (patch)
tree743a584897754dd55a3908e572f5f841282e3afa /src/Settlr/Views/ErrorNotFound.hs
parentb945c36d932efdaac36db284e82637bdf0193263 (diff)
restructure common page layout
Diffstat (limited to 'src/Settlr/Views/ErrorNotFound.hs')
-rw-r--r--src/Settlr/Views/ErrorNotFound.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Settlr/Views/ErrorNotFound.hs b/src/Settlr/Views/ErrorNotFound.hs
index d087c5e..b8c0712 100644
--- a/src/Settlr/Views/ErrorNotFound.hs
+++ b/src/Settlr/Views/ErrorNotFound.hs
@@ -5,6 +5,7 @@ module Settlr.Views.ErrorNotFound
) where
import Settlr.Config (ScriptM)
+import Settlr.UI.Page (page)
import Text.Blaze.Html5 (Html, (!), textValue)
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
@@ -14,11 +15,7 @@ import Network.CGI (setStatus)
viewErrorNotFound :: ScriptM Html
viewErrorNotFound = do setStatus 404 "Not Found"
homePath <- formatRoute RouteHome
- pure $ H.docTypeHtml $ do
- H.head $ do
- H.title "Not Found"
- H.meta ! A.charset "utf-8"
- H.body $ do
- H.h1 "Page Not Found"
- H.p "The requested page could not be found"
- H.a "Go back home" ! A.href (textValue homePath)
+ page "Not Found" $ do
+ H.h1 "Page Not Found"
+ H.p "The requested page could not be found"
+ H.a "Go back home" ! A.href (textValue homePath)