Fix missing '<li>' around pages by factorizing the 'li_' into navigationSection

This commit is contained in:
Tissevert 2020-09-30 11:44:19 +02:00
parent e0161173ef
commit 371b9a8098

View file

@ -72,9 +72,8 @@ mDLink raw (Markdown {Markdown.path, title}) =
url = absoluteLink $ path <.> (if raw then "md" else "html")
tag :: String -> HtmlGenerator ()
tag name = li_ (
tag name =
a_ [href_ . pack $ absoluteLink name ++ "/", class_ "tag"] $ toHtml name
)
defaultBanner :: HtmlGenerator ()
defaultBanner =
@ -99,7 +98,7 @@ navigationSection sectionId templateKey generator collection
| otherwise =
div_ [id_ sectionId, class_ "navigator"] (do
h2_ . toHtml =<< template templateKey []
ul_ . mapM_ generator $ Map.toList collection
ul_ . mapM_ (li_ . generator) $ Map.toList collection
)
htmlDocument :: HasContent a => a -> HtmlGenerator ()