Permalink
Browse files

Added the table of contents javascript so it disappears now. (still d…

…oesn't change the icon, though. and fixed an error in the breadcrumbs.
  • Loading branch information...
1 parent 9938254 commit 89a4d2f14d03f822b23ce2624a7e9f7576c0317d Corey Oordt committed Oct 9, 2009
Showing with 23 additions and 2 deletions.
  1. +3 −2 layout.html
  2. +20 −0 static/toc.js
View
@@ -135,9 +135,10 @@
{%- block footer %}
<div id="breadcrumbs">
{%- for parent in parents %}
- <a href="{{ parent.link|e }}" {{ accesskey("U") }}>{{ parent.title }}</a><img src="triangle_closed.png" alt="Right arrow">
+ <a href="{{ parent.link|e }}" {{ accesskey("U") }}>{{ parent.title|safe }}</a><img src="{{ pathto('_static/triangle_closed.png', 1) }}" height="9" width="9" alt="&gt;">
{%- endfor %}
- <a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>
+ {{ title|safe|e }}
</ul>
</div>
+ <script type="text/javascript" charset="utf-8" src="{{ pathto('_static/toc.js', 1) }}"></script>
{%- endblock %}
View
@@ -0,0 +1,20 @@
+var TOC = {
+ load: function () {
+ $('#toc_button').click(TOC.toggle);
+ },
+
+ toggle: function () {
+ if ($('#sphinxsidebar').toggle().is(':hidden')) {
+ $('div.document').css('left', "0px");
+ $('toc_button').removeClass("open");
+ } else {
+ $('div.document').css('left', "230px");
+ $('#toc_button').addClass("open");
+ }
+ return $('#sphinxsidebar');
+ }
+};
+
+$(document).ready(function () {
+ TOC.load();
+});

0 comments on commit 89a4d2f

Please sign in to comment.