diff options
Diffstat (limited to 'sphinx/templates/epub3/nav.xhtml_t')
-rw-r--r-- | sphinx/templates/epub3/nav.xhtml_t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sphinx/templates/epub3/nav.xhtml_t b/sphinx/templates/epub3/nav.xhtml_t new file mode 100644 index 0000000..2a32c20 --- /dev/null +++ b/sphinx/templates/epub3/nav.xhtml_t @@ -0,0 +1,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> |