diff --git a/src/Component/CatalogGrid.hs b/src/Component/CatalogGrid.hs index ca6f04e..5f55685 100644 --- a/src/Component/CatalogGrid.hs +++ b/src/Component/CatalogGrid.hs @@ -92,13 +92,7 @@ gridItem iface m post = , b_ [][ text post_count_str ] , "+" ] - , p_ - [ class_ "intro" ] - [ span_ - [ class_ "subject" ] - subject - ] - ] ++ body + ] ++ (intro subject) ++ body ) ] @@ -106,6 +100,15 @@ gridItem iface m post = subject :: [ View a ] subject = map (text . toMisoString) $ maybeToList $ CatalogPost.subject post + intro :: [ View a ] -> [ View a ] + intro [] = [] + intro x = (: []) $ p_ + [ class_ "intro" ] + [ span_ + [ class_ "subject" ] + x + ] + body :: [ View a ] body = map (rawHtml . toMisoString) $ maybeToList $ CatalogPost.body post