aboutsummaryrefslogtreecommitdiff
path: root/docs/_layouts
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2012-09-25 23:26:56 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2012-09-25 23:26:56 -0700
commitf1246cc7c18bd0c155f920f4dc593e88147a94e4 (patch)
tree7dd8f81eab5261f6f2e707b3b668b9a9cc7bdc50 /docs/_layouts
parent051785c7e67b7ba0f2f0b5e078753d3f4f380961 (diff)
downloadspark-f1246cc7c18bd0c155f920f4dc593e88147a94e4.tar.gz
spark-f1246cc7c18bd0c155f920f4dc593e88147a94e4.tar.bz2
spark-f1246cc7c18bd0c155f920f4dc593e88147a94e4.zip
Various enhancements to the programming guide and HTML/CSS
Diffstat (limited to 'docs/_layouts')
-rwxr-xr-xdocs/_layouts/global.html27
1 files changed, 22 insertions, 5 deletions
diff --git a/docs/_layouts/global.html b/docs/_layouts/global.html
index 5647063288..578814017e 100755
--- a/docs/_layouts/global.html
+++ b/docs/_layouts/global.html
@@ -21,6 +21,7 @@
<link rel="stylesheet" href="{{HOME_PATH}}css/main.css">
<script src="{{HOME_PATH}}js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
+
<link rel="stylesheet" href="{{HOME_PATH}}css/pygments-default.css">
</head>
<body>
@@ -30,7 +31,7 @@
<!-- This code is taken from http://twitter.github.com/bootstrap/examples/hero.html -->
- <div class="navbar navbar-fixed-top">
+ <div class="navbar navbar-fixed-top" id="topbar">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="{{HOME_PATH}}index.html"></a>
@@ -109,12 +110,28 @@
</div> <!-- /container -->
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
-
+ <script src="js/vendor/jquery-1.8.0.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
-
<script src="js/main.js"></script>
+
+ <!-- A script to fix internal hash links because we have an overlapping top bar.
+ Based on https://github.com/twitter/bootstrap/issues/193#issuecomment-2281510 -->
+ <script>
+ $(function() {
+ function maybeScrollToHash() {
+ if (window.location.hash && $(window.location.hash).length) {
+ var newTop = $(window.location.hash).offset().top - $('#topbar').height() - 5;
+ $(window).scrollTop(newTop);
+ }
+ }
+ $(window).bind('hashchange', function() {
+ maybeScrollToHash();
+ });
+ // Scroll now too in case we had opened the page on a hash, but wait 1 ms because some browsers
+ // will try to do *their* initial scroll after running the onReady handler.
+ setTimeout(function() { maybeScrollToHash(); }, 1)
+ })
+ </script>
</body>
</html>