diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-07-21 17:43:35 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-07-21 17:43:35 +0000 |
commit | 1aa5ee611c0dab8201d282da38c916416ee48eb1 (patch) | |
tree | 69f71d2a51e4cec25bcb98e2c257986ff8259fc3 | |
parent | 8b692e2d3085b43258c54586bbcfd2ab1e6bca62 (diff) |
merge with David's source cleanups
-rw-r--r-- | src/Haddock/Backends/Xhtml/Utils.hs | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs index 92b4afe3..a914d2e8 100644 --- a/src/Haddock/Backends/Xhtml/Utils.hs +++ b/src/Haddock/Backends/Xhtml/Utils.hs @@ -23,10 +23,9 @@ module Haddock.Backends.Xhtml.Utils ( arrow, comma, dcolon, dot, darrow, equals, forallSymbol, quote, hsep, - + + onclick, collapsebutton, collapseId, - - cssFiles, styleSheet, stylePickers, styleMenu ) where @@ -192,38 +191,3 @@ collapsebutton id_ = -- the ECMA script string delimiter used in collapsebutton above. collapseId :: Name -> String collapseId nm = "i:" ++ escapeStr (getOccString nm) - - --- Standard set of style sheets, first is the preferred -cssThemes :: [(String, String)] -cssThemes = [ - ("Classic", "xhaddock.css"), - ("Tibbe", "thaddock.css"), - ("Snappy", "shaddock.css") - ] - -cssFiles :: [String] -cssFiles = map snd cssThemes - -styleSheet :: Html -styleSheet = toHtml $ zipWith mkLink cssThemes rels - where - rels = ("stylesheet" : repeat "alternate stylesheet") - mkLink (aTitle, aFile) aRel = - (thelink ! [href aFile, rel aRel, thetype "text/css", XHtml.title aTitle]) noHtml - -stylePickers :: [Html] -stylePickers = map mkPicker cssThemes - where - mkPicker (aTitle, aFile) = - let js = "setActiveStyleSheet('" ++ aFile ++ "'); return false;" in - anchor ! [href "#", onclick js] << aTitle - -styleMenu :: Html -styleMenu = thediv ! [identifier "style-menu-holder"] << [ - anchor ! [ href "#", onclick js ] << "Style\9662", - unordList stylePickers ! [ identifier "style-menu", theclass "hide" ] - ] - where - js = "styleMenu(); return false;" -
\ No newline at end of file |