aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/Layout.hs
diff options
context:
space:
mode:
authorMark Lentczner <markl@glyphic.com>2010-07-18 05:34:29 +0000
committerMark Lentczner <markl@glyphic.com>2010-07-18 05:34:29 +0000
commit8b1faf5946561e8c4332187dd25f3b16b6d6c5ef (patch)
tree794bd11a81aad8cfa1b642d3436a401a8c8a3c9a /src/Haddock/Backends/Xhtml/Layout.hs
parentcd8536a66525fc96bc3f612913065ac9ee498873 (diff)
cleaned up div functions in Layout.hs
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Layout.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/Layout.hs39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs
index 081baeb6..3afdd55d 100644
--- a/src/Haddock/Backends/Xhtml/Layout.hs
+++ b/src/Haddock/Backends/Xhtml/Layout.hs
@@ -14,8 +14,8 @@ module Haddock.Backends.Xhtml.Layout (
miniBody,
divPackageHeader, divModuleHeader, divFooter,
- divIndex, divAlphabet, divModuleList, divTableOfContents,
- divDescription, divSynposis, divInterface,
+ divTableOfContents, divDescription, divSynposis, divInterface,
+ divIndex, divAlphabet, divModuleList,
sectionName,
@@ -50,27 +50,32 @@ import GHC
miniBody :: Html -> Html
miniBody = body ! [identifier "mini"]
-divPackageHeader, divModuleHeader, divFooter :: Html -> Html
-divPackageHeader = thediv ! [identifier "package-header"]
-divModuleHeader = thediv ! [identifier "module-header"]
-divFooter = thediv ! [identifier "footer"]
-divIndex, divAlphabet, divModuleList, divTableOfContents :: Html -> Html
-divIndex = thediv ! [identifier "index"]
-divAlphabet = thediv ! [identifier "alphabet"]
-divModuleList = thediv ! [identifier "module-list"]
-divTableOfContents = thediv ! [identifier "table-of-contents"]
+sectionDiv :: String -> Html -> Html
+sectionDiv i = thediv ! [identifier i]
-divDescription, divSynposis, divInterface :: Html -> Html
-divDescription = thediv ! [identifier "description"]
-divSynposis = thediv ! [identifier "synopsis"]
-divInterface = thediv ! [identifier "interface"]
-
--- | The name of a section, used directly after opening a section
sectionName :: Html -> Html
sectionName = paragraph ! [theclass "caption"]
+divPackageHeader, divModuleHeader, divFooter,
+ divTableOfContents, divDescription, divSynposis, divInterface,
+ divIndex, divAlphabet, divModuleList
+ :: Html -> Html
+
+divPackageHeader = sectionDiv "package-header"
+divModuleHeader = sectionDiv "module-header"
+divFooter = sectionDiv "footer"
+divTableOfContents = sectionDiv "table-of-contents"
+divDescription = sectionDiv "description"
+divSynposis = sectionDiv "synopsis"
+divInterface = sectionDiv "interface"
+divIndex = sectionDiv "index"
+divAlphabet = sectionDiv "alphabet"
+divModuleList = sectionDiv "module-list"
+
+
+
-- | Declaration containers
shortDeclList :: [Html] -> Html