Skip to content

Instantly share code, notes, and snippets.

@jonrohan
Created May 5, 2011 16:28
Show Gist options
  • Save jonrohan/957360 to your computer and use it in GitHub Desktop.
Save jonrohan/957360 to your computer and use it in GitHub Desktop.
{% extends "docs/base.html" %}
{% load compress %}
{% block js %}
{{block.super}}
{% compress js %}
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("ul.toc-sections a.more-info").click(function(){
$(this).parents(".toc-sections:eq(0)").find("li.hidden-section").show();
$(this).hide().parents("li:eq(0)").find(".less-info").show();
return false;
});
$("ul.toc-sections a.less-info").click(function(){
$(this).parents(".toc-sections:eq(0)").find("li.hidden-section").hide();
$(this).hide().parents("li:eq(0)").find(".more-info").show();
return false;
});
});
</script>
{% endcompress %}
{% endblock %}
{% block content %}
<div class="toc-wrapper">
<ul class="toc">
<li class="col">
{% for topic in topics|slice:"0:1" %}
{% include "docs/topic-toc.html" %}
{% endfor %}
{% for topic in topics|slice:"3:4" %}
{% include "docs/topic-toc.html" %}
{% endfor %}
</li>
<li class="col">
{% for topic in topics|slice:"1:2" %}
{% include "docs/topic-toc.html" %}
{% endfor %}
{% for topic in topics|slice:"4:5" %}
{% include "docs/topic-toc.html" %}
{% endfor %}
</li>
<li class="col last-col">
{% for topic in topics|slice:"2:3" %}
{% include "docs/topic-toc.html" %}
{% endfor %}
{% for topic in topics|slice:"5:6" %}
{% include "docs/topic-toc.html" %}
{% endfor %}
</li>
</ul>
</div>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment