opendevsecops-jekyll 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +1755 -0
- data/LICENSE.txt +21 -0
- data/README.md +110 -0
- data/Rakefile +1 -0
- data/_includes/components/aux_nav.html +15 -0
- data/_includes/components/breadcrumbs.html +144 -0
- data/_includes/components/children_nav.html +33 -0
- data/_includes/components/footer.html +34 -0
- data/_includes/components/header.html +11 -0
- data/_includes/components/mermaid.html +45 -0
- data/_includes/components/nav.html +75 -0
- data/_includes/components/search_footer.html +7 -0
- data/_includes/components/search_header.html +9 -0
- data/_includes/components/sidebar.html +32 -0
- data/_includes/components/site_nav.html +67 -0
- data/_includes/css/activation.scss.liquid +332 -0
- data/_includes/css/callouts.scss.liquid +93 -0
- data/_includes/css/custom.scss.liquid +1 -0
- data/_includes/css/just-the-docs.scss.liquid +12 -0
- data/_includes/favicon.html +23 -0
- data/_includes/fix_linenos.html +73 -0
- data/_includes/footer_custom.html +3 -0
- data/_includes/head.html +53 -0
- data/_includes/head_custom.html +0 -0
- data/_includes/header_custom.html +0 -0
- data/_includes/icons/code_copy.html +15 -0
- data/_includes/icons/document.html +6 -0
- data/_includes/icons/expand.html +6 -0
- data/_includes/icons/external_link.html +5 -0
- data/_includes/icons/icons.html +13 -0
- data/_includes/icons/link.html +6 -0
- data/_includes/icons/menu.html +6 -0
- data/_includes/icons/search.html +6 -0
- data/_includes/js/custom.js +0 -0
- data/_includes/lunr/custom-data.json +0 -0
- data/_includes/lunr/custom-index.js +0 -0
- data/_includes/mermaid_config.js +1 -0
- data/_includes/nav_footer_custom.html +0 -0
- data/_includes/search_placeholder_custom.html +1 -0
- data/_includes/sorted_pages.html +109 -0
- data/_includes/title.html +5 -0
- data/_includes/toc_heading_custom.html +1 -0
- data/_layouts/about.html +5 -0
- data/_layouts/default.html +41 -0
- data/_layouts/home.html +5 -0
- data/_layouts/minimal.html +34 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_layouts/table_wrappers.html +7 -0
- data/_sass/base.scss +113 -0
- data/_sass/buttons.scss +127 -0
- data/_sass/code.scss +246 -0
- data/_sass/color_schemes/dark.scss +18 -0
- data/_sass/color_schemes/legacy_light.scss +208 -0
- data/_sass/color_schemes/light.scss +16 -0
- data/_sass/content.scss +239 -0
- data/_sass/custom/custom.scss +1 -0
- data/_sass/custom/setup.scss +1 -0
- data/_sass/labels.scss +37 -0
- data/_sass/layout.scss +209 -0
- data/_sass/modules.scss +17 -0
- data/_sass/navigation.scss +235 -0
- data/_sass/print.scss +40 -0
- data/_sass/search.scss +324 -0
- data/_sass/skiptomain.scss +30 -0
- data/_sass/support/_variables.scss +117 -0
- data/_sass/support/mixins/_buttons.scss +29 -0
- data/_sass/support/mixins/_layout.scss +33 -0
- data/_sass/support/mixins/_typography.scss +84 -0
- data/_sass/support/mixins/mixins.scss +3 -0
- data/_sass/support/support.scss +2 -0
- data/_sass/tables.scss +56 -0
- data/_sass/typography.scss +63 -0
- data/_sass/utilities/_colors.scss +237 -0
- data/_sass/utilities/_layout.scss +101 -0
- data/_sass/utilities/_lists.scss +15 -0
- data/_sass/utilities/_spacing.scss +162 -0
- data/_sass/utilities/_typography.scss +85 -0
- data/_sass/utilities/utilities.scss +5 -0
- data/assets/css/just-the-docs-dark.scss +3 -0
- data/assets/css/just-the-docs-default.scss +8 -0
- data/assets/css/just-the-docs-head-nav.css +24 -0
- data/assets/css/just-the-docs-light.scss +3 -0
- data/assets/js/just-the-docs.js +616 -0
- data/assets/js/zzzz-search-data.json +74 -0
- data/bin/just-the-docs +16 -0
- data/favicon.ico +0 -0
- data/lib/tasks/search.rake +88 -0
- metadata +201 -0
@@ -0,0 +1,332 @@
|
|
1
|
+
{%- comment -%}
|
2
|
+
Include as: {%- include css/activation.scss.liquid -%}
|
3
|
+
Depends on: page.
|
4
|
+
Results in: page-dependent CSS rules for inclusion in a style element,
|
5
|
+
which needs to be disabled when JS is enabled.
|
6
|
+
Includes: components/site_nav.html.
|
7
|
+
Overwrites:
|
8
|
+
activation_no_nav_link, nav_list_link, site_nav,
|
9
|
+
nav_list, nav_list_end, nav_list_item, nav_category_list,
|
10
|
+
nav_list_link_prefix, nav_splits, nav_split, nav_levels,
|
11
|
+
nav_list_less, nav_list_count, nav_end_less, nav_end_count,
|
12
|
+
nav_index, nav_slice_size,
|
13
|
+
activation_collection_prefix, activation_other_collection_prefix.
|
14
|
+
Should not be cached, because it depends on page.
|
15
|
+
{%- endcomment -%}
|
16
|
+
|
17
|
+
{%- comment -%}
|
18
|
+
The CSS rules in activation_no_nav_link are for use on pages excluded from the main navigation.
|
19
|
+
- The first rule ensures that no nav-link has a background image.
|
20
|
+
- The other two rules ensure that all folding collections are expanded.
|
21
|
+
{%- endcomment -%}
|
22
|
+
|
23
|
+
{%- 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 %}
|
36
|
+
{% endcapture -%}
|
37
|
+
|
38
|
+
{%- capture nav_list_link -%}
|
39
|
+
<a href="{{ page.url | relative_url }}" class="nav-list-link">
|
40
|
+
{%- endcapture -%}
|
41
|
+
|
42
|
+
{%- capture site_nav -%}
|
43
|
+
{%- include_cached components/site_nav.html -%}
|
44
|
+
{%- endcapture -%}
|
45
|
+
|
46
|
+
{%- if site_nav contains nav_list_link -%}
|
47
|
+
|
48
|
+
{%- capture nav_list -%}
|
49
|
+
<ul class="nav-list
|
50
|
+
{%- endcapture -%}
|
51
|
+
|
52
|
+
{%- assign nav_list_end = "</ul>" -%}
|
53
|
+
|
54
|
+
{%- capture nav_list_item -%}
|
55
|
+
<li class="nav-list-item
|
56
|
+
{%- endcapture -%}
|
57
|
+
|
58
|
+
{%- capture nav_category_list -%}
|
59
|
+
<ul class="nav-list nav-category-list">
|
60
|
+
{%- endcapture -%}
|
61
|
+
|
62
|
+
{%- assign nav_list_link_prefix =
|
63
|
+
site_nav | split: nav_list_link | first | append: nav_list_link -%}
|
64
|
+
|
65
|
+
{%- assign nav_splits =
|
66
|
+
nav_list_link_prefix | split: nav_list_item | pop -%}
|
67
|
+
|
68
|
+
{%- assign nav_levels = "" | split: "" | push: 1 -%}
|
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);
|
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 -%}
|
178
|
+
|
179
|
+
{%- assign nav_levels = nav_levels | where_exp: "item", "item >= 1" -%}
|
180
|
+
|
181
|
+
{%- endif -%}
|
182
|
+
|
183
|
+
{%- comment -%}
|
184
|
+
The generated CSS depends on the position of the current page in each level in
|
185
|
+
the navigation.
|
186
|
+
{%- endcomment -%}
|
187
|
+
|
188
|
+
{%- if nav_levels[1] == nil -%}
|
189
|
+
|
190
|
+
{{ activation_no_nav_link }}
|
191
|
+
|
192
|
+
{%- else -%}
|
193
|
+
|
194
|
+
{%- if nav_levels[2] == nil and nav_levels[3] -%}
|
195
|
+
|
196
|
+
{{ activation_no_nav_link }}
|
197
|
+
|
198
|
+
{%- else -%}
|
199
|
+
|
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
|
214
|
+
- 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 -%}
|
232
|
+
|
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 -%}
|
238
|
+
|
239
|
+
{%- capture activation_other_collection_prefix -%}
|
240
|
+
.site-nav > ul:not(:nth-of-type({{ nav_levels[0] }}))
|
241
|
+
{%- endcapture -%}
|
242
|
+
|
243
|
+
{%- endif -%}
|
244
|
+
|
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 %}
|
251
|
+
|
252
|
+
{% if nav_levels[3] -%}
|
253
|
+
|
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
|
+
}
|
259
|
+
|
260
|
+
{%- elsif nav_levels[2] -%}
|
261
|
+
|
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
|
+
}
|
267
|
+
|
268
|
+
{%- else -%}
|
269
|
+
|
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
|
+
}
|
275
|
+
|
276
|
+
{%- endif %}
|
277
|
+
|
278
|
+
{%- comment -%}
|
279
|
+
The following rule removes the image from the links to pages in other collections.
|
280
|
+
{%- endcomment %}
|
281
|
+
|
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
|
+
{%- endif -%}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
{%- comment -%}
|
2
|
+
{% include css/callouts.scss.liquid color_scheme = string %}
|
3
|
+
produces SCSS for all the callouts in site.callouts. For the "dark"
|
4
|
+
color scheme, the levels of the text and background colors are reversed.
|
5
|
+
{%- endcomment -%}
|
6
|
+
|
7
|
+
{%- assign callout_background_hue = "000" -%}
|
8
|
+
{%- assign callout_color_hue = "300" -%}
|
9
|
+
{%- if site.callouts_level == "loud" or include.color_scheme == "dark" and site.callouts_level != "quiet" -%}
|
10
|
+
{%- assign callout_background_hue = "300" -%}
|
11
|
+
{%- assign callout_color_hue = "000" -%}
|
12
|
+
{%- endif -%}
|
13
|
+
|
14
|
+
div.opaque {
|
15
|
+
background-color: $body-background-color;
|
16
|
+
}
|
17
|
+
|
18
|
+
{%- for callout in site.callouts %}
|
19
|
+
|
20
|
+
{%- assign callout_opacity = callout[1].opacity | default: site.callouts_opacity | default: 0.2 -%}
|
21
|
+
|
22
|
+
p.{{ callout[0] }}, blockquote.{{ callout[0] }} {
|
23
|
+
background: rgba(${{ callout[1].color }}-{{ callout_background_hue }}, {{ callout_opacity }});
|
24
|
+
border-left: $border-radius solid ${{ callout[1].color }}-{{ callout_color_hue }};
|
25
|
+
border-radius: $border-radius;
|
26
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
27
|
+
padding: .8rem;
|
28
|
+
{% if callout[1].title %}
|
29
|
+
&::before {
|
30
|
+
color: ${{ callout[1].color }}-{{ callout_color_hue }};
|
31
|
+
content: "{{ callout[1].title }}";
|
32
|
+
display: block;
|
33
|
+
font-weight: bold;
|
34
|
+
text-transform: uppercase;
|
35
|
+
font-size: .75em;
|
36
|
+
padding-bottom: .125rem;
|
37
|
+
}
|
38
|
+
{% endif %}
|
39
|
+
> .{{ callout[0] }}-title {
|
40
|
+
color: ${{ callout[1].color }}-{{ callout_color_hue }};
|
41
|
+
display: block;
|
42
|
+
font-weight: bold;
|
43
|
+
text-transform: uppercase;
|
44
|
+
font-size: .75em;
|
45
|
+
padding-bottom: .125rem;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
p.{{ callout[0] }}-title, blockquote.{{ callout[0] }}-title {
|
50
|
+
background: rgba(${{ callout[1].color }}-{{ callout_background_hue }}, {{ callout_opacity }});
|
51
|
+
border-left: $border-radius solid ${{ callout[1].color }}-{{ callout_color_hue }};
|
52
|
+
border-radius: $border-radius;
|
53
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
54
|
+
padding: .8rem;
|
55
|
+
> p:first-child {
|
56
|
+
margin-top: 0;
|
57
|
+
margin-bottom: 0;
|
58
|
+
color: ${{ callout[1].color }}-{{ callout_color_hue }};
|
59
|
+
display: block;
|
60
|
+
font-weight: bold;
|
61
|
+
text-transform: uppercase;
|
62
|
+
font-size: .75em;
|
63
|
+
padding-bottom: .125rem;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
blockquote.{{ callout[0] }} {
|
68
|
+
margin-left: 0;
|
69
|
+
margin-right: 0;
|
70
|
+
|
71
|
+
> p:first-child {
|
72
|
+
margin-top: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
> p:last-child {
|
76
|
+
margin-bottom: 0;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
blockquote.{{ callout[0] }}-title {
|
81
|
+
margin-left: 0;
|
82
|
+
margin-right: 0;
|
83
|
+
|
84
|
+
> p:nth-child(2) {
|
85
|
+
margin-top: 0;
|
86
|
+
}
|
87
|
+
|
88
|
+
> p:last-child {
|
89
|
+
margin-bottom: 0;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
{% endfor -%}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "./custom/custom";
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{% if site.logo %}
|
2
|
+
$logo: "{{ site.logo | relative_url }}";
|
3
|
+
{% endif %}
|
4
|
+
@import "./support/support";
|
5
|
+
@import "./custom/setup";
|
6
|
+
@import "./color_schemes/light";
|
7
|
+
{% unless include.color_scheme == "light" %}
|
8
|
+
@import "./color_schemes/{{ include.color_scheme }}";
|
9
|
+
{% endunless %}
|
10
|
+
@import "./modules";
|
11
|
+
{% include css/callouts.scss.liquid color_scheme = include.color_scheme %}
|
12
|
+
{% include css/custom.scss.liquid %}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{%- comment -%}
|
2
|
+
Include as: {%- include_cached favicon.html -%}
|
3
|
+
Depends on: site.static_files.
|
4
|
+
Results in: HTML for a link to an existing `favicon.ico` file.
|
5
|
+
Overwrites:
|
6
|
+
file.
|
7
|
+
|
8
|
+
The endoflife.date site has 226 pages and 3410 static files. @marcwrobel pointed
|
9
|
+
out that the time taken by evaluating the code in this file on every page when
|
10
|
+
building that site was significant, and suggested making it optional. As it is
|
11
|
+
page-independent, it can easily be cached. Doing that reduced the time taken by
|
12
|
+
rendering `_includes/head.html` from 15.294s to 10.760s, thereby reducing the
|
13
|
+
total build time from 26.074s to 21.656s -- a saving of about 17%.
|
14
|
+
{%- endcomment -%}
|
15
|
+
|
16
|
+
{% for file in site.static_files %}
|
17
|
+
{% if file.path == site.favicon_ico or file.path == '/favicon.ico' %}
|
18
|
+
{% assign favicon = true %}
|
19
|
+
{% endif %}
|
20
|
+
{% endfor %}
|
21
|
+
{% if favicon %}
|
22
|
+
<link rel="icon" href="{{ site.favicon_ico | default: '/favicon.ico' | relative_url }}" type="image/x-icon">
|
23
|
+
{% endif %}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
{%- comment -%}
|
2
|
+
This file was previously used to "fix" the HTML produced by Jekyll for
|
3
|
+
highlighted code with line numbers. While it often resolves layout issues
|
4
|
+
from the missing HTML tags, it still generates invalid HTML (by placing
|
5
|
+
a `<table>` element within a `<code>` block). As such, we no longer
|
6
|
+
recommend using this workaround. For more information, see the
|
7
|
+
"Code snippets with line numbers" docs page:
|
8
|
+
https://just-the-docs.com/docs/ui-components/code/line-numbers/
|
9
|
+
(or, docs/ui-components/line-nos.md/)
|
10
|
+
|
11
|
+
The next portion of this file, including the comments and the workaround,
|
12
|
+
are preserved for backwards comptability.
|
13
|
+
|
14
|
+
ACKNOWLEDGEMENTS
|
15
|
+
|
16
|
+
The implementation was derived from the workaround provided by
|
17
|
+
Dmitry Hrabrov (DeXP) at
|
18
|
+
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
19
|
+
|
20
|
+
EXPLANATION (OLD)
|
21
|
+
|
22
|
+
The HTML produced by Rouge highlighting with line numbers is of the form
|
23
|
+
`code table`. Jekyll always wraps the highlighted HTML
|
24
|
+
with `pre`. This wrapping is not only unnecessary, but also transforms
|
25
|
+
the conforming HTML produced by Rouge to non-conforming HTML, which
|
26
|
+
results in HTML validation error reports.
|
27
|
+
|
28
|
+
The fix removes the outer `pre` tags whenever they contain the pattern
|
29
|
+
`<table class="rouge-table">`.
|
30
|
+
|
31
|
+
Apart from avoiding HTML validation errors, the fix allows the use of
|
32
|
+
the [Jekyll layout for compressing HTML](http://jch.penibelst.de),
|
33
|
+
which relies on `pre` tags not being nested, according to
|
34
|
+
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-172069842
|
35
|
+
|
36
|
+
USAGE
|
37
|
+
|
38
|
+
(Any names can be used for `some_var` and `some_language`.)
|
39
|
+
|
40
|
+
{% capture some_var %}
|
41
|
+
{% highlight some_language linenos %}
|
42
|
+
Some code
|
43
|
+
{% endhighlight %}
|
44
|
+
{% endcapture %}
|
45
|
+
{% include fix_linenos.html code=some_var %}
|
46
|
+
|
47
|
+
For code fences:
|
48
|
+
|
49
|
+
{% capture some_var %}
|
50
|
+
```some_language
|
51
|
+
Some code
|
52
|
+
```
|
53
|
+
{% endcapture %}
|
54
|
+
{% assign some_var = some_var | markdownify %}
|
55
|
+
{% include fix_linenos.html code=some_var %}
|
56
|
+
|
57
|
+
CAVEATS
|
58
|
+
|
59
|
+
The above does not work when `Some code` happens to contain the matched string
|
60
|
+
`<table class="rouge-table">`.
|
61
|
+
|
62
|
+
The use of this file overwrites the variable `fix_linenos_code` with `nil`.
|
63
|
+
|
64
|
+
{%- endcomment -%}
|
65
|
+
|
66
|
+
{% assign fix_linenos_code = include.code %}
|
67
|
+
{% if fix_linenos_code contains '<table class="rouge-table">' %}
|
68
|
+
{% assign fix_linenos_code = fix_linenos_code | replace: '<pre class="highlight">', '<pre>' %}
|
69
|
+
{% assign fix_linenos_code = fix_linenos_code | replace: "<pre><code", "<code" %}
|
70
|
+
{% assign fix_linenos_code = fix_linenos_code | replace: "</code></pre>", "</code>" %}
|
71
|
+
{% endif %}
|
72
|
+
{{ fix_linenos_code }}
|
73
|
+
{% assign fix_linenos_code = nil %}
|
data/_includes/head.html
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
{%- comment -%}
|
2
|
+
Include as: {%- include head.html -%}
|
3
|
+
Depends on: site.ga_tracking, site.ga_tracking_anonymize_ip,
|
4
|
+
site.search_enabled, site.static_files, site.favicon_ico.
|
5
|
+
Results in: HTML for the head element.
|
6
|
+
Includes:
|
7
|
+
css/activation.scss.liquid, head_custom.html.
|
8
|
+
Overwrites:
|
9
|
+
ga_tracking_ids, ga_property, file, favicon.
|
10
|
+
Should not be cached, because included files depend on page.
|
11
|
+
{%- endcomment -%}
|
12
|
+
|
13
|
+
<head>
|
14
|
+
<meta charset="UTF-8">
|
15
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
16
|
+
|
17
|
+
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
|
18
|
+
|
19
|
+
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-head-nav.css' | relative_url }}" id="jtd-head-nav-stylesheet">
|
20
|
+
|
21
|
+
<style id="jtd-nav-activation">
|
22
|
+
{% include css/activation.scss.liquid %}
|
23
|
+
</style>
|
24
|
+
|
25
|
+
{% if site.ga_tracking != nil %}
|
26
|
+
{% assign ga_tracking_ids = site.ga_tracking | split: "," %}
|
27
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_tracking_ids.first }}"></script>
|
28
|
+
<script>
|
29
|
+
window.dataLayer = window.dataLayer || [];
|
30
|
+
function gtag(){dataLayer.push(arguments);}
|
31
|
+
gtag('js', new Date());
|
32
|
+
|
33
|
+
{% for ga_property in ga_tracking_ids %}
|
34
|
+
gtag('config', '{{ ga_property }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
|
35
|
+
{% endfor %}
|
36
|
+
</script>
|
37
|
+
{% endif %}
|
38
|
+
|
39
|
+
{% if site.search_enabled != false %}
|
40
|
+
<script src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
<script src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
|
44
|
+
|
45
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
46
|
+
|
47
|
+
{% include_cached favicon.html %}
|
48
|
+
|
49
|
+
{% seo %}
|
50
|
+
|
51
|
+
{% include head_custom.html %}
|
52
|
+
|
53
|
+
</head>
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
2
|
+
<symbol id="svg-copy" viewBox="0 0 16 16">
|
3
|
+
<title>Copy</title>
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
5
|
+
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
6
|
+
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
7
|
+
</svg>
|
8
|
+
</symbol>
|
9
|
+
<symbol id="svg-copied" viewBox="0 0 16 16">
|
10
|
+
<title>Copied</title>
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
12
|
+
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
13
|
+
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
14
|
+
</svg>
|
15
|
+
</symbol>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<symbol id="svg-doc" viewBox="0 0 24 24">
|
2
|
+
<title>Document</title>
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
4
|
+
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
5
|
+
</svg>
|
6
|
+
</symbol>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
2
|
+
<title>Expand</title>
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
4
|
+
<polyline points="9 18 15 12 9 6"></polyline>
|
5
|
+
</svg>
|
6
|
+
</symbol>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
2
|
+
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
3
|
+
<title id="svg-external-link-title">(external link)</title>
|
4
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
5
|
+
</symbol>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
2
|
+
{% include icons/link.html %}
|
3
|
+
{% include icons/menu.html %}
|
4
|
+
{% include icons/expand.html %}
|
5
|
+
{% include icons/external_link.html %}
|
6
|
+
{% if site.search_enabled != false %}
|
7
|
+
{% include icons/document.html %}
|
8
|
+
{% include icons/search.html %}
|
9
|
+
{% endif %}
|
10
|
+
{% if site.enable_copy_code_button != false %}
|
11
|
+
{% include icons/code_copy.html %}
|
12
|
+
{% endif %}
|
13
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<symbol id="svg-link" viewBox="0 0 24 24">
|
2
|
+
<title>Link</title>
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
4
|
+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
5
|
+
</svg>
|
6
|
+
</symbol>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<symbol id="svg-menu" viewBox="0 0 24 24">
|
2
|
+
<title>Menu</title>
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
4
|
+
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
5
|
+
</svg>
|
6
|
+
</symbol>
|