summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorIain McGinniss <iainmcgin@gmail.com>2012-10-26 22:53:29 +0100
committerIain McGinniss <iainmcgin@gmail.com>2012-10-26 22:53:29 +0100
commitbb53357a77105d4c01cc0c7566497f05a7620878 (patch)
tree173585aa52d94951d3d43f002f9d57526f7da966 /resources
parent3340862f0140b7f70dbea250a60fc4e2f41ff01b (diff)
downloadscala-bb53357a77105d4c01cc0c7566497f05a7620878.tar.gz
scala-bb53357a77105d4c01cc0c7566497f05a7620878.tar.bz2
scala-bb53357a77105d4c01cc0c7566497f05a7620878.zip
types chapter fully converted. Added link to jquery and some experimental
code for a fixed pop-out version of the table of contents, which is currently disabled.
Diffstat (limited to 'resources')
-rw-r--r--resources/ScalaReference.js20
-rw-r--r--resources/scala-ref-template.html52
-rw-r--r--resources/style.css20
3 files changed, 41 insertions, 1 deletions
diff --git a/resources/ScalaReference.js b/resources/ScalaReference.js
new file mode 100644
index 0000000000..51be0cf05b
--- /dev/null
+++ b/resources/ScalaReference.js
@@ -0,0 +1,20 @@
+$(function() {
+
+ var popoutTOC = $('<div>');
+ popoutTOC.attr('id', 'popoutTOC');
+
+ var popoutTOChead = $('<span class="head">Jump to...</span>');
+ popoutTOChead.appendTo(popoutTOC);
+
+ var content = $('<div class="links">');
+ $('#TOC > *').clone().appendTo(content);
+ content.appendTo(popoutTOC);
+ var enter = function() { content.css('display', 'block') };
+ var exit = function() { content.css('display', 'none') };
+
+ popoutTOC.hover(enter, exit);
+
+ // disabled for now, until better styled
+ // popoutTOC.appendTo($('body'));
+
+}) \ No newline at end of file
diff --git a/resources/scala-ref-template.html5 b/resources/scala-ref-template.html5
index 424170d3d8..526543d69c 100644
--- a/resources/scala-ref-template.html5
+++ b/resources/scala-ref-template.html5
@@ -26,6 +26,8 @@ $endif$
$for(css)$
<link rel="stylesheet" href="$css$">
$endfor$
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
+ <script type="text/javascript" src="resources/ScalaReference.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
diff --git a/resources/style.css b/resources/style.css
index 833e76815e..fae6e5155a 100644
--- a/resources/style.css
+++ b/resources/style.css
@@ -36,7 +36,9 @@ code {
/* examples */
ol[type="1"] {
list-style-type: none;
- margin-left: 0;
+ margin-left: 3em;
+ margin-right: 3em;
+ padding: 0;
}
ol[type="1"] li {
@@ -48,4 +50,20 @@ ol[type="1"] li {
ol[type="1"] li:before {
content: "Example ";
+}
+
+#popoutTOC {
+ position: fixed;
+ top: 0;
+ left: 0;
+ margin: 0;
+ padding: 0;
+}
+
+#popoutTOC .head {
+
+}
+
+#popoutTOC .links {
+ display: none;
} \ No newline at end of file