Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (22 sloc) 631 Bytes
<p><a href="/">Vim Recipes</a> <span>&#8227;</span> <i>Table of
Contents</i></p>
<h1>Table of Contents</h1>
<ul>
<%
@in_sec = false
toc.each do |entry|
if (entry[:type] == :section)
if (@in_sec)
%>
</ul>
</li>
<% end
%>
<li style="list-style:none; padding-top: 0.5em;"><h2><%= entry[:title] %></h2>
<ul>
<% @in_sec = true
else %>
<li><a href="/<%= entry[:section_id] %>/<%= entry[:id] %>/"><%= entry[:title] %></a></li>
<% end
end %>
</ul>