diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:25:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:25:40 +0000 |
commit | cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a (patch) | |
tree | 18dcde1a8d1f5570a77cd0c361de3b490d02c789 /sphinx/templates/epub3/nav.xhtml_t | |
parent | Initial commit. (diff) | |
download | sphinx-be21195fae81d3ed2bf307cc2df9ad6779da83b0.tar.xz sphinx-be21195fae81d3ed2bf307cc2df9ad6779da83b0.zip |
Adding upstream version 7.2.6.upstream/7.2.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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> |