aboutsummaryrefslogtreecommitdiff
path: root/source/epub/templates/toc.html
blob: b14c9da34b3b7cb7a6a45efc6e086fc93d8e2111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:py="http://genshi.edgewall.org/">
<head>
  <title>${book.title}</title>
  <style type="text/css">
.tocEntry-1 {
}
.tocEntry-2 {
	text-indent: 1em;
}
.tocEntry-3 {
	text-indent: 2em;
}
.tocEntry-4 {
	text-indent: 3em;
}
  </style>
</head>
<body>
  <py:def function="tocEntry(node)">
    <div class="tocEntry-${node.depth}">
      <a href="${node.href}">${node.title}</a>
    </div>
    <py:for each="child in node.children">
    ${tocEntry(child)}
    </py:for>
  </py:def>
  <py:for each="child in book.getTocMapRoot().children">
  ${tocEntry(child)}
  </py:for>
</body>
</html>
bgstack15