From 223a86e2f7bcf83e0e1e45cea82300a9ed7b9219 Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Fri, 26 Oct 2018 09:02:35 -0700 Subject: User manual + stuff for building GHC docs --- ghc.mk | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'ghc.mk') diff --git a/ghc.mk b/ghc.mk index 4bcc4b18..a10fd61a 100644 --- a/ghc.mk +++ b/ghc.mk @@ -40,11 +40,16 @@ utils/haddock_dist_DATA_FILES += html/Classic.theme/haskell_icon.gif utils/haddock_dist_DATA_FILES += html/Classic.theme/minus.gif utils/haddock_dist_DATA_FILES += html/Classic.theme/plus.gif utils/haddock_dist_DATA_FILES += html/Classic.theme/xhaddock.css -utils/haddock_dist_DATA_FILES += html/Ocean.std-theme/hslogo-16.png -utils/haddock_dist_DATA_FILES += html/Ocean.std-theme/minus.gif -utils/haddock_dist_DATA_FILES += html/Ocean.std-theme/ocean.css -utils/haddock_dist_DATA_FILES += html/Ocean.std-theme/plus.gif -utils/haddock_dist_DATA_FILES += html/Ocean.std-theme/synopsis.png +utils/haddock_dist_DATA_FILES += html/Ocean.theme/hslogo-16.png +utils/haddock_dist_DATA_FILES += html/Ocean.theme/minus.gif +utils/haddock_dist_DATA_FILES += html/Ocean.theme/ocean.css +utils/haddock_dist_DATA_FILES += html/Ocean.theme/plus.gif +utils/haddock_dist_DATA_FILES += html/Ocean.theme/synopsis.png +utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/hslogo-16.png +utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/minus.gif +utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/new-ocean.css +utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/plus.gif +utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/synopsis.png utils/haddock_dist_DATA_FILES += html/solarized.css utils/haddock_dist_DATA_FILES += html/highlight.js utils/haddock_dist_DATA_FILES += latex/haddock.sty -- cgit v1.2.3 From 2a46036ea4e2e6bb6505ebbfd3e4609aeb7c3845 Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Wed, 7 Nov 2018 10:22:31 -0800 Subject: Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page --- ghc.mk | 3 --- haddock-api/haddock-api.cabal | 3 --- haddock-api/resources/html/NewOcean.std-theme/minus.gif | Bin 56 -> 0 bytes .../resources/html/NewOcean.std-theme/new-ocean.css | 14 ++++++-------- haddock-api/resources/html/NewOcean.std-theme/plus.gif | Bin 59 -> 0 bytes haddock-api/src/Haddock/Backends/Xhtml.hs | 1 + haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | 7 ++++--- 7 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 haddock-api/resources/html/NewOcean.std-theme/minus.gif delete mode 100644 haddock-api/resources/html/NewOcean.std-theme/plus.gif (limited to 'ghc.mk') diff --git a/ghc.mk b/ghc.mk index a10fd61a..d3b02b6e 100644 --- a/ghc.mk +++ b/ghc.mk @@ -45,10 +45,7 @@ utils/haddock_dist_DATA_FILES += html/Ocean.theme/minus.gif utils/haddock_dist_DATA_FILES += html/Ocean.theme/ocean.css utils/haddock_dist_DATA_FILES += html/Ocean.theme/plus.gif utils/haddock_dist_DATA_FILES += html/Ocean.theme/synopsis.png -utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/hslogo-16.png -utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/minus.gif utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/new-ocean.css -utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/plus.gif utils/haddock_dist_DATA_FILES += html/NewOcean.std-theme/synopsis.png utils/haddock_dist_DATA_FILES += html/solarized.css utils/haddock_dist_DATA_FILES += html/highlight.js diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index d5c976b6..a410f436 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -34,10 +34,7 @@ data-files: html/Ocean.theme/ocean.css html/Ocean.theme/plus.gif html/Ocean.theme/synopsis.png - html/NewOcean.std-theme/hslogo-16.png - html/NewOcean.std-theme/minus.gif html/NewOcean.std-theme/new-ocean.css - html/NewOcean.std-theme/plus.gif html/NewOcean.std-theme/synopsis.png latex/haddock.sty diff --git a/haddock-api/resources/html/NewOcean.std-theme/minus.gif b/haddock-api/resources/html/NewOcean.std-theme/minus.gif deleted file mode 100644 index 1deac2fe..00000000 Binary files a/haddock-api/resources/html/NewOcean.std-theme/minus.gif and /dev/null differ diff --git a/haddock-api/resources/html/NewOcean.std-theme/new-ocean.css b/haddock-api/resources/html/NewOcean.std-theme/new-ocean.css index 8416176c..7568032f 100644 --- a/haddock-api/resources/html/NewOcean.std-theme/new-ocean.css +++ b/haddock-api/resources/html/NewOcean.std-theme/new-ocean.css @@ -352,7 +352,7 @@ ul.links li a { .show { display: inherit; } .clear { clear: both; } -.collapser:before, .expander:before { +.collapser:before, .expander:before, .noexpander:before { font-size: 1.2em; color: #9C5791; display: inline-block; @@ -360,11 +360,15 @@ ul.links li a { } .collapser:before { - content: '⊗'; + content: '⊖'; } .expander:before { content: "⊕"; } +.noexpander:before { + content: "⊕"; + visibility: hidden; +} .collapser, .expander { cursor: pointer; @@ -380,12 +384,6 @@ ul.links li a { summary { cursor: pointer; outline: none; - list-style-image: url(plus.gif); - list-style-position: outside; -} - -details[open] > summary { - list-style-image: url(minus.gif); } pre { diff --git a/haddock-api/resources/html/NewOcean.std-theme/plus.gif b/haddock-api/resources/html/NewOcean.std-theme/plus.gif deleted file mode 100644 index 2d15c141..00000000 Binary files a/haddock-api/resources/html/NewOcean.std-theme/plus.gif and /dev/null differ diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs index 2b8bdd69..2206b7dc 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml.hs @@ -324,6 +324,7 @@ mkNode pkg qual ss p (Node s leaf _pkg srcPkg short ts) = cBtn = case (ts, leaf) of (_:_, Just _) -> thespan ! collapseControl p "" << spaceHtml + ([] , Just _) -> thespan ! [theclass "noexpander"] << spaceHtml (_, _ ) -> noHtml -- We only need an explicit collapser button when the module name -- is also a leaf, and so is a link to a module page. Indeed, the diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs index 10a6d499..c935bc5f 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs @@ -195,17 +195,18 @@ subEquations :: Maybe Package -> Qualification -> [SubDecl] -> Html subEquations pkg qual = divSubDecls "equations" "Equations" . subTable pkg qual --- | Generate sub table for instance declarations, with source +-- | Generate collapsible sub table for instance declarations, with source subInstances :: Maybe Package -> Qualification -> String -- ^ Class name, used for anchor generation -> LinksInfo -> Bool -> [(SubDecl, Maybe Module, Located DocName)] -> Html subInstances pkg qual nm lnks splice = maybe noHtml wrap . instTable where - wrap contents = subSection (collapseDetails id_ DetailsOpen (summary +++ contents)) + wrap contents = subSection (hdr +++ collapseDetails id_ DetailsOpen (summary +++ contents)) instTable = subTableSrc pkg qual lnks splice subSection = thediv ! [theclass "subs instances"] - summary = thesummary << "Instances" + hdr = h4 ! collapseControl id_ "instances" << "Instances" + summary = thesummary ! [ theclass "hide-when-js-enabled" ] << "Instances details" id_ = makeAnchorId $ "i:" ++ nm -- cgit v1.2.3