~jonas-drange/ubuntu-start-page/1252899-mobile-friendly

« back to all changes in this revision

Viewing changes to src/Mako-0.1.9/doc/build/templates/toc.html

  • Committer: Matthew Nuzum
  • Date: 2008-04-18 01:58:53 UTC
  • Revision ID: matthew.nuzum@canonical.com-20080418015853-2b8rf979z2c2exxl
adding files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## toc.myt - prints table of contents listings given toc.TOCElement strucures
 
2
 
 
3
<%def name="toc(toc, paged, extension)">
 
4
        <div class="topnav">
 
5
 
 
6
        <a name="full_index"></a>
 
7
        <h3>Table of Contents</h3>
 
8
        
 
9
        ${printtoc(root=toc,paged=paged, extension=extension, current=None,children=True,anchor_toplevel=False)}
 
10
 
 
11
        </div>
 
12
</%def>
 
13
 
 
14
 
 
15
<%def name="printtoc(root, paged, extension, current=None, children=True, anchor_toplevel=False)">
 
16
    <ul>
 
17
    % for item in root.children:
 
18
        <li><A style="${item is current and "font-weight:bold;" or "" }" href="${item.get_link(extension=extension,anchor=anchor_toplevel, usefilename=paged) }">${item.description}</a></li>
 
19
        
 
20
        % if children:
 
21
            ${printtoc(item, current=current, children=True,anchor_toplevel=True, paged=paged, extension=extension)}
 
22
        % endif
 
23
    % endfor
 
24
    </ul>
 
25
</%def>
 
26