summaryrefslogtreecommitdiffstats
path: root/sphinx/templates/epub3/nav.xhtml_t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
commitcf7da1843c45a4c2df7a749f7886a2d2ba0ee92a (patch)
tree18dcde1a8d1f5570a77cd0c361de3b490d02c789 /sphinx/templates/epub3/nav.xhtml_t
parentInitial commit. (diff)
downloadsphinx-cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a.tar.xz
sphinx-cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a.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_t26
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>