{-# LANGUAGE UndecidableInstances #-} module IHP.Welcome.Controller where import IHP.ControllerPrelude import IHP.RouterPrelude import IHP.ViewPrelude data WelcomeController = WelcomeAction deriving (Eq, Show, Data) instance CanRoute WelcomeController where parseRoute' = (string "/" <|> string "") *> endOfInput $> WelcomeAction instance HasPath WelcomeController where pathTo WelcomeAction = "/" instance Controller WelcomeController where action WelcomeAction = respondHtml (renderLayout view) view :: Html view = [hsx|

λ IHP

It's working!

Your new application is up and running.

Learn the Next Steps in the Documentation
{icon}

You can change this start page by updating 'startPage WelcomeAction' in 'Web/FrontController.hs'.

|] renderLayout :: Layout renderLayout view = [hsx| Welcome to IHP {view} |] where bodyStyle :: Text bodyStyle = "margin: 0; font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", Arial, sans-serif;" icon = preEscapedToHtml [plain| experience design |]