+ where
+ mkListItem :: TrackBack -> IO ListItem
+ mkListItem tb
+ = do zonedTime <- utcToLocalZonedTime (tbTime tb)
+
+ let anchor = Just (Inline (ExternalLink (tbURL tb) label))
+ label = case (tbTitle tb, tbBlogName tb) of
+ (Nothing , Nothing ) -> Nothing
+ (Just title, Nothing ) -> Just title
+ (Nothing , Just blogName) -> Just blogName
+ (Just title, Just blogName) -> Just (title ++ " (" ++ blogName ++ ")")
+ date = Just ( Block ( Div [("class", "date")]
+ [Inline (Text (formatRFC1123DateTime zonedTime))]
+ )
+ )
+ excerpt = do e <- tbExcerpt tb
+ return $ Block $ Paragraph [Text e]
+
+ return $ catMaybes [anchor, date, excerpt]
\ No newline at end of file