gonito/Handler/Home.hs

25 lines
744 B
Haskell
Raw Normal View History

2015-08-20 22:33:38 +02:00
module Handler.Home where
import Import
import Handler.Shared
2015-08-20 22:33:38 +02:00
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of the code you will write in Yesod lives in these handler
-- functions. You can spread them across multiple files if you are so
-- inclined, or create a single monolithic file.
getHomeR :: Handler Html
getHomeR = do
2015-11-11 13:25:09 +01:00
maybeUser <- maybeAuth
let maybeLocalId = case maybeUser of
Just user -> userLocalId $ entityVal user
Nothing -> Nothing
defaultLayout $ do
2015-08-20 22:33:38 +02:00
aDomId <- newIdent
2015-11-11 13:25:09 +01:00
setTitle "Welcome To Gonito.net!"
2015-08-20 22:33:38 +02:00
$(widgetFile "homepage")
$(fayFile "Home")