-
Notifications
You must be signed in to change notification settings - Fork 1
/
chapter.html
206 lines (185 loc) · 6.58 KB
/
chapter.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
---
layout: default
---
{% include build-chapter-nav.html %}
{% if page_chapter_is_draft %}
<div class="markdown-section color-callout-light with-border" style="padding: 5px; padding-left: 10px; font-size: 16px; margin-bottom: 20px;">
This chapter is a
<b>draft</b>.
<a href="{{site.baseurl}}/outline.html">See the outline.</a>
</div>
{% endif %}
<nav aria-label="Breadcrumb" class="breadcrumb markdown-section">
<ul>
{% if site.bookcrumbs.book_url %}
{% capture book_url %}{{site.baseurl}}{{site.bookcrumbs.book_url}}{% endcapture %}
<li>
{% unless book_url == page.url %}
<a href="{{ book_url }}">
{% endunless %}
{% if site.bookcrumbs.book_icon %}<img class="book-icon" src="{{site.baseurl}}/{{ site.bookcrumbs.book_icon }}">{% endif %}
Book
{% unless book_url == page.url %}
</a>
{% endunless %}
</li>
{% endif %}
{% if site.bookcrumbs.contents_url %}
{% capture contents_url %}{{site.baseurl}}{{site.bookcrumbs.contents_url}}{% endcapture %}
<li {% if contents_url == page.url %}class="no-arrow"{% endif %}>
{% if contents_url != page.url %}
<a href="{{ contents_url }}">
{% endif %}
Contents
{% if contents_url != page.url %}
</a>
{% endif %}
</li>
{% endif %}
{% if page_chapter_is_part_index and page_part_num%}
<li class="breadcrumb-part no-arrow">
Part {{ page_part_num }}:
</li>
{% endif %}
{% if page_chapter and page_chapter_is_part_index != true %}
{% unless page_part_unnumbered and page_chapter_num == nil %}
{% if page_part_folder %}
{% unless page_part_unnumbered %}
<li class="breadcrumb-part">
{% if page_part_index_chapter %}
<a href="{{ site.baseurl }}{{ page_part_index_chapter.url }}">
{% endif %}
Part {{ page_part_num }}: {{ page_part_label }}
{% if page_part_index_chapter %}
</a>
{% endif %}
</li>
{% endunless %}
{% endif %}
{% if page_chapter_num %}
<li class="no-arrow">
Chapter {{ page_chapter_num }}.
</li>
{% endif %}
{% endunless %}
{% endif %}
</ul>
</nav>
<section class="normal markdown-section">
{% if page_chapter_is_part_index %}
{% if page_part_num or page_part_label %}
<h1 class="heading-chapter-title heading-part">
{% if page_part_num %}
<div class="printable-only">PART {{ page_part_num }}:</div>
{% endif %}
{{ page_part_label | escape }}
</h1>
{% endif %}
{% else %}
{% if page.title %}
<h1
id="{{ page.slug }}"
data-level="1.1"
class="heading-chapter-title no_toc">
{% if page_chapter_num %}
<div class="printable-only">Chapter {{ page_chapter_num }}:</div>
{% endif %}
{{ page.title | escape }}
</h1>
{% endif %}
{% endif %}
{% if page.abstract %}
<div class="chapter-abstract color-callout-dark">
{{ page.abstract }}
</div>
{% endif %}
{% if site.in_chapter_toc.enabled and page.disable_toc != true and page_chapter_is_part_index != true %}
{% capture in_chapter_toc %}
{% include toc.html html=content h_min=site.sidebar_toc.h_min h_max=site.sidebar_toc.h_max %}{% endcapture %}
{% capture in_chapter_toc %}{{ in_chapter_toc | strip }}{% endcapture %}
{% if in_chapter_toc and in_chapter_toc != "" %}
<div class="page-toc">
<div class="page-toc-heading">
In this chapter:
{{ in_chapter_toc }}
</div>
</div>
{% endif %}
{% endif %}
{{ content }}
{% comment %}{% include chapter-iterate-vars.html inspect="page" %}{% endcomment %}
</section>
{% if page_prev_chapter or page_next_chapter %}
<div class="chapter-pager">
{% if page_next_chapter %}
{% if page_next_chapter_is_part_index %}
{% assign next_title = page_next_part_label %}
{% else %}
{% assign next_title = page_next_chapter.title %}
{% endif %}
<a
href="{{site.baseurl}}{{ page_next_chapter.url }}"
class="chapter-next {% unless page_prev_chapter %}pager-unique{% endunless %}"
aria-label="Next page: {{ next_title | escape }}"
data-level="1.1"
data-path="{{site.baseurl}}{{ page_next_chapter.url }}">
<div class="pager-arrow">
<i class="fa fa-arrow-right"></i>
</div>
<div class="pager-labels">
<div class="part">
Next:
{% if page_next_chapter_is_part_index %}
Part {{ page_next_part_num }}.
{% else %}
{% if page_next_part_label %}
{{ page_next_part_label }}
{% if page_next_chapter_num %} ›{% endif %}
{% endif %}
{% if page_next_chapter_num %}Chapter {{ page_next_chapter_num }}.{% endif %}
{% endif %}
</div>
<div class="chapter-label">
{{ next_title | escape }}
</div>
</div>
</a>
{% endif %}
{% if page_prev_chapter %}
{% if page_prev_chapter_is_part_index %}
{% assign prev_title = page_prev_part_label %}
{% else %}
{% assign prev_title = page_prev_chapter.title %}
{% endif %}
<a
href="{{site.baseurl}}{{ page_prev_chapter.url }}"
class="chapter-prev {% unless page_next_chapter %}pager-unique{% endunless %}"
aria-label="Previous page: {{ prev_title | escape }}"
data-level="1.1"
data-path="{{site.baseurl}}{{ page_prev_chapter.url }}">
<div class="pager-arrow">
<i class="fa fa-arrow-left"></i>
</div>
<div class="pager-labels">
<div class="part">
Previous:
{% if page_prev_chapter_is_part_index %}
Part {{ page_prev_part_num }}.
{% else %}
{% if page_prev_part_label %}
{{ page_prev_part_label }}
{% if page_prev_chapter_num %}›{% endif %}
{% endif %}
{% if page_prev_chapter_num %}Chapter {{ page_prev_chapter_num }}.{% endif %}
{% endif %}
</div>
<div class="chapter-label">
{{ prev_title | escape }}
</div>
</div>
</a>
{% endif %}
<div style="clear: both;"></div>
</div>
<!-- .chapter-pager -->
{% endif %}