just-the-docs 0.9.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,313 +20,306 @@
20
20
  - The other two rules ensure that all folding collections are expanded.
21
21
  {%- endcomment -%}
22
22
 
23
+ {%- capture site_nav -%}
24
+ {%- include_cached components/site_nav.html -%}
25
+ {%- endcapture -%}
26
+
23
27
  {%- capture activation_no_nav_link %}
24
- .site-nav ul li a {
25
- background-image: none;
26
- }
27
-
28
- {%- if site.just_the_docs.collections %}
29
- .site-nav > ul.nav-category-list > li > button svg {
30
- transform: rotate(-90deg);
31
- }
32
- .site-nav > ul.nav-category-list > li.nav-list-item > ul.nav-list {
33
- display: block;
34
- }
35
- {%- endif %}
28
+ .site-nav ul li a {
29
+ background-image: none;
30
+ }
31
+
32
+ {%- if site.just_the_docs.collections %}
33
+ .site-nav > ul.nav-category-list > li > button svg {
34
+ transform: rotate(-90deg);
35
+ }
36
+ .site-nav > ul.nav-category-list > li.nav-list-item > ul.nav-list {
37
+ display: block;
38
+ }
39
+ {%- endif %}
36
40
  {% endcapture -%}
37
41
 
38
42
  {%- capture nav_list_link -%}
39
43
  <a href="{{ page.url | relative_url }}" class="nav-list-link">
40
44
  {%- endcapture -%}
41
45
 
42
- {%- capture site_nav -%}
43
- {%- include_cached components/site_nav.html -%}
44
- {%- endcapture -%}
45
-
46
46
  {%- if site_nav contains nav_list_link -%}
47
47
 
48
- {%- capture nav_list -%}
49
- <ul class="nav-list
50
- {%- endcapture -%}
48
+ {%- capture nav_list -%}
49
+ <ul class="nav-list
50
+ {%- endcapture -%}
51
51
 
52
- {%- assign nav_list_end = "</ul>" -%}
52
+ {%- assign nav_list_end = "</ul>" -%}
53
53
 
54
- {%- capture nav_list_item -%}
55
- <li class="nav-list-item
56
- {%- endcapture -%}
54
+ {%- capture nav_list_item -%}
55
+ <li class="nav-list-item
56
+ {%- endcapture -%}
57
57
 
58
- {%- capture nav_category_list -%}
59
- <ul class="nav-list nav-category-list">
60
- {%- endcapture -%}
58
+ {%- capture nav_category_list -%}
59
+ <ul class="nav-list nav-category-list">
60
+ {%- endcapture -%}
61
61
 
62
- {%- assign nav_list_link_prefix =
63
- site_nav | split: nav_list_link | first | append: nav_list_link -%}
62
+ {%- assign nav_list_link_prefix =
63
+ site_nav | split: nav_list_link | first | append: nav_list_link -%}
64
64
 
65
- {%- assign nav_splits =
66
- nav_list_link_prefix | split: nav_list_item | pop -%}
65
+ {%- assign nav_splits =
66
+ nav_list_link_prefix | split: nav_list_item | pop -%}
67
67
 
68
- {%- assign nav_levels = "" | split: "" | push: 1 -%}
68
+ {%- assign nav_levels = "" | split: "" | push: 1 -%}
69
69
 
