blob: 2a32c20391de8aa035e1ff3ec3793d4a7299a14f (
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
|
{%- macro toctree(navlist) -%}
<ol>
{%- for nav in navlist %}
<li>
<a href="{{ nav.refuri }}">{{ nav.text }}</a>
{%- if nav.children %}
{{ toctree(nav.children)|indent(4, true) }}
{%- endif %}
</li>
{%- endfor %}
</ol>
{%- endmacro -%}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops" lang="{{ lang }}" xml:lang="{{ lang }}">
<head>
<title>{{ toc_locale }}</title>
</head>
<body>
<nav epub:type="toc">
<h1>{{ toc_locale }}</h1>
{{ toctree(navlist)|indent(6, true) }}
</nav>
</body>
</html>
|