{-# LANGUAGE OverloadedStrings #-} module Settlr.Views.ErrorNotFound ( viewErrorNotFound ) 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 import Settlr.Routes (Route(..), formatRoute) import Network.CGI (setStatus) viewErrorNotFound :: ScriptM Html viewErrorNotFound = do setStatus 404 "Not Found" homePath <- formatRoute RouteHome 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)