From 744e19db1eeed2dfe523bc4db81968852e84f397 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 20 Mar 2022 20:07:44 +0100 Subject: server: better html output --- server/HtmlOrphans.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'server') diff --git a/server/HtmlOrphans.hs b/server/HtmlOrphans.hs index 412961b..6438a5e 100644 --- a/server/HtmlOrphans.hs +++ b/server/HtmlOrphans.hs @@ -145,7 +145,7 @@ instance ToHtml (DirResult a) where p_ $ do badge maxlevel "Linted:"; " "; headerText maxlevel - h2_ "Exits" + h3_ "Exits" unless (null dirresultDeps) $ ul_ $ forM_ dirresultDeps $ \missing -> do li_ $ do @@ -187,10 +187,12 @@ instance ToHtml (DirResult a) where h4_ (toHtml name) ul_ $ forM_ mapresultGeneral $ \lint -> li_ (toHtml lint) - h5_ "Layers" - ul_ (listMapWithKey mapresultLayer) - h5_ "Tilesets" - ul_ (listMapWithKey mapresultTileset) + unless (null mapresultLayer) $ do + h5_ "Layers" + ul_ (listMapWithKey mapresultLayer) + unless (null mapresultTileset) $ do + h5_ "Tilesets" + ul_ (listMapWithKey mapresultTileset) where maxlevel = maximumLintLevel res -- cgit v1.2.3