70
- {%- comment -%}
71
- The pattern of occurrences of list and list-item tags in the site_nav string
72
- is included in the language defined by the following context-free grammar:
73
-
74
- site_nav = PAGES? EXTERNALS? COLLECTION*
75
-
76
- PAGES = nav_list (nav_list_item PAGES?)+ nav_list_end
77
-
78
- EXTERNALS = nav_list nav_list_item+ nav_list_end
79
-
80
- COLLECTION = nav_list (nav_list_item PAGES?)* nav_list_end
81
- | nav_category_list
82
- nav_list_item nav_list (nav_list_item PAGES?)* nav_list_end
83
- nav_list_end
84
-
85
- To determine the path in the site_nav to the nav_list_link for the current page,
86
- the prefix of nav_list_link in site_nav is split at each nav_list_item to give
87
- an array of nav_splits.
88
-
89
- In site_nav, occurrences of nav_list must be separated by at least one
90
- nav_list_item or nav_list_end. Moreover, when a nav_list_end is followed by a
91
- nav_list without an intervening nav_list_item, that nav_list must start either
92
- a list of external links or a collection. And when a nav_list is followed by a
93
- nav_list_end without an intervening nav_list_item, they form an empty collection.
94
-
95
- nav_levels is the path determined by the previously inspected nav_splits.
96
- How many times nav_list and nav_list_end occur in the current nav_split
97
- determines how to update the path.
98
-
99
- A nav_split can contain any number of empty non-foldable collections.
100
- The path element produced by the outer nav_list of a foldable collection is
101
- irrelevant; it is set to zero and subsequently removed.
102
-
103
- The number of occurrences of a string in a nav_split is computed by removing
104
- them all, then dividing the resulting size difference by the length of the string.
105
-
106
- Case analysis on (nav_list_count, nav_list_end_count):
107
-
108
- - when (0, 0), the nav_split was between two nav_list_items at the same level;
109
-
110
- - when (0, N+1), all the nav_list_ends in the nav_split are in PAGES or in one
111
- COLLECTION;
112
-
113
- - when (M+1, 0), M must be 0 (because two nav_lists in the same nav_split must
114
- be separated by at least one nav_list_end);
70
+ {%- comment -%}
71
+ The pattern of occurrences of list and list-item tags in the site_nav string
72
+ is included in the language defined by the following context-free grammar:
115
73
 
116
- - when (M+1, N+1), the nav_split must contain either:
117
- - the end of PAGES followed by the start of EXTERNALS, or
118
- - the end of PAGES followed by the start of a COLLECTION, or
119
- - the end of EXTERNALS followed by the start of a COLLECTION, or
120
- - the end of one COLLECTION followed by the start of another, or
121
- - (in the first nav_split) one or more empty non-foldable COLLECTIONS
122
- followed by the start of a COLLECTION.
123
- In general, nav_levels[0] here needs to be incremented by nav_list_count.
124
- However, a nav_split that contains the end of an empty foldable collection
125
- followed by the just the start of a collection has two occurrences of nav_list,
126
- and the increment needs to be one less; similarly when the first nav_split
127
- starts with an empty non-foldable collection.
128
- {%- endcomment %}
129
-
130
- {%- for nav_split in nav_splits -%}
131
-
132
- {%- assign nav_list_less = nav_split | remove: nav_list -%}
133
- {%- assign nav_list_count =
134
- nav_split.size | minus: nav_list_less.size |
135
- divided_by: nav_list.size -%}
136
-
137
- {%- assign nav_list_end_less = nav_split | remove: nav_list_end -%}
138
- {%- assign nav_list_end_count =
139
- nav_split.size | minus: nav_list_end_less.size |
140
- divided_by: nav_list_end.size -%}
141
-
142
- {%- if nav_list_count == 0 and nav_list_end_count == 0 -%}
143
-
144
- {%- assign nav_index = nav_levels[-1] | plus: 1 -%}
145
- {%- assign nav_levels = nav_levels | pop | push: nav_index -%}
146
-
147
- {%- elsif nav_list_count == 0 and nav_list_end_count >= 1 -%}
148
-
149
- {%- assign nav_slice_size = nav_levels.size | minus: nav_list_end_count -%}
150
- {%- assign nav_levels = nav_levels | slice: 0, nav_slice_size -%}
151
- {%- assign nav_index = nav_levels[-1] | plus: 1 -%}
152
- {%- assign nav_levels = nav_levels | pop | push: nav_index -%}
153
-
154
- {%- elsif nav_list_count == 1 and nav_list_end_count == 0 -%}
155
-
156
- {%- if nav_split contains nav_category_list -%}
157
- {%- assign nav_levels = nav_levels | push: 0 -%}
158
- {%- else -%}
159
- {%- assign nav_levels = nav_levels | push: 1 -%}
160
- {%- endif -%}
74
+ site_nav = PAGES? EXTERNALS? COLLECTION*
161
75
 
162
- {%- elsif nav_list_count >= 1 and nav_list_end_count >= 1 -%}
76
+ PAGES = nav_list (nav_list_item PAGES?)+ nav_list_end
163
77
 
164
- {%- assign nav_index = nav_levels[0] | plus: nav_list_count -%}
165
- {%- if nav_levels[-1] == 0 or forloop.first -%}
166
- {%- assign nav_index = nav_index | minus: 1 -%}
167
- {%- endif -%}
168
- {%- assign nav_levels = nav_levels | slice: 0, 0 | push: nav_index -%}
169
- {%- if nav_split contains nav_category_list -%}
170
- {%- assign nav_levels = nav_levels | push: 0 -%}
171
- {%- else -%}
172
- {%- assign nav_levels = nav_levels | push: 1 -%}
173
- {%- endif -%}
174
-
175
- {%- endif -%}
176
-
177
- {%- endfor -%}
178
-
179
- {%- assign nav_levels = nav_levels | where_exp: "item", "item >= 1" -%}
180
-
181
- {%- endif -%}
78
+ EXTERNALS = nav_list nav_list_item+ nav_list_end
182
79
 
183
- {%- comment -%}
184
- The generated CSS depends on the position of the current page in each level in
185
- the navigation.
186
- {%- endcomment -%}
80
+ COLLECTION = nav_list (nav_list_item PAGES?)* nav_list_end
81
+ | nav_category_list
82
+ nav_list_item nav_list (nav_list_item PAGES?)* nav_list_end
83
+ nav_list_end
84
+
85
+ To determine the path in the site_nav to the nav_list_link for the current page,
86
+ the prefix of nav_list_link in site_nav is split at each nav_list_item to give
87
+ an array of nav_splits.
88
+
89
+ In site_nav, occurrences of nav_list must be separated by at least one
90
+ nav_list_item or nav_list_end. Moreover, when a nav_list_end is followed by a
91
+ nav_list without an intervening nav_list_item, that nav_list must start either
92
+ a list of external links or a collection. And when a nav_list is followed by a
93
+ nav_list_end without an intervening nav_list_item, they form an empty collection.
94
+
95
+ nav_levels is the path determined by the previously inspected nav_splits.
96
+ How many times nav_list and nav_list_end occur in the current nav_split
97
+ determines how to update the path.
98
+
99
+ A nav_split can contain any number of empty non-foldable collections.
100
+ The path element produced by the outer nav_list of a foldable collection is
101
+ irrelevant; it is set to zero and subsequently removed.
102
+
103
+ The number of occurrences of a string in a nav_split is computed by removing
104
+ them all, then dividing the resulting size difference by the length of the string.
105
+
106
+ Case analysis on (nav_list_count, nav_list_end_count):
107
+
108
+ - when (0, 0), the nav_split was between two nav_list_items at the same level;
109
+
110
+ - when (0, N+1), all the nav_list_ends in the nav_split are in PAGES or in one
111
+ COLLECTION;
112
+
113
+ - when (M+1, 0), M must be 0 (because two nav_lists in the same nav_split must
114
+ be separated by at least one nav_list_end);
115
+
116
+ - when (M+1, N+1), the nav_split must contain either:
117
+ - the end of PAGES followed by the start of EXTERNALS, or
118
+ - the end of PAGES followed by the start of a COLLECTION, or
119
+ - the end of EXTERNALS followed by the start of a COLLECTION, or
120
+ - the end of one COLLECTION followed by the start of another, or
121
+ - (in the first nav_split) one or more empty non-foldable COLLECTIONS
122
+ followed by the start of a COLLECTION.
123
+ In general, nav_levels[0] here needs to be incremented by nav_list_count.
124
+ However, a nav_split that contains the end of an empty foldable collection
125
+ followed by the just the start of a collection has two occurrences of nav_list,
126
+ and the increment needs to be one less; similarly when the first nav_split
127
+ starts with an empty non-foldable collection.
128
+ {%- endcomment %}
129
+
130
+ {%- for nav_split in nav_splits -%}
131
+
132
+ {%- assign nav_list_less = nav_split | remove: nav_list -%}
133
+ {%- assign nav_list_count =
134
+ nav_split.size | minus: nav_list_less.size |
135
+ divided_by: nav_list.size -%}
136
+
137
+ {%- assign nav_list_end_less = nav_split | remove: nav_list_end -%}
138
+ {%- assign nav_list_end_count =
139
+ nav_split.size | minus: nav_list_end_less.size |
140
+ divided_by: nav_list_end.size -%}
141
+
142
+ {%- if nav_list_count == 0 and nav_list_end_count == 0 -%}
143
+
144
+ {%- assign nav_index = nav_levels[-1] | plus: 1 -%}
145
+ {%- assign nav_levels = nav_levels | pop | push: nav_index -%}
146
+
147
+ {%- elsif nav_list_count == 0 and nav_list_end_count >= 1 -%}
148
+
149
+ {%- assign nav_slice_size = nav_levels.size | minus: nav_list_end_count -%}
150
+ {%- assign nav_levels = nav_levels | slice: 0, nav_slice_size -%}
151
+ {%- assign nav_index = nav_levels[-1] | plus: 1 -%}
152
+ {%- assign nav_levels = nav_levels | pop | push: nav_index -%}
153
+
154
+ {%- elsif nav_list_count == 1 and nav_list_end_count == 0 -%}
155
+
156
+ {%- if nav_split contains nav_category_list -%}
157
+ {%- assign nav_levels = nav_levels | push: 0 -%}
158
+ {%- else -%}
159
+ {%- assign nav_levels = nav_levels | push: 1 -%}
160
+ {%- endif -%}
161
+
162
+ {%- elsif nav_list_count >= 1 and nav_list_end_count >= 1 -%}
163
+
164
+ {%- assign nav_index = nav_levels[0] | plus: nav_list_count -%}
165
+ {%- if nav_levels[-1] == 0 or forloop.first -%}
166
+ {%- assign nav_index = nav_index | minus: 1 -%}
167
+ {%- endif -%}
168
+ {%- assign nav_levels = nav_levels | slice: 0, 0 | push: nav_index -%}
169
+ {%- if nav_split contains nav_category_list -%}
170
+ {%- assign nav_levels = nav_levels | push: 0 -%}
171
+ {%- else -%}
172
+ {%- assign nav_levels = nav_levels | push: 1 -%}
173
+ {%- endif -%}
187
174
 
188
- {%- if nav_levels[1] == nil -%}
175
+ {%- endif -%}
189
176
 
190
- {{ activation_no_nav_link }}
177
+ {%- endfor -%}
191
178
 
192
- {%- else -%}
179
+ {%- assign nav_levels = nav_levels | where_exp: "item", "item >= 1" -%}
193
180
 
194
- {%- if nav_levels[2] == nil and nav_levels[3] -%}
181
+ {%- comment -%}
182
+ The generated CSS depends on the position of the current page in each level in
183
+ the navigation.
195
184
 
196
- {{ activation_no_nav_link }}
185
+ nav_page_level is the depth of the navigation hierarchy (ignoring collections).
186
+ In existing 3-level sites, nav_page_level <= 3.
187
+ In multi-level sites, nav_page_level is unbounded.
188
+ {%- endcomment -%}
197
189
 
198
- {%- else -%}
190
+ {%- assign nav_page_level = nav_levels.size | minus: 1 -%}
191
+ {%- assign nav_page_parent_level = nav_page_level | minus: 1 -%}
192
+ {%- assign nav_page_grandparent_level = nav_page_level | minus: 2 -%}
199
193
 
200
- {%- comment -%}
201
- The site-nav is:
202
- - an optional ul.nav-list with li.nav-list-items for non-collection top-level pages
203
- - an optional ul.nav-list with li.nav-list-item.externals
204
- - any number of just-the-docs.collections
205
-
206
- A non-foldable collection is:
207
- - a div.nav-category with the collection name, followed by:
208
- - a ul.nav-list with li.nav-list-items for its top-level pages
209
-
210
- A foldable collection is:
211
- - a ul.nav-list.nav-category-list with a single li.nav-list-item containing:
212
- - an optional button with the expander svg
213
- - a div.nav-category with the collection name
194
+ {%- comment -%}
195
+ The site-nav is:
196
+ - an optional ul.nav-list with li.nav-list-items for non-collection top-level pages
197
+ - an optional ul.nav-list with li.nav-list-item.externals
198
+ - any number of just-the-docs.collections
199
+
200
+ A non-foldable collection is:
201
+ - a div.nav-category with the collection name, followed by:
214
202
  - a ul.nav-list with li.nav-list-items for its top-level pages
215
-
216
- The generated CSS uses:
217
- - activation_collection_prefix, to select the site-nav > ul.nav-list for the page
218
- - activation_other_collection_prefix, to select all the other site-nav > ul.nav-lists
219
- {%- endcomment -%}
220
-
221
- {%- if page.collection == nil -%}
222
-
223
- {%- capture activation_collection_prefix -%}
224
- .site-nav > ul.nav-list:first-child
225
- {%- endcapture -%}
226
-
227
- {%- capture activation_other_collection_prefix -%}
228
- .site-nav > ul.nav-list:not(:first-child)
229
- {%- endcapture -%}
230
-
231
- {%- else -%}
203
+
204
+ A foldable collection is:
205
+ - a ul.nav-list.nav-category-list with a single li.nav-list-item containing:
206
+ - an optional button with the expander svg
207
+ - a div.nav-category with the collection name
208
+ - a ul.nav-list with li.nav-list-items for its top-level pages
209
+
210
+ The generated CSS uses:
211
+ - activation_collection_prefix, to select the site-nav > ul.nav-list for the page
212
+ - activation_other_collection_prefix, to select all the other site-nav > ul.nav-lists
213
+ {%- endcomment -%}
232
214
 
233
- {%- capture activation_collection_prefix -%}
234
- .site-nav > ul:nth-of-type({{ nav_levels[0] }})
235
- {%- if site.just_the_docs.collections[page.collection].nav_fold %} > li > ul
236
- {%- endif -%}
237
- {%- endcapture -%}
215
+ {%- if page.collection == nil -%}
238
216
 
239
- {%- capture activation_other_collection_prefix -%}
240
- .site-nav > ul:not(:nth-of-type({{ nav_levels[0] }}))
241
- {%- endcapture -%}
217
+ {%- capture activation_collection_prefix -%}
218
+ .site-nav > ul.nav-list:first-child
219
+ {%- endcapture -%}
242
220
 
243
- {%- endif -%}
221
+ {%- capture activation_other_collection_prefix -%}
222
+ .site-nav > ul.nav-list:not(:first-child)
223
+ {%- endcapture -%}
244
224
 
245
- {%- comment -%}
246
- The required background image of the link to the current page may involve SCSS.
247
- To avoid page-dependent SCSS, all nav links initially have that background image.
248
- The following rule removes the image from the links to all parents, siblings,
249
- and children of the current page.
250
- {%- endcomment %}
225
+ {%- else -%}
251
226
 
252
- {% if nav_levels[3] -%}
227
+ {%- capture activation_collection_prefix -%}
228
+ .site-nav > ul:nth-of-type({{ nav_levels[0] }})
229
+ {%- if site.just_the_docs.collections[page.collection].nav_fold %} > li > ul
230
+ {%- endif -%}
231
+ {%- endcapture -%}
253
232
 
254
- {{ activation_collection_prefix }} > li > a,
255
- {{ activation_collection_prefix }} > li > ul > li > a,
256
- {{ activation_collection_prefix }} > li > ul > li > ul > li:not(:nth-child({{ nav_levels[3] }})) > a {
257
- background-image: none;
258
- }
233
+ {%- capture activation_other_collection_prefix -%}
234
+ .site-nav > ul:not(:nth-of-type({{ nav_levels[0] }}))
235
+ {%- endcapture -%}
259
236
 
260
- {%- elsif nav_levels[2] -%}
237
+ {%- endif -%}
261
238
 
262
- {{ activation_collection_prefix }} > li > a,
263
- {{ activation_collection_prefix }} > li > ul > li:not(:nth-child({{ nav_levels[2] }})) > a,
264
- {{ activation_collection_prefix }} > li > ul > li > ul > li > a {
265
- background-image: none;
266
- }
239
+ {%- comment -%}
240
+ The required background image of the link to the current page may involve SCSS.
241
+ To avoid page-dependent SCSS, all nav links initially have that background image.
242
+ The following rule removes the image from the links to all parents, siblings,
243
+ and children of the current page.
244
+ {%- endcomment %}
245
+
246
+ {% if nav_page_level >= 2 -%}
247
+ {%- for i in (1..nav_page_parent_level) -%}
248
+ {{ activation_collection_prefix }} >
249
+ {%- for j in (2..i) %} li > ul >
250
+ {%- endfor %} li > a,
251
+ {% endfor -%}
252
+ {%- endif %}
253
+ {{ activation_collection_prefix }} >
254
+ {%- for i in (1..nav_page_parent_level) %} li > ul >
255
+ {%- endfor %} li:not(:nth-child({{ nav_levels[nav_page_level] }})) > a,
256
+ {{ activation_collection_prefix }} >
257
+ {%- for i in (1..nav_page_level) %} li > ul >
258
+ {%- endfor %} li a {
259
+ background-image: none;
260
+ }
261
+
262
+ {%- comment -%}
263
+ The following rule removes the image from the links to pages in other collections.
264
+ {%- endcomment %}
265
+
266
+ {{ activation_other_collection_prefix }} a,
267
+ .site-nav li.external a {
268
+ background-image: none;
269
+ }
270
+
271
+ {%- comment -%}
272
+ The following rule styles the link to the current page.
273
+ {%- endcomment %}
274
+
275
+ {{ activation_collection_prefix }} > li:nth-child({{ nav_levels[1] }})
276
+ {%- for i in (2..nav_page_level) %} > ul > li:nth-child({{ nav_levels[i] }})
277
+ {%- endfor %} > a {
278
+ font-weight: 600;
279
+ text-decoration: none;
280
+ }
281
+
282
+ {%- comment -%}
283
+ The following rules unfold all collections, and display the links to any children
284
+ of the current page.
285
+
286
+ To avoid dependence on the SCSS variable nav-list-expander-right, the direction
287
+ of the rotation of the expander icon is fixed, and corresponds to the appearance
288
+ when nav-list-expander-right is true. This results in a minor visual difference
289
+ between the appearance of active expander icons when JS is enabled/disabled and
290
+ nav-list-expander-right is false, which seems unavoidable.
291
+ {%- endcomment %}
292
+
293
+ {%- if site.just_the_docs.collections %}
294
+ .site-nav > ul.nav-category-list > li > button svg,
295
+ {% endif -%}
296
+ {{ activation_collection_prefix }} > li:nth-child({{ nav_levels[1] }}) > button svg
297
+ {%- for i in (2..nav_page_level) %},
298
+ {{ activation_collection_prefix }} > li:nth-child({{ nav_levels[1] }}) >
299
+ {%- for j in (2..i) %} ul > li:nth-child({{ nav_levels[j] }}) >
300
+ {%- endfor %} button svg
301
+ {%- endfor %} {
302
+ transform: rotate(-90deg);
303
+ }
304
+
305
+ {%- if site.just_the_docs.collections %}
306
+ .site-nav > ul.nav-category-list > li.nav-list-item > ul.nav-list,
307
+ {% endif -%}
308
+ {{ activation_collection_prefix }} > li.nav-list-item:nth-child({{ nav_levels[1] }}) > ul.nav-list
309
+ {%- for i in (2..nav_page_level) %},
310
+ {{ activation_collection_prefix }} > li.nav-list-item:nth-child({{ nav_levels[1] }}) >
311
+ {%- for j in (2..i) %} ul.nav-list > li.nav-list-item:nth-child({{ nav_levels[j] }}) >
312
+ {%- endfor %} ul.nav-list
313
+ {%- endfor %} {
314
+ display: block;
315
+ }
267
316
 
268
317
  {%- else -%}
269
318
 
270
- {{ activation_collection_prefix }} > li:not(:nth-child({{ nav_levels[1] }})) > a,
271
- {{ activation_collection_prefix }} > li > ul > li > a,
272
- {{ activation_collection_prefix }} > li > ul > li > ul > li > a {
273
- background-image: none;
274
- }
319
+ {%- comment -%}
320
+ not site_nav contains nav_list_link
321
+ {%- endcomment -%}
275
322
 
276
- {%- endif %}
277
-
278
- {%- comment -%}
279
- The following rule removes the image from the links to pages in other collections.
280
- {%- endcomment %}
323
+ {{ activation_no_nav_link }}
281
324
 
282
- {{ activation_other_collection_prefix }} a,
283
- .site-nav li.external a {
284
- background-image: none;
285
- }
286
-
287
- {%- comment -%}
288
- The following rule styles the link to the current page.
289
- {%- endcomment %}
290
-
291
- {{ activation_collection_prefix }} > li:nth-child({{ nav_levels[1] }})
292
- {%- if nav_levels[2] %} > ul > li:nth-child({{ nav_levels[2] }})
293
- {%- if nav_levels[3] %} > ul > li:nth-child({{ nav_levels[3] }})
294
- {%- endif -%}
295
- {%- endif %} > a {
296
- font-weight: 600;
297
- text-decoration: none;
298
- }
299
-
300
- {%- comment -%}
301
- The following rules unfold all collections, and display the links to any children
302
- of the current page.
303
-
304
- To avoid dependence on the SCSS variable nav-list-expander-right, the direction
305
- of the rotation of the expander icon is fixed, and corresponds to the appearance
306
- when nav-list-expander-right is true. This results in a minor visual difference
307
- between the appearance of active expander icons when JS is enabled/disabled and
308
- nav-list-expander-right is false, which seems unavoidable.
309
- {%- endcomment %}
310
-
311
- {%- if site.just_the_docs.collections %}
312
- .site-nav > ul.nav-category-list > li > button svg,
313
- {% endif -%}
314
- {{ activation_collection_prefix }} > li:nth-child({{ nav_levels[1] }}) > button svg
315
- {%- if nav_levels[2] -%},
316
- {{ activation_collection_prefix }} > li:nth-child({{ nav_levels[1] }}) > ul > li:nth-child({{ nav_levels[2] }}) > button svg
317
- {%- endif %} {
318
- transform: rotate(-90deg);
319
- }
320
-
321
- {%- if site.just_the_docs.collections %}
322
- .site-nav > ul.nav-category-list > li.nav-list-item > ul.nav-list,
323
- {% endif -%}
324
- {{ activation_collection_prefix }} > li.nav-list-item:nth-child({{ nav_levels[1] }}) > ul.nav-list
325
- {%- if nav_levels[2] %},
326
- {{ activation_collection_prefix }} > li.nav-list-item:nth-child({{ nav_levels[1] }}) > ul.nav-list > li.nav-list-item:nth-child({{ nav_levels[2] }}) > ul.nav-list
327
- {%- endif %} {
328
- display: block;
329
- }
330
-
331
- {%- endif -%}
332
325
  {%- endif -%}
@@ -28,7 +28,7 @@ layout: table_wrappers
28
28
  {{ content }}
29
29
  {% endif %}
30
30
 
31
- {% if page.has_children == true and page.has_toc != false %}
31
+ {% if page.has_toc != false %}
32
32
  {% include components/children_nav.html %}
33
33
  {% endif %}
34
34
  </main>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just-the-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Marsceill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-08-12 00:00:00.000000000 Z
12
+ date: 2025-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -100,7 +100,10 @@ files:
100
100
  - _includes/components/footer.html
101
101
  - _includes/components/header.html
102
102
  - _includes/components/mermaid.html
103
- - _includes/components/nav.html
103
+ - _includes/components/nav/children.html
104
+ - _includes/components/nav/links.html
105
+ - _includes/components/nav/pages.html
106
+ - _includes/components/nav/sorted.html
104
107
  - _includes/components/search_footer.html
105
108
  - _includes/components/search_header.html
106
109
  - _includes/components/sidebar.html
@@ -129,7 +132,6 @@ files:
129
132
  - _includes/mermaid_config.js
130
133
  - _includes/nav_footer_custom.html
131
134
  - _includes/search_placeholder_custom.html
132
- - _includes/sorted_pages.html
133
135
  - _includes/title.html
134
136
  - _includes/toc_heading_custom.html
135
137
  - _includes/vendor/anchor_headings.html