-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsummary.html
67 lines (63 loc) · 2.34 KB
/
summary.html
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% extends "./layout.html" %}
{% block title %}Sumário | {{ title }}{% endblock %}
{% block style %}
<link rel="stylesheet" href="{{ staticBase }}/print.css">
{% for resource in plugins.resources.css %}
{% if resource.url %}
<link rel="stylesheet" href="{{ resource.url }}">
{% else %}
<link rel="stylesheet" href="{{ staticBase }}/plugins/{{ resource.path }}">
{% endif %}
{% endfor %}
{% endblock %}
{% block content %}
<div class="page page-toc">
<h1>Sumário</h1>
{% if options.parts %}
<ul>
{% for chapter in summary.chapters %}
{% if loop.index <= options.numIntroChapters %}
<li><a href="{{ basePath }}/{{ chapter.path|mdLink }}">{{ chapter.title }}</a></li>
{% endif %}
{% endfor %}
{% for part in options.parts %}
<li>
<span>{{ part.title }}</span>
{% if part.chapters %}
<ul>
{% for chapter in part.chapters %}
<li>
<a href="{{ basePath }}/{{ chapter.path|mdLink }}">{{ chapter.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<ul>
{% for chapter in summary.chapters %}
<li>
<span>
{% if loop.index <= options.numIntroChapters %}
<a href="{{ basePath }}/{{ chapter.path|mdLink }}">{{ chapter.title }}</a>
{% else %}
<a href="{{ basePath }}/{{ chapter.path|mdLink }}">{{ loop.index - options.numIntroChapters }}. {{ chapter.title }}</a>
{% endif %}
</span>
{% if chapters.sections %}
<ul>
{% for section in chapters.sections %}
<li>
<a href="{{ basePath }}/{{ section.path|mdLink }}">{{ section.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}