diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-11-07 13:31:19 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-11-07 13:41:57 -0800 |
commit | ad157c408cd7ad4badec71a84551a836a343f27b (patch) | |
tree | 946d2bbae8ea8d263539a47faed5c884b6a7f76e /haddock-api/src/Haddock/Backends | |
parent | 2a46036ea4e2e6bb6505ebbfd3e4609aeb7c3845 (diff) |
Allow "Contents" summary to scroll in a fixed div
In the unfortunate event that the "Contents" summary doesn't fit
vertically (like in the "Prelude"), it will be scrollable.
Diffstat (limited to 'haddock-api/src/Haddock/Backends')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml.hs | 4 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs index 2206b7dc..e2fdc509 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml.hs @@ -633,9 +633,9 @@ ppModuleContents pkg qual exports orphan | null sections && not orphan = noHtml | otherwise = contentsDiv where - contentsDiv = divTableOfContents << ( + contentsDiv = divTableOfContents << (divContentsList << ( sectionName << "Contents" +++ - unordList (sections ++ orphanSection)) + unordList (sections ++ orphanSection))) (sections, _leftovers{-should be []-}) = process 0 exports orphanSection diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs index c935bc5f..25d8b07a 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs @@ -15,7 +15,7 @@ module Haddock.Backends.Xhtml.Layout ( divPackageHeader, divContent, divModuleHeader, divFooter, divTableOfContents, divDescription, divSynopsis, divInterface, - divIndex, divAlphabet, divModuleList, + divIndex, divAlphabet, divModuleList, divContentsList, sectionName, nonEmptySectionName, @@ -80,7 +80,7 @@ nonEmptySectionName c divPackageHeader, divContent, divModuleHeader, divFooter, divTableOfContents, divDescription, divSynopsis, divInterface, - divIndex, divAlphabet, divModuleList + divIndex, divAlphabet, divModuleList, divContentsList :: Html -> Html divPackageHeader = sectionDiv "package-header" @@ -88,6 +88,7 @@ divContent = sectionDiv "content" divModuleHeader = sectionDiv "module-header" divFooter = sectionDiv "footer" divTableOfContents = sectionDiv "table-of-contents" +divContentsList = sectionDiv "contents-list" divDescription = sectionDiv "description" divSynopsis = sectionDiv "synopsis" divInterface = sectionDiv "interface" |