aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml')
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
new file mode 100644
index 0000000000..225f811f0e
--- /dev/null
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
@@ -0,0 +1,13 @@
+<% table = current.parse(current.comment).table_of_contents
+ if table.length > 1 then %>
+<div id="table-of-contents">
+ <nav class="section">
+ <h3 class="section-header">Table of Contents</h3>
+ <ul>
+<% table.each do |heading| %>
+ <li><a href="#<%= heading.aref %>"><%= heading.plain_html %></a>
+<% end %>
+ </ul>
+ </nav>
+</div>
+<% end %>