1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-26 14:23:14 +03:00
This commit is contained in:
Artyom 2016-03-21 02:12:03 +03:00
parent d8fe43b2c7
commit 9b778967a4

View File

@ -355,8 +355,8 @@ renderItem category item =
-- TODO: warn when a library isn't on Hackage but is supposed to be -- TODO: warn when a library isn't on Hackage but is supposed to be
renderItemHeader :: Monad m => Item -> HtmlT m () renderItemTitle :: Monad m => Item -> HtmlT m ()
renderItemHeader item = do renderItemTitle item = do
let hackageLink x = "https://hackage.haskell.org/package/" <> x let hackageLink x = "https://hackage.haskell.org/package/" <> x
case item^.kind of case item^.kind of
-- If the library is on Hackage, the title links to its Hackage -- If the library is on Hackage, the title links to its Hackage
@ -401,7 +401,7 @@ renderItemInfo cat item = do
-- TODO: absolute links again [absolute-links] -- TODO: absolute links again [absolute-links]
let link' = format "/haskell/{}#item-{}" (categorySlug cat, item^.uid) let link' = format "/haskell/{}#item-{}" (categorySlug cat, item^.uid)
a_ [class_ "anchor", href_ link'] "#" a_ [class_ "anchor", href_ link'] "#"
renderItemHeader item renderItemTitle item
emptySpan "2em" emptySpan "2em"
toHtml (fromMaybe "other" (item^.group_)) toHtml (fromMaybe "other" (item^.group_))
span_ [class_ "controls"] $ do span_ [class_ "controls"] $ do
@ -681,7 +681,7 @@ renderItemNotes item = do
renderItemForFeed :: Item -> Html () renderItemForFeed :: Item -> Html ()
renderItemForFeed item = do renderItemForFeed item = do
h1_ $ renderItemHeader item h1_ $ renderItemTitle item
when (item^.description /= "") $ when (item^.description /= "") $
toHtml (item^.description) toHtml (item^.description)
h2_ "Pros" h2_ "Pros"