aboutsummaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorsimonmar <unknown>2004-03-25 15:17:24 +0000
committersimonmar <unknown>2004-03-25 15:17:24 +0000
commit40f44d7bd3afb519fb92297cf03aa52db2844eda (patch)
tree4e680e63c17b7fb0c91218eaa738a1720d500af2 /html
parent7b87344c5f8aa3017aa6aebc851ce14b7bee0696 (diff)
[haddock @ 2004-03-25 15:17:23 by simonmar]
Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment.
Diffstat (limited to 'html')
-rw-r--r--html/haddock.css2
-rw-r--r--html/haddock.js11
2 files changed, 13 insertions, 0 deletions
diff --git a/html/haddock.css b/html/haddock.css
index 927d1ecd..b853bf76 100644
--- a/html/haddock.css
+++ b/html/haddock.css
@@ -35,6 +35,8 @@ TD.s15 { height: 15px; }
SPAN.keyword { text-decoration: underline; }
+BUTTON.coll { width : 2em; }
+
/* --------- Documentation elements ---------- */
TD.children {
diff --git a/html/haddock.js b/html/haddock.js
new file mode 100644
index 00000000..4f6a2e44
--- /dev/null
+++ b/html/haddock.js
@@ -0,0 +1,11 @@
+// Haddock JavaScript utilities
+function toggle(button,id) {
+ var n = document.getElementById(id).style;
+ if (n.display == "none") {
+ button.childNodes[0].data = "-";
+ n.display = "inline";
+ } else {
+ button.childNodes[0].data = "+";
+ n.display = "none";
+ }
+}