just-the-docs 0.2.7 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/_includes/css/custom.scss.liquid +1 -0
- data/_includes/css/just-the-docs.scss.liquid +7 -0
- data/_includes/fix_linenos.html +65 -0
- data/_includes/head.html +7 -7
- data/_includes/nav.html +97 -37
- data/_includes/vendor/anchor_headings.html +53 -9
- data/_layouts/default.html +157 -75
- data/_layouts/table_wrappers.html +1 -1
- data/_sass/base.scss +14 -17
- data/_sass/code.scss +285 -74
- data/_sass/color_schemes/dark.scss +1 -1
- data/_sass/color_schemes/light.scss +0 -0
- data/_sass/content.scss +44 -5
- data/_sass/custom/custom.scss +0 -129
- data/_sass/labels.scss +5 -4
- data/_sass/layout.scss +48 -52
- data/_sass/modules.scss +20 -0
- data/_sass/navigation.scss +149 -50
- data/_sass/print.scss +40 -0
- data/_sass/search.scss +204 -48
- data/_sass/support/_functions.scss +2 -3
- data/_sass/support/_variables.scss +33 -9
- data/_sass/support/mixins/_layout.scss +1 -3
- data/_sass/support/mixins/_typography.scss +25 -22
- data/_sass/typography.scss +13 -7
- data/_sass/utilities/_layout.scss +74 -17
- data/_sass/utilities/_spacing.scss +69 -25
- 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-light.scss +3 -0
- data/assets/js/just-the-docs.js +374 -202
- data/assets/js/zzzz-search-data.json +72 -0
- data/lib/tasks/search.rake +69 -10
- metadata +35 -24
- data/_sass/overrides.scss +0 -3
- data/assets/css/dark-mode-preview.scss +0 -45
- data/assets/css/just-the-docs.scss +0 -49
- data/assets/js/dark-mode-preview.js +0 -23
- data/assets/js/search-data.json +0 -12
data/_sass/base.scss
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
html {
|
16
16
|
@include fs-4;
|
17
|
+
scroll-behavior: smooth;
|
17
18
|
}
|
18
19
|
|
19
20
|
body {
|
@@ -24,25 +25,18 @@ body {
|
|
24
25
|
background-color: $body-background-color;
|
25
26
|
}
|
26
27
|
|
27
|
-
p,
|
28
|
-
h1,
|
29
|
-
h2,
|
30
|
-
h3,
|
31
|
-
h4,
|
32
|
-
h5,
|
33
|
-
h6,
|
34
28
|
ol,
|
35
29
|
ul,
|
30
|
+
dl,
|
36
31
|
pre,
|
37
32
|
address,
|
38
33
|
blockquote,
|
39
|
-
|
34
|
+
table,
|
40
35
|
div,
|
41
|
-
fieldset,
|
42
|
-
form,
|
43
36
|
hr,
|
44
|
-
|
45
|
-
|
37
|
+
form,
|
38
|
+
fieldset,
|
39
|
+
noscript .table-wrapper {
|
46
40
|
margin-top: 0;
|
47
41
|
}
|
48
42
|
|
@@ -52,14 +46,15 @@ h3,
|
|
52
46
|
h4,
|
53
47
|
h5,
|
54
48
|
h6 {
|
55
|
-
margin-top:
|
56
|
-
margin-bottom:
|
49
|
+
margin-top: 0;
|
50
|
+
margin-bottom: 1em;
|
57
51
|
font-weight: 500;
|
58
52
|
line-height: $body-heading-line-height;
|
59
53
|
color: $body-heading-color;
|
60
54
|
}
|
61
55
|
|
62
56
|
p {
|
57
|
+
margin-top: 1em;
|
63
58
|
margin-bottom: 1em;
|
64
59
|
}
|
65
60
|
|
@@ -76,15 +71,17 @@ a:not([class]) {
|
|
76
71
|
background-size: 1px 1px;
|
77
72
|
|
78
73
|
&:hover {
|
79
|
-
background-image: linear-gradient(
|
74
|
+
background-image: linear-gradient(
|
75
|
+
rgba($link-color, 0.45) 0%,
|
76
|
+
rgba($link-color, 0.45) 100%
|
77
|
+
);
|
80
78
|
background-size: 1px 1px;
|
81
|
-
|
82
79
|
}
|
83
80
|
}
|
84
81
|
|
85
82
|
code {
|
86
83
|
font-family: $mono-font-family;
|
87
|
-
font-size:
|
84
|
+
font-size: 0.75em;
|
88
85
|
line-height: $body-line-height;
|
89
86
|
}
|
90
87
|
|
data/_sass/code.scss
CHANGED
@@ -11,93 +11,304 @@ code {
|
|
11
11
|
border-radius: $border-radius;
|
12
12
|
}
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
// Content structure for highlighted code blocks using fences or Liquid
|
15
|
+
//
|
16
|
+
// ```[LANG]...```, no kramdown line_numbers:
|
17
|
+
// div.[language-LANG.]highlighter-rouge > div.highlight > pre.highlight > code
|
18
|
+
//
|
19
|
+
// ```[LANG]...```, kramdown line_numbers = true:
|
20
|
+
// div.[language-LANG.]highlighter-rouge > div.highlight > pre.highlight > code
|
21
|
+
// > div.table-wrapper > table.rouge-table > tbody > tr
|
22
|
+
// > td.rouge-gutter.gl > pre.lineno
|
23
|
+
// | td.rouge-code > pre
|
24
|
+
//
|
25
|
+
// {% highlight LANG %}...{% endhighlight %}:
|
26
|
+
// figure.highlight > pre > code.language-LANG
|
27
|
+
//
|
28
|
+
// {% highlight LANG linenos %}...{% endhighlight %}:
|
29
|
+
// figure.highlight > pre > code.language-LANG
|
30
|
+
// > div.table-wrapper > table.rouge-table > tbody > tr
|
31
|
+
// > td.gutter.gl > pre.lineno
|
32
|
+
// | td.code > pre
|
33
|
+
//
|
34
|
+
// fix_linenos removes the outermost pre when it encloses table.rouge-table
|
35
|
+
//
|
36
|
+
// See docs/index-test.md for some tests.
|
37
|
+
//
|
38
|
+
// No kramdown line_numbers: fences and Liquid highlighting look the same.
|
39
|
+
// Kramdown line_numbers = true: fences have a wider gutter than with Liquid?
|
40
|
+
|
41
|
+
// ```[LANG]...```
|
42
|
+
div.highlighter-rouge {
|
16
43
|
padding: $sp-3;
|
17
|
-
margin-
|
18
|
-
-
|
44
|
+
margin-top: 0;
|
45
|
+
margin-bottom: $sp-3;
|
19
46
|
background-color: $code-background-color;
|
47
|
+
border-radius: $border-radius;
|
48
|
+
box-shadow: none;
|
49
|
+
-webkit-overflow-scrolling: touch;
|
20
50
|
|
51
|
+
div.highlight,
|
52
|
+
pre.highlight,
|
21
53
|
code {
|
22
54
|
padding: 0;
|
55
|
+
margin: 0;
|
23
56
|
border: 0;
|
24
57
|
}
|
25
58
|
}
|
26
59
|
|
27
|
-
|
60
|
+
// {% highlight LANG %}...{% endhighlight %},
|
61
|
+
// {% highlight LANG linenos %}...{% endhighlight %}:
|
62
|
+
figure.highlight {
|
63
|
+
padding: $sp-3;
|
64
|
+
margin-top: 0;
|
28
65
|
margin-bottom: $sp-3;
|
29
|
-
|
66
|
+
background-color: $code-background-color;
|
30
67
|
border-radius: $border-radius;
|
68
|
+
box-shadow: none;
|
69
|
+
-webkit-overflow-scrolling: touch;
|
70
|
+
|
71
|
+
pre,
|
72
|
+
code {
|
73
|
+
padding: 0;
|
74
|
+
margin: 0;
|
75
|
+
border: 0;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
// ```[LANG]...```, kramdown line_numbers = true,
|
80
|
+
// {% highlight LANG linenos %}...{% endhighlight %}:
|
81
|
+
.highlight .table-wrapper {
|
82
|
+
padding: 0;
|
83
|
+
margin: 0;
|
84
|
+
border: 0;
|
85
|
+
box-shadow: none;
|
86
|
+
|
87
|
+
td,
|
88
|
+
pre {
|
89
|
+
@include fs-2;
|
90
|
+
min-width: 0;
|
91
|
+
padding: 0;
|
92
|
+
background-color: $code-background-color;
|
93
|
+
border: 0;
|
94
|
+
}
|
95
|
+
|
96
|
+
td.gl {
|
97
|
+
padding-right: $sp-3;
|
98
|
+
}
|
99
|
+
|
100
|
+
pre {
|
101
|
+
margin: 0;
|
102
|
+
line-height: 2;
|
103
|
+
}
|
31
104
|
}
|
32
105
|
|
33
|
-
.highlight .c {
|
34
|
-
|
35
|
-
|
36
|
-
.highlight .
|
37
|
-
|
38
|
-
|
39
|
-
.highlight .
|
40
|
-
|
41
|
-
|
42
|
-
.highlight .
|
43
|
-
|
44
|
-
|
45
|
-
.highlight .
|
46
|
-
|
47
|
-
|
48
|
-
.highlight .
|
49
|
-
|
50
|
-
|
51
|
-
.highlight .
|
52
|
-
|
53
|
-
|
54
|
-
.highlight .
|
55
|
-
|
56
|
-
|
57
|
-
.highlight .
|
58
|
-
|
59
|
-
|
60
|
-
.highlight .
|
61
|
-
|
62
|
-
|
63
|
-
.highlight .
|
64
|
-
|
65
|
-
|
66
|
-
.highlight .
|
67
|
-
|
68
|
-
|
69
|
-
.highlight .
|
70
|
-
|
71
|
-
|
72
|
-
.highlight .
|
73
|
-
|
74
|
-
|
75
|
-
.highlight .
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
.highlight .
|
80
|
-
|
81
|
-
|
82
|
-
.highlight .
|
83
|
-
|
84
|
-
|
85
|
-
.highlight .
|
86
|
-
|
87
|
-
|
88
|
-
.highlight .
|
89
|
-
|
90
|
-
|
91
|
-
.highlight .
|
92
|
-
|
93
|
-
|
94
|
-
.highlight .
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
.highlight .
|
99
|
-
|
100
|
-
|
106
|
+
.highlight .c {
|
107
|
+
color: #586e75;
|
108
|
+
} // comment //
|
109
|
+
.highlight .err {
|
110
|
+
color: #93a1a1;
|
111
|
+
} // error //
|
112
|
+
.highlight .g {
|
113
|
+
color: #93a1a1;
|
114
|
+
} // generic //
|
115
|
+
.highlight .k {
|
116
|
+
color: #859900;
|
117
|
+
} // keyword //
|
118
|
+
.highlight .l {
|
119
|
+
color: #93a1a1;
|
120
|
+
} // literal //
|
121
|
+
.highlight .n {
|
122
|
+
color: #93a1a1;
|
123
|
+
} // name //
|
124
|
+
.highlight .o {
|
125
|
+
color: #859900;
|
126
|
+
} // operator //
|
127
|
+
.highlight .x {
|
128
|
+
color: #cb4b16;
|
129
|
+
} // other //
|
130
|
+
.highlight .p {
|
131
|
+
color: #93a1a1;
|
132
|
+
} // punctuation //
|
133
|
+
.highlight .cm {
|
134
|
+
color: #586e75;
|
135
|
+
} // comment.multiline //
|
136
|
+
.highlight .cp {
|
137
|
+
color: #859900;
|
138
|
+
} // comment.preproc //
|
139
|
+
.highlight .c1 {
|
140
|
+
color: #586e75;
|
141
|
+
} // comment.single //
|
142
|
+
.highlight .cs {
|
143
|
+
color: #859900;
|
144
|
+
} // comment.special //
|
145
|
+
.highlight .gd {
|
146
|
+
color: #2aa198;
|
147
|
+
} // generic.deleted //
|
148
|
+
.highlight .ge {
|
149
|
+
font-style: italic;
|
150
|
+
color: #93a1a1;
|
151
|
+
} // generic.emph //
|
152
|
+
.highlight .gr {
|
153
|
+
color: #dc322f;
|
154
|
+
} // generic.error //
|
155
|
+
.highlight .gh {
|
156
|
+
color: #cb4b16;
|
157
|
+
} // generic.heading //
|
158
|
+
.highlight .gi {
|
159
|
+
color: #859900;
|
160
|
+
} // generic.inserted //
|
161
|
+
.highlight .go {
|
162
|
+
color: #93a1a1;
|
163
|
+
} // generic.output //
|
164
|
+
.highlight .gp {
|
165
|
+
color: #93a1a1;
|
166
|
+
} // generic.prompt //
|
167
|
+
.highlight .gs {
|
168
|
+
font-weight: bold;
|
169
|
+
color: #93a1a1;
|
170
|
+
} // generic.strong //
|
171
|
+
.highlight .gu {
|
172
|
+
color: #cb4b16;
|
173
|
+
} // generic.subheading //
|
174
|
+
.highlight .gt {
|
175
|
+
color: #93a1a1;
|
176
|
+
} // generic.traceback //
|
177
|
+
.highlight .kc {
|
178
|
+
color: #cb4b16;
|
179
|
+
} // keyword.constant //
|
180
|
+
.highlight .kd {
|
181
|
+
color: #268bd2;
|
182
|
+
} // keyword.declaration //
|
183
|
+
.highlight .kn {
|
184
|
+
color: #859900;
|
185
|
+
} // keyword.namespace //
|
186
|
+
.highlight .kp {
|
187
|
+
color: #859900;
|
188
|
+
} // keyword.pseudo //
|
189
|
+
.highlight .kr {
|
190
|
+
color: #268bd2;
|
191
|
+
} // keyword.reserved //
|
192
|
+
.highlight .kt {
|
193
|
+
color: #dc322f;
|
194
|
+
} // keyword.type //
|
195
|
+
.highlight .ld {
|
196
|
+
color: #93a1a1;
|
197
|
+
} // literal.date //
|
198
|
+
.highlight .m {
|
199
|
+
color: #2aa198;
|
200
|
+
} // literal.number //
|
201
|
+
.highlight .s {
|
202
|
+
color: #2aa198;
|
203
|
+
} // literal.string //
|
204
|
+
.highlight .na {
|
205
|
+
color: #555;
|
206
|
+
} // name.attribute //
|
207
|
+
.highlight .nb {
|
208
|
+
color: #b58900;
|
209
|
+
} // name.builtin //
|
210
|
+
.highlight .nc {
|
211
|
+
color: #268bd2;
|
212
|
+
} // name.class //
|
213
|
+
.highlight .no {
|
214
|
+
color: #cb4b16;
|
215
|
+
} // name.constant //
|
216
|
+
.highlight .nd {
|
217
|
+
color: #268bd2;
|
218
|
+
} // name.decorator //
|
219
|
+
.highlight .ni {
|
220
|
+
color: #cb4b16;
|
221
|
+
} // name.entity //
|
222
|
+
.highlight .ne {
|
223
|
+
color: #cb4b16;
|
224
|
+
} // name.exception //
|
225
|
+
.highlight .nf {
|
226
|
+
color: #268bd2;
|
227
|
+
} // name.function //
|
228
|
+
.highlight .nl {
|
229
|
+
color: #555;
|
230
|
+
} // name.label //
|
231
|
+
.highlight .nn {
|
232
|
+
color: #93a1a1;
|
233
|
+
} // name.namespace //
|
234
|
+
.highlight .nx {
|
235
|
+
color: #555;
|
236
|
+
} // name.other //
|
237
|
+
.highlight .py {
|
238
|
+
color: #93a1a1;
|
239
|
+
} // name.property //
|
240
|
+
.highlight .nt {
|
241
|
+
color: #268bd2;
|
242
|
+
} // name.tag //
|
243
|
+
.highlight .nv {
|
244
|
+
color: #268bd2;
|
245
|
+
} // name.variable //
|
246
|
+
.highlight .ow {
|
247
|
+
color: #859900;
|
248
|
+
} // operator.word //
|
249
|
+
.highlight .w {
|
250
|
+
color: #93a1a1;
|
251
|
+
} // text.whitespace //
|
252
|
+
.highlight .mf {
|
253
|
+
color: #2aa198;
|
254
|
+
} // literal.number.float //
|
255
|
+
.highlight .mh {
|
256
|
+
color: #2aa198;
|
257
|
+
} // literal.number.hex //
|
258
|
+
.highlight .mi {
|
259
|
+
color: #2aa198;
|
260
|
+
} // literal.number.integer //
|
261
|
+
.highlight .mo {
|
262
|
+
color: #2aa198;
|
263
|
+
} // literal.number.oct //
|
264
|
+
.highlight .sb {
|
265
|
+
color: #586e75;
|
266
|
+
} // literal.string.backtick //
|
267
|
+
.highlight .sc {
|
268
|
+
color: #2aa198;
|
269
|
+
} // literal.string.char //
|
270
|
+
.highlight .sd {
|
271
|
+
color: #93a1a1;
|
272
|
+
} // literal.string.doc //
|
273
|
+
.highlight .s2 {
|
274
|
+
color: #2aa198;
|
275
|
+
} // literal.string.double //
|
276
|
+
.highlight .se {
|
277
|
+
color: #cb4b16;
|
278
|
+
} // literal.string.escape //
|
279
|
+
.highlight .sh {
|
280
|
+
color: #93a1a1;
|
281
|
+
} // literal.string.heredoc //
|
282
|
+
.highlight .si {
|
283
|
+
color: #2aa198;
|
284
|
+
} // literal.string.interpol //
|
285
|
+
.highlight .sx {
|
286
|
+
color: #2aa198;
|
287
|
+
} // literal.string.other //
|
288
|
+
.highlight .sr {
|
289
|
+
color: #dc322f;
|
290
|
+
} // literal.string.regex //
|
291
|
+
.highlight .s1 {
|
292
|
+
color: #2aa198;
|
293
|
+
} // literal.string.single //
|
294
|
+
.highlight .ss {
|
295
|
+
color: #2aa198;
|
296
|
+
} // literal.string.symbol //
|
297
|
+
.highlight .bp {
|
298
|
+
color: #268bd2;
|
299
|
+
} // name.builtin.pseudo //
|
300
|
+
.highlight .vc {
|
301
|
+
color: #268bd2;
|
302
|
+
} // name.variable.class //
|
303
|
+
.highlight .vg {
|
304
|
+
color: #268bd2;
|
305
|
+
} // name.variable.global //
|
306
|
+
.highlight .vi {
|
307
|
+
color: #268bd2;
|
308
|
+
} // name.variable.instance //
|
309
|
+
.highlight .il {
|
310
|
+
color: #2aa198;
|
311
|
+
} // literal.number.integer.long //
|
101
312
|
|
102
313
|
//
|
103
314
|
// Code examples (rendered)
|