{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} ------------------------------------------------------------------------------- -- | -- Module : Yesod.Comments.View -- Copyright : (c) Patrick Brisbin 2010 -- License : as-is -- -- Maintainer : pbrisbin@gmail.com -- Stability : unstable -- Portability : unportable -- ------------------------------------------------------------------------------- module Yesod.Comments.View ( showComments , showComment ) where import Yesod import Yesod.Comments.Core import Yesod.Comments.Utils import Yesod.Markdown import Data.Time.Format.Human import Data.Monoid (mempty) showComments :: YesodComments m => [Comment] -> WidgetT m IO () showComments comments = [whamlet|
#{commentTimestamp}
, #{name} wrote:
#{markdownToHtml $ cContent comment}
$if mine