Adjust home layout: push my h-card over to the side and display recent entries in the main content area
This commit is contained in:
parent
3ff560e07e
commit
36dea2b5ad
4 changed files with 16 additions and 7 deletions
|
@ -7,19 +7,20 @@ module Handler.Home where
|
|||
|
||||
import Import
|
||||
import Widget.Card ( hCard )
|
||||
import Widget.Feed ( hFeed )
|
||||
|
||||
getHomeR :: Handler Html
|
||||
getHomeR = do
|
||||
user <- runDB . getBy404 $ UniqueUser "dani"
|
||||
let name = userFullName . entityVal $ user
|
||||
userE@(Entity userId user) <- runDB . getBy404 $ UniqueUser "dani"
|
||||
maybeTitle <- asks $ appTitle . appSettings
|
||||
entries <- runDB $ selectList [EntryAuthorId ==. userId] [Desc EntryPublished]
|
||||
defaultLayout $ do
|
||||
case maybeTitle of
|
||||
Just title -> setTitle $ toHtml title
|
||||
Nothing -> return ()
|
||||
toWidgetHead
|
||||
[hamlet|
|
||||
<meta name="author" content=#{name}>
|
||||
<meta name="author" content=#{userFullName user}>
|
||||
<link rel="author" href=@{HomeR}>
|
||||
|]
|
||||
$(widgetFile "home")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue