Skip to content
Snippets Groups Projects
Commit ad157c40 authored by Alec Theriault's avatar Alec Theriault
Browse files

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.
parent 2a46036e
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,9 @@ body.js-enabled .hide-when-js-enabled {
position: fixed;
max-width: 10vw;
top: 10.2em;
left: 2em;
bottom: 1em;
overflow-y: scroll;
}
#synopsis {
......@@ -96,10 +99,6 @@ body.js-enabled .hide-when-js-enabled {
z-index: 1;
}
#table-of-contents {
left: 2em;
}
#synopsis .show {
border: 1px solid #5E5184;
padding: 0.7em;
......@@ -518,7 +517,7 @@ div#style-menu-holder {
/* @group Front Matter */
#synopsis .caption,
#table-of-contents .caption {
#contents-list .caption {
font-size: 1rem;
}
......@@ -526,26 +525,25 @@ div#style-menu-holder {
font-size: 16px;
}
#table-of-contents {
#contents-list {
background: #f7f7f7;
padding: 1em;
margin: 0;
margin-top: 1em;
}
#table-of-contents .caption {
#contents-list .caption {
text-align: left;
margin: 0;
}
#table-of-contents ul {
#contents-list ul {
list-style: none;
margin: 0;
margin-top: 10px;
font-size: 14px;
}
#table-of-contents ul ul {
#contents-list ul ul {
margin-left: 1.5em;
}
......
......@@ -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
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment