just-the-docs 0.8.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +90 -1
- data/_includes/components/breadcrumbs.html +60 -108
- data/_includes/components/children_nav.html +72 -16
- data/_includes/components/nav/children.html +48 -0
- data/_includes/components/nav/links.html +53 -0
- data/_includes/components/nav/pages.html +23 -0
- data/_includes/{sorted_pages.html → components/nav/sorted.html} +3 -3
- data/_includes/components/site_nav.html +12 -7
- data/_includes/css/activation.scss.liquid +257 -264
- data/_layouts/default.html +8 -2
- data/_layouts/minimal.html +3 -31
- data/_sass/base.scss +2 -2
- data/_sass/code.scss +4 -4
- data/_sass/labels.scss +2 -2
- data/_sass/layout.scss +45 -29
- data/_sass/navigation.scss +2 -2
- data/_sass/support/mixins/_typography.scss +34 -14
- data/_sass/tables.scss +2 -2
- data/_sass/typography.scss +4 -4
- data/_sass/vendor/OneDarkJekyll/syntax.scss +63 -0
- data/_sass/vendor/OneLightJekyll/syntax.scss +65 -0
- data/_sass/vendor/normalize.scss/normalize.scss +7 -7
- data/assets/js/just-the-docs.js +5 -3
- data/assets/js/zzzz-search-data.json +1 -0
- data/lib/tasks/search.rake +1 -0
- metadata +7 -5
- data/_includes/components/nav.html +0 -75
@@ -21,18 +21,18 @@
|
|
21
21
|
{%- endcomment -%}
|
22
22
|
|
23
23
|
{%- capture activation_no_nav_link %}
|
24
|
-
.site-nav ul li a {
|
25
|
-
|
26
|
-
}
|
27
|
-
|
28
|
-
{%- if site.just_the_docs.collections %}
|
29
|
-
.site-nav > ul.nav-category-list > li > button svg {
|
30
|
-
|
31
|
-
}
|
32
|
-
.site-nav > ul.nav-category-list > li.nav-list-item > ul.nav-list {
|
33
|
-
|
34
|
-
}
|
35
|
-
{%- endif %}
|
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 %}
|
36
36
|
{% endcapture -%}
|
37
37
|
|
38
38
|
{%- capture nav_list_link -%}
|
@@ -45,288 +45,281 @@
|
|
45
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
|
-
|
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
|
-
|
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
|
-
|
72
|
-
|
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;
|
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:
|
112
73
|
|
113
|
-
|
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 -%}
|
174
|
-
|
175
|
-
{%- endif -%}
|
176
|
-
|
177
|
-
{%- endfor -%}
|
74
|
+
site_nav = PAGES? EXTERNALS? COLLECTION*
|
178
75
|
|
179
|
-
|
76
|
+
PAGES = nav_list (nav_list_item PAGES?)+ nav_list_end
|
180
77
|
|
181
|
-
|
78
|
+
EXTERNALS = nav_list nav_list_item+ nav_list_end
|
182
79
|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
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
|
-
{%-
|
175
|
+
{%- endif -%}
|
189
176
|
|
190
|
-
{
|
177
|
+
{%- endfor -%}
|
191
178
|
|
192
|
-
{%-
|
179
|
+
{%- assign nav_levels = nav_levels | where_exp: "item", "item >= 1" -%}
|
193
180
|
|
194
|
-
{%-
|
181
|
+
{%- comment -%}
|
182
|
+
The generated CSS depends on the position of the current page in each level in
|
183
|
+
the navigation.
|
195
184
|
|
196
|
-
|
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
|
-
{%-
|
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
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
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
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
{%-
|
226
|
-
|
227
|
-
{%- capture activation_other_collection_prefix -%}
|
228
|
-
.site-nav > ul.nav-list:not(:first-child)
|
229
|
-
{%- endcapture -%}
|
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 -%}
|
230
214
|
|
231
|
-
{%-
|
215
|
+
{%- if page.collection == nil -%}
|
232
216
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
{%- endif -%}
|
237
|
-
{%- endcapture -%}
|
238
|
-
|
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
|
-
{%-
|
221
|
+
{%- capture activation_other_collection_prefix -%}
|
222
|
+
.site-nav > ul.nav-list:not(:first-child)
|
223
|
+
{%- endcapture -%}
|
244
224
|
|
245
|
-
{%-
|
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
|
-
{
|
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
|
-
{
|
255
|
-
{{
|
256
|
-
{
|
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
|
-
{%-
|
237
|
+
{%- endif -%}
|
261
238
|
|
262
|
-
{
|
263
|
-
|
264
|
-
|
265
|
-
|
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
|
-
{
|
271
|
-
|
272
|
-
{
|
273
|
-
background-image: none;
|
274
|
-
}
|
275
|
-
|
276
|
-
{%- endif %}
|
277
|
-
|
278
|
-
{%- comment -%}
|
279
|
-
The following rule removes the image from the links to pages in other collections.
|
280
|
-
{%- endcomment %}
|
319
|
+
{%- comment -%}
|
320
|
+
not site_nav contains nav_list_link
|
321
|
+
{%- endcomment -%}
|
281
322
|
|
282
|
-
{{
|
283
|
-
.site-nav li.external a {
|
284
|
-
background-image: none;
|
285
|
-
}
|
323
|
+
{{ activation_no_nav_link }}
|
286
324
|
|
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 -%}
|
data/_layouts/default.html
CHANGED
@@ -9,7 +9,13 @@ layout: table_wrappers
|
|
9
9
|
<body>
|
10
10
|
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
11
11
|
{% include icons/icons.html %}
|
12
|
-
{%
|
12
|
+
{% if page.nav_enabled == true %}
|
13
|
+
{% include components/sidebar.html %}
|
14
|
+
{% elsif layout.nav_enabled == true and page.nav_enabled == nil %}
|
15
|
+
{% include components/sidebar.html %}
|
16
|
+
{% elsif site.nav_enabled != false and layout.nav_enabled == nil and page.nav_enabled == nil %}
|
17
|
+
{% include components/sidebar.html %}
|
18
|
+
{% endif %}
|
13
19
|
<div class="main" id="top">
|
14
20
|
{% include components/header.html %}
|
15
21
|
<div class="main-content-wrap">
|
@@ -22,7 +28,7 @@ layout: table_wrappers
|
|
22
28
|
{{ content }}
|
23
29
|
{% endif %}
|
24
30
|
|
25
|
-
{% if page.
|
31
|
+
{% if page.has_toc != false %}
|
26
32
|
{% include components/children_nav.html %}
|
27
33
|
{% endif %}
|
28
34
|
</main>
|
data/_layouts/minimal.html
CHANGED
@@ -1,34 +1,6 @@
|
|
1
1
|
---
|
2
|
-
layout:
|
2
|
+
layout: default
|
3
|
+
nav_enabled: false
|
3
4
|
---
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
<html lang="{{ site.lang | default: 'en-US' }}">
|
8
|
-
{% include head.html %}
|
9
|
-
<body>
|
10
|
-
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
11
|
-
{% include icons/icons.html %}
|
12
|
-
<div class="main-content-wrap" id="top">
|
13
|
-
{% include components/breadcrumbs.html %}
|
14
|
-
<div id="main-content" class="main-content" role="main">
|
15
|
-
{% if site.heading_anchors != false %}
|
16
|
-
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
|
17
|
-
{% else %}
|
18
|
-
{{ content }}
|
19
|
-
{% endif %}
|
20
|
-
|
21
|
-
{% if page.has_children == true and page.has_toc != false %}
|
22
|
-
{% include components/children_nav.html %}
|
23
|
-
{% endif %}
|
24
|
-
|
25
|
-
{% include components/footer.html %}
|
26
|
-
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
{% if site.mermaid %}
|
31
|
-
{% include components/mermaid.html %}
|
32
|
-
{% endif %}
|
33
|
-
</body>
|
34
|
-
</html>
|
6
|
+
{{ content }}
|
data/_sass/base.scss
CHANGED
data/_sass/code.scss
CHANGED
@@ -142,10 +142,10 @@ div.highlighter-rouge {
|
|
142
142
|
|
143
143
|
// for AsciiDoc. we also need to fix the margins for its parent container.
|
144
144
|
div.listingblock {
|
145
|
-
@include scroll-and-spacing("div.content", "div.content > pre");
|
146
|
-
|
147
145
|
margin-top: 0;
|
148
146
|
margin-bottom: $sp-3;
|
147
|
+
|
148
|
+
@include scroll-and-spacing("div.content", "div.content > pre");
|
149
149
|
}
|
150
150
|
|
151
151
|
// {% highlight LANG %}...{% endhighlight %},
|
@@ -176,12 +176,12 @@ figure.highlight {
|
|
176
176
|
|
177
177
|
td,
|
178
178
|
pre {
|
179
|
-
@include fs-2;
|
180
|
-
|
181
179
|
min-width: 0;
|
182
180
|
padding: 0;
|
183
181
|
background-color: $code-background-color;
|
184
182
|
border: 0;
|
183
|
+
|
184
|
+
@include fs-2;
|
185
185
|
}
|
186
186
|
|
187
187
|
td.gl {
|