aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/resources
diff options
context:
space:
mode:
authoridontgetoutmuch <dominic@steinitz.org>2015-12-20 21:01:47 +0000
committeridontgetoutmuch <dominic@steinitz.org>2015-12-20 21:01:47 +0000
commit2bdfda1fb2e0de696ca8c6f7a152b2f85a541be9 (patch)
treecc29895f7d69f051cfec172bb0f8c2ef03552789 /haddock-api/resources
parent5a57a24c44e06e964c4ea2276c842c722c4e93d9 (diff)
parentfa03f80d76f1511a811a0209ea7a6a8b6c58704f (diff)
Merge pull request #1 from haskell/ghc-head
Ghc head
Diffstat (limited to 'haddock-api/resources')
-rw-r--r--haddock-api/resources/html/Ocean.std-theme/ocean.css71
-rw-r--r--haddock-api/resources/html/frames.html2
-rw-r--r--haddock-api/resources/html/haddock-util.js24
-rw-r--r--haddock-api/resources/html/highlight.js27
-rw-r--r--haddock-api/resources/html/solarized.css55
5 files changed, 148 insertions, 31 deletions
diff --git a/haddock-api/resources/html/Ocean.std-theme/ocean.css b/haddock-api/resources/html/Ocean.std-theme/ocean.css
index de436324..139335ac 100644
--- a/haddock-api/resources/html/Ocean.std-theme/ocean.css
+++ b/haddock-api/resources/html/Ocean.std-theme/ocean.css
@@ -41,6 +41,9 @@ a[href]:link { color: rgb(196,69,29); }
a[href]:visited { color: rgb(171,105,84); }
a[href]:hover { text-decoration:underline; }
+a[href].def:link, a[href].def:visited { color: black; }
+a[href].def:hover { color: rgb(78, 98, 114); }
+
/* @end */
/* @group Fonts & Sizes */
@@ -143,15 +146,23 @@ ul.links li a {
background-image: url(plus.gif);
background-repeat: no-repeat;
}
-p.caption.collapser,
-p.caption.expander {
- background-position: 0 0.4em;
-}
.collapser, .expander {
padding-left: 14px;
margin-left: -14px;
cursor: pointer;
}
+p.caption.collapser,
+p.caption.expander {
+ background-position: 0 0.4em;
+}
+
+.instance.collapser, .instance.expander {
+ margin-left: 0px;
+ background-position: left center;
+ min-width: 9px;
+ min-height: 9px;
+}
+
pre {
padding: 0.25em;
@@ -318,6 +329,7 @@ div#style-menu-holder {
height: 80%;
top: 10%;
padding: 0;
+ max-width: 75%;
}
#synopsis .caption {
@@ -378,6 +390,15 @@ div#style-menu-holder {
margin: 0 -0.5em 0 0.5em;
}
+#interface td.src .link {
+ float: right;
+ color: #919191;
+ border-left: 1px solid #919191;
+ background: #f0f0f0;
+ padding: 0 0.5em 0.2em;
+ margin: 0 -0.5em 0 0.5em;
+}
+
#interface span.fixity {
color: #919191;
border-left: 1px solid #919191;
@@ -406,30 +427,39 @@ div#style-menu-holder {
margin-top: 0.8em;
}
-.subs dl {
+.clearfix:after {
+ clear: both;
+ content: " ";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+
+.subs ul {
+ list-style: none;
+ display: table;
margin: 0;
}
-.subs dt {
- float: left;
- clear: left;
- display: block;
+.subs ul li {
+ display: table-row;
+}
+
+.subs ul li dfn {
+ display: table-cell;
+ font-style: normal;
+ font-weight: bold;
margin: 1px 0;
+ white-space: nowrap;
}
-.subs dd {
- float: right;
- width: 90%;
- display: block;
+.subs ul li > .doc {
+ display: table-cell;
padding-left: 0.5em;
margin-bottom: 0.5em;
}
-.subs dd.empty {
- display: none;
-}
-
-.subs dd p {
+.subs ul li > .doc p {
margin: 0;
}
@@ -445,6 +475,11 @@ div#style-menu-holder {
margin-left: 1em;
}
+/* Workaround for bug in Firefox (issue #384) */
+.inst-left {
+ float: left;
+}
+
.top p.src {
border-top: 1px solid #ccc;
}
diff --git a/haddock-api/resources/html/frames.html b/haddock-api/resources/html/frames.html
index 1b4e38d4..e86edb66 100644
--- a/haddock-api/resources/html/frames.html
+++ b/haddock-api/resources/html/frames.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html
+<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
diff --git a/haddock-api/resources/html/haddock-util.js b/haddock-api/resources/html/haddock-util.js
index 9a6fccf7..fc7743fe 100644
--- a/haddock-api/resources/html/haddock-util.js
+++ b/haddock-api/resources/html/haddock-util.js
@@ -131,11 +131,11 @@ function perform_search(full)
var text = document.getElementById("searchbox").value.toLowerCase();
if (text == last_search && !full) return;
last_search = text;
-
+
var table = document.getElementById("indexlist");
var status = document.getElementById("searchmsg");
var children = table.firstChild.childNodes;
-
+
// first figure out the first node with the prefix
var first = bisect(-1);
var last = (first == -1 ? -1 : bisect(1));
@@ -166,7 +166,7 @@ function perform_search(full)
status.innerHTML = "";
}
-
+
function setclass(first, last, status)
{
for (var i = first; i <= last; i++)
@@ -174,8 +174,8 @@ function perform_search(full)
children[i].className = status;
}
}
-
-
+
+
// do a binary search, treating 0 as ...
// return either -1 (no 0's found) or location of most far match
function bisect(dir)
@@ -201,9 +201,9 @@ function perform_search(full)
if (checkitem(i) == 0) return i;
}
return -1;
- }
-
-
+ }
+
+
// from an index, decide what the result is
// 0 = match, -1 is lower, 1 is higher
function checkitem(i)
@@ -212,8 +212,8 @@ function perform_search(full)
if (s == text) return 0;
else return (s > text ? -1 : 1);
}
-
-
+
+
// from an index, get its string
// this abstracts over alternates
function getitem(i)
@@ -229,7 +229,7 @@ function perform_search(full)
}
function setSynopsis(filename) {
- if (parent.window.synopsis) {
+ if (parent.window.synopsis && parent.window.synopsis.location) {
if (parent.window.synopsis.location.replace) {
// In Firefox this avoids adding the change to the history.
parent.window.synopsis.location.replace(filename);
@@ -250,7 +250,7 @@ function addMenuItem(html) {
function adjustForFrames() {
var bodyCls;
-
+
if (parent.location.href == window.location.href) {
// not in frames, so add Frames button
addMenuItem("<a href='#' onclick='reframe();return true;'>Frames</a>");
diff --git a/haddock-api/resources/html/highlight.js b/haddock-api/resources/html/highlight.js
new file mode 100644
index 00000000..1e903bd0
--- /dev/null
+++ b/haddock-api/resources/html/highlight.js
@@ -0,0 +1,27 @@
+
+var highlight = function (on) {
+ return function () {
+ var links = document.getElementsByTagName('a');
+ for (var i = 0; i < links.length; i++) {
+ var that = links[i];
+
+ if (this.href != that.href) {
+ continue;
+ }
+
+ if (on) {
+ that.classList.add("hover-highlight");
+ } else {
+ that.classList.remove("hover-highlight");
+ }
+ }
+ }
+};
+
+window.onload = function () {
+ var links = document.getElementsByTagName('a');
+ for (var i = 0; i < links.length; i++) {
+ links[i].onmouseover = highlight(true);
+ links[i].onmouseout = highlight(false);
+ }
+};
diff --git a/haddock-api/resources/html/solarized.css b/haddock-api/resources/html/solarized.css
new file mode 100644
index 00000000..e83dc5ec
--- /dev/null
+++ b/haddock-api/resources/html/solarized.css
@@ -0,0 +1,55 @@
+body {
+ background-color: #fdf6e3;
+}
+
+.hs-identifier {
+ color: #073642;
+}
+
+.hs-identifier.hs-var {
+}
+
+.hs-identifier.hs-type {
+ color: #5f5faf;
+}
+
+.hs-keyword {
+ color: #af005f;
+}
+
+.hs-string, .hs-char {
+ color: #cb4b16;
+}
+
+.hs-number {
+ color: #268bd2;
+}
+
+.hs-operator {
+ color: #d33682;
+}
+
+.hs-glyph, .hs-special {
+ color: #dc322f;
+}
+
+.hs-comment {
+ color: #8a8a8a;
+}
+
+.hs-pragma {
+ color: #2aa198;
+}
+
+.hs-cpp {
+ color: #859900;
+}
+
+a:link, a:visited {
+ text-decoration: none;
+ border-bottom: 1px solid #eee8d5;
+}
+
+a:hover, a.hover-highlight {
+ background-color: #eee8d5;
+}