just-the-docs 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/_includes/css/custom.scss.liquid +1 -0
- data/_includes/css/just-the-docs.scss.liquid +7 -0
- data/_includes/head.html +19 -13
- data/_includes/head_custom.html +0 -0
- data/_includes/js/custom.js +0 -0
- data/_includes/nav.html +55 -44
- data/_includes/title.html +5 -0
- data/_includes/vendor/anchor_headings.html +100 -0
- data/_layouts/default.html +146 -55
- data/_layouts/table_wrappers.html +7 -0
- data/_layouts/vendor/compress.html +10 -0
- data/_sass/base.scss +16 -18
- data/_sass/buttons.scss +1 -1
- data/_sass/code.scss +211 -72
- data/_sass/color_schemes/dark.scss +4 -1
- data/_sass/color_schemes/light.scss +0 -0
- data/_sass/content.scss +80 -1
- data/_sass/custom/custom.scss +0 -120
- data/_sass/labels.scss +5 -4
- data/_sass/layout.scss +118 -62
- data/_sass/modules.scss +20 -0
- data/_sass/navigation.scss +125 -77
- data/_sass/print.scss +40 -0
- data/_sass/search.scss +263 -56
- data/_sass/support/_functions.scss +2 -3
- data/_sass/support/_variables.scss +27 -22
- data/_sass/support/mixins/_layout.scss +1 -3
- data/_sass/support/mixins/_typography.scss +6 -1
- data/_sass/tables.scss +13 -33
- data/_sass/typography.scss +9 -7
- data/_sass/utilities/_layout.scss +74 -17
- data/_sass/utilities/_lists.scss +7 -1
- 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 +425 -130
- data/assets/js/vendor/lunr.min.js +3 -3
- data/assets/js/zzzz-search-data.json +58 -0
- data/lib/tasks/search.rake +54 -9
- metadata +43 -26
- data/assets/css/dark-mode-preview.scss +0 -41
- data/assets/css/just-the-docs.scss +0 -44
- data/assets/js/search-data.json +0 -12
data/_sass/print.scss
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
// stylelint-disable selector-max-specificity, selector-max-id, selector-max-type, selector-no-qualifying-type, primer/no-override,
|
2
|
+
|
3
|
+
@media print {
|
4
|
+
.site-footer,
|
5
|
+
.site-button,
|
6
|
+
#edit-this-page,
|
7
|
+
#back-to-top,
|
8
|
+
.site-nav,
|
9
|
+
.main-header {
|
10
|
+
display: none !important;
|
11
|
+
}
|
12
|
+
|
13
|
+
.side-bar {
|
14
|
+
width: 100%;
|
15
|
+
height: auto;
|
16
|
+
border-right: 0 !important;
|
17
|
+
}
|
18
|
+
|
19
|
+
.site-header {
|
20
|
+
border-bottom: 1px solid $border-color;
|
21
|
+
}
|
22
|
+
|
23
|
+
.site-title {
|
24
|
+
font-size: $root-font-size !important;
|
25
|
+
font-weight: 700 !important;
|
26
|
+
}
|
27
|
+
|
28
|
+
.text-small {
|
29
|
+
font-size: 8pt !important;
|
30
|
+
}
|
31
|
+
|
32
|
+
pre.highlight {
|
33
|
+
border: 1px solid $border-color;
|
34
|
+
}
|
35
|
+
|
36
|
+
.main {
|
37
|
+
max-width: none;
|
38
|
+
margin-left: 0;
|
39
|
+
}
|
40
|
+
}
|
data/_sass/search.scss
CHANGED
@@ -4,95 +4,122 @@
|
|
4
4
|
|
5
5
|
.search {
|
6
6
|
position: relative;
|
7
|
-
z-index:
|
8
|
-
display: none;
|
7
|
+
z-index: 2;
|
9
8
|
flex-grow: 1;
|
9
|
+
height: $sp-10;
|
10
10
|
padding: $sp-2;
|
11
|
-
|
12
|
-
background-color: $white;
|
13
|
-
border-radius: 3px;
|
14
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 3px 10px rgba(0, 0, 0, 0.05);
|
11
|
+
transition: padding linear #{$transition-duration / 2};
|
15
12
|
|
16
13
|
@include mq(md) {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
padding
|
21
|
-
|
22
|
-
margin-bottom: 0;
|
23
|
-
background-color: transparent;
|
24
|
-
box-shadow: none;
|
25
|
-
}
|
26
|
-
|
27
|
-
&.nav-open {
|
28
|
-
display: block;
|
14
|
+
position: relative !important;
|
15
|
+
width: auto !important;
|
16
|
+
height: 100% !important;
|
17
|
+
padding: 0;
|
18
|
+
transition: none;
|
29
19
|
}
|
30
20
|
}
|
31
21
|
|
32
|
-
.search-
|
33
|
-
|
22
|
+
.search-input-wrap {
|
23
|
+
position: relative;
|
24
|
+
z-index: 1;
|
25
|
+
height: $sp-8;
|
26
|
+
overflow: hidden;
|
27
|
+
border-radius: $border-radius;
|
28
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
29
|
+
transition: height linear #{$transition-duration / 2};
|
34
30
|
|
35
|
-
|
31
|
+
@include mq(md) {
|
36
32
|
position: absolute;
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05);
|
33
|
+
width: 100%;
|
34
|
+
max-width: $search-results-width;
|
35
|
+
height: 100% !important;
|
36
|
+
border-radius: 0;
|
37
|
+
box-shadow: none;
|
38
|
+
transition: width ease $transition-duration;
|
44
39
|
}
|
45
40
|
}
|
46
41
|
|
47
|
-
.search-input-wrap {
|
48
|
-
display: flex;
|
49
|
-
background-color: $body-background-color;
|
50
|
-
}
|
51
|
-
|
52
42
|
.search-input {
|
43
|
+
position: absolute;
|
53
44
|
width: 100%;
|
54
|
-
|
55
|
-
padding-
|
56
|
-
|
45
|
+
height: 100%;
|
46
|
+
padding-top: $sp-2;
|
47
|
+
padding-right: $gutter-spacing-sm;
|
48
|
+
padding-bottom: $sp-2;
|
49
|
+
padding-left: #{$gutter-spacing-sm + $sp-5};
|
50
|
+
font-size: 16px;
|
51
|
+
background-color: $search-background-color;
|
57
52
|
border-top: 0;
|
58
53
|
border-right: 0;
|
59
54
|
border-bottom: 0;
|
60
55
|
border-left: 0;
|
61
|
-
|
56
|
+
border-radius: 0;
|
57
|
+
|
58
|
+
@include mq(md) {
|
59
|
+
padding-top: $gutter-spacing-sm;
|
60
|
+
padding-bottom: $gutter-spacing-sm;
|
61
|
+
padding-left: #{$gutter-spacing + $sp-5};
|
62
|
+
font-size: 14px;
|
63
|
+
background-color: $body-background-color;
|
64
|
+
transition: padding-left linear #{$transition-duration / 2};
|
65
|
+
}
|
62
66
|
|
63
67
|
&:focus {
|
64
68
|
outline: 0;
|
65
|
-
box-shadow: none;
|
66
69
|
|
67
|
-
+ .search-icon {
|
68
|
-
|
70
|
+
+ .search-label .search-icon {
|
71
|
+
color: $link-color;
|
69
72
|
}
|
70
73
|
}
|
74
|
+
}
|
71
75
|
|
72
|
-
|
76
|
+
.search-label {
|
77
|
+
position: absolute;
|
78
|
+
display: flex;
|
79
|
+
height: 100%;
|
80
|
+
padding-left: $gutter-spacing-sm;
|
73
81
|
|
74
|
-
@include mq(
|
75
|
-
|
82
|
+
@include mq(md) {
|
83
|
+
padding-left: $gutter-spacing;
|
84
|
+
transition: padding-left linear #{$transition-duration / 2};
|
76
85
|
}
|
77
86
|
|
78
|
-
|
79
|
-
|
87
|
+
.search-icon {
|
88
|
+
width: #{$sp-4 * 1.2};
|
89
|
+
height: #{$sp-4 * 1.2};
|
90
|
+
align-self: center;
|
91
|
+
color: $grey-dk-000;
|
80
92
|
}
|
81
93
|
}
|
82
94
|
|
83
|
-
.search-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
95
|
+
.search-results {
|
96
|
+
position: absolute;
|
97
|
+
left: 0;
|
98
|
+
display: none;
|
99
|
+
width: 100%;
|
100
|
+
max-height: calc(100% - #{$sp-10});
|
101
|
+
overflow-y: auto;
|
102
|
+
background-color: $search-background-color;
|
103
|
+
border-bottom-right-radius: $border-radius;
|
104
|
+
border-bottom-left-radius: $border-radius;
|
105
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
106
|
+
|
107
|
+
@include mq(md) {
|
108
|
+
top: 100%;
|
109
|
+
width: $search-results-width;
|
110
|
+
max-height: calc(100vh - 200%) !important;
|
111
|
+
}
|
88
112
|
}
|
89
113
|
|
90
114
|
.search-results-list {
|
91
115
|
padding-left: 0;
|
92
|
-
margin-top: $sp-1;
|
93
116
|
margin-bottom: $sp-1;
|
94
117
|
list-style: none;
|
95
|
-
@include fs-
|
118
|
+
@include fs-4;
|
119
|
+
|
120
|
+
@include mq(md) {
|
121
|
+
@include fs-3;
|
122
|
+
}
|
96
123
|
}
|
97
124
|
|
98
125
|
.search-results-list-item {
|
@@ -100,15 +127,195 @@
|
|
100
127
|
margin: 0;
|
101
128
|
}
|
102
129
|
|
103
|
-
.search-
|
130
|
+
.search-result {
|
104
131
|
display: block;
|
105
132
|
padding-top: $sp-1;
|
106
133
|
padding-right: $sp-3;
|
107
134
|
padding-bottom: $sp-1;
|
108
135
|
padding-left: $sp-3;
|
109
136
|
|
110
|
-
&:hover
|
111
|
-
|
112
|
-
background-color:
|
137
|
+
&:hover,
|
138
|
+
&.active {
|
139
|
+
background-color: $feedback-color;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
.search-result-title {
|
144
|
+
display: block;
|
145
|
+
padding-top: $sp-2;
|
146
|
+
padding-bottom: $sp-2;
|
147
|
+
|
148
|
+
@include mq(sm) {
|
149
|
+
display: inline-block;
|
150
|
+
width: 40%;
|
151
|
+
padding-right: $sp-2;
|
152
|
+
vertical-align: top;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
.search-result-doc {
|
157
|
+
display: flex;
|
158
|
+
align-items: center;
|
159
|
+
word-wrap: break-word;
|
160
|
+
|
161
|
+
&.search-result-doc-parent {
|
162
|
+
opacity: 0.5;
|
163
|
+
@include fs-3;
|
164
|
+
|
165
|
+
@include mq(md) {
|
166
|
+
@include fs-2;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
.search-result-icon {
|
171
|
+
width: $sp-4;
|
172
|
+
height: $sp-4;
|
173
|
+
margin-right: $sp-2;
|
174
|
+
color: $link-color;
|
175
|
+
flex-shrink: 0;
|
176
|
+
}
|
177
|
+
|
178
|
+
.search-result-doc-title {
|
179
|
+
overflow: auto;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
.search-result-section {
|
184
|
+
margin-left: #{$sp-4 + $sp-2};
|
185
|
+
word-wrap: break-word;
|
186
|
+
}
|
187
|
+
|
188
|
+
.search-result-rel-url {
|
189
|
+
display: block;
|
190
|
+
margin-left: #{$sp-4 + $sp-2};
|
191
|
+
overflow: hidden;
|
192
|
+
color: $search-result-preview-color;
|
193
|
+
text-overflow: ellipsis;
|
194
|
+
white-space: nowrap;
|
195
|
+
@include fs-1;
|
196
|
+
}
|
197
|
+
|
198
|
+
.search-result-previews {
|
199
|
+
display: block;
|
200
|
+
padding-top: $sp-2;
|
201
|
+
padding-bottom: $sp-2;
|
202
|
+
padding-left: $sp-4;
|
203
|
+
margin-left: $sp-2;
|
204
|
+
color: $search-result-preview-color;
|
205
|
+
word-wrap: break-word;
|
206
|
+
border-left: $border;
|
207
|
+
border-left-color: $border-color;
|
208
|
+
@include fs-2;
|
209
|
+
|
210
|
+
@include mq(sm) {
|
211
|
+
display: inline-block;
|
212
|
+
width: 60%;
|
213
|
+
padding-left: $sp-2;
|
214
|
+
margin-left: 0;
|
215
|
+
vertical-align: top;
|
216
|
+
}
|
217
|
+
}
|
218
|
+
|
219
|
+
.search-result-preview + .search-result-preview {
|
220
|
+
margin-top: $sp-1;
|
221
|
+
}
|
222
|
+
|
223
|
+
.search-result-highlight {
|
224
|
+
font-weight: bold;
|
225
|
+
}
|
226
|
+
|
227
|
+
.search-no-result {
|
228
|
+
padding-top: $sp-2;
|
229
|
+
padding-right: $sp-3;
|
230
|
+
padding-bottom: $sp-2;
|
231
|
+
padding-left: $sp-3;
|
232
|
+
@include fs-3;
|
233
|
+
}
|
234
|
+
|
235
|
+
.search-button {
|
236
|
+
position: fixed;
|
237
|
+
right: $sp-4;
|
238
|
+
bottom: $sp-4;
|
239
|
+
display: flex;
|
240
|
+
width: $sp-9;
|
241
|
+
height: $sp-9;
|
242
|
+
background-color: $search-background-color;
|
243
|
+
border: 1px solid rgba($link-color, 0.3);
|
244
|
+
border-radius: #{$sp-9 / 2};
|
245
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
246
|
+
align-items: center;
|
247
|
+
justify-content: center;
|
248
|
+
}
|
249
|
+
|
250
|
+
.search-overlay {
|
251
|
+
position: fixed;
|
252
|
+
top: 0;
|
253
|
+
left: 0;
|
254
|
+
z-index: 1;
|
255
|
+
width: 0;
|
256
|
+
height: 0;
|
257
|
+
background-color: rgba(0, 0, 0, 0.3);
|
258
|
+
opacity: 0;
|
259
|
+
transition: opacity ease $transition-duration, width 0s $transition-duration,
|
260
|
+
height 0s $transition-duration;
|
261
|
+
}
|
262
|
+
|
263
|
+
.search-active {
|
264
|
+
.search {
|
265
|
+
position: fixed;
|
266
|
+
top: 0;
|
267
|
+
left: 0;
|
268
|
+
width: 100%;
|
269
|
+
height: 100%;
|
270
|
+
padding: 0;
|
271
|
+
}
|
272
|
+
|
273
|
+
.search-input-wrap {
|
274
|
+
height: $sp-10;
|
275
|
+
border-radius: 0;
|
276
|
+
|
277
|
+
@include mq(md) {
|
278
|
+
width: $search-results-width;
|
279
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
.search-input {
|
284
|
+
background-color: $search-background-color;
|
285
|
+
|
286
|
+
@include mq(md) {
|
287
|
+
padding-left: #{$sp-4 * 1.25 + $sp-5};
|
288
|
+
}
|
289
|
+
}
|
290
|
+
|
291
|
+
.search-label {
|
292
|
+
@include mq(md) {
|
293
|
+
padding-left: #{$sp-4 * 1.25};
|
294
|
+
}
|
295
|
+
}
|
296
|
+
|
297
|
+
.search-results {
|
298
|
+
display: block;
|
299
|
+
}
|
300
|
+
|
301
|
+
.search-overlay {
|
302
|
+
width: 100%;
|
303
|
+
height: 100%;
|
304
|
+
opacity: 1;
|
305
|
+
transition: opacity ease $transition-duration, width 0s, height 0s;
|
306
|
+
}
|
307
|
+
|
308
|
+
@include mq(md) {
|
309
|
+
.main {
|
310
|
+
position: fixed;
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
.main-header {
|
315
|
+
padding-top: $sp-10;
|
316
|
+
|
317
|
+
@include mq(md) {
|
318
|
+
padding-top: 0;
|
319
|
+
}
|
113
320
|
}
|
114
321
|
}
|
@@ -2,11 +2,13 @@
|
|
2
2
|
// Typography
|
3
3
|
//
|
4
4
|
|
5
|
-
$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue",
|
5
|
+
$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue",
|
6
|
+
helvetica, roboto, noto, "segoe ui", arial, sans-serif !default;
|
6
7
|
$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace !default;
|
7
|
-
$root-font-size: 16px !default;
|
8
|
+
$root-font-size: 16px !default; // Base font-size for rems
|
8
9
|
$body-line-height: 1.4 !default;
|
9
|
-
$
|
10
|
+
$content-line-height: 1.6 !default;
|
11
|
+
$body-heading-line-height: 1.25 !default;
|
10
12
|
|
11
13
|
//
|
12
14
|
// Colors
|
@@ -52,27 +54,19 @@ $red-300: #dd2e2e !default;
|
|
52
54
|
|
53
55
|
$body-background-color: $white !default;
|
54
56
|
$sidebar-color: $grey-lt-000 !default;
|
57
|
+
$search-background-color: $white !default;
|
58
|
+
$table-background-color: $white !default;
|
55
59
|
$code-background-color: $grey-lt-000 !default;
|
60
|
+
$feedback-color: darken($sidebar-color, 3%) !default;
|
56
61
|
|
57
62
|
$body-text-color: $grey-dk-100 !default;
|
58
63
|
$body-heading-color: $grey-dk-300 !default;
|
64
|
+
$search-result-preview-color: $grey-dk-000 !default;
|
59
65
|
$nav-child-link-color: $grey-dk-100 !default;
|
60
66
|
$link-color: $purple-000 !default;
|
61
67
|
$btn-primary-color: $purple-100 !default;
|
62
68
|
$base-button-color: #f7f7f7 !default;
|
63
69
|
|
64
|
-
//
|
65
|
-
// Media queries in pixels
|
66
|
-
//
|
67
|
-
|
68
|
-
$media-queries: (
|
69
|
-
xs: 320px,
|
70
|
-
sm: 500px,
|
71
|
-
md: 740px,
|
72
|
-
lg: 1120px,
|
73
|
-
xl: 1400px
|
74
|
-
) !default;
|
75
|
-
|
76
70
|
//
|
77
71
|
// Spacing
|
78
72
|
//
|
@@ -90,7 +84,7 @@ $spacers: (
|
|
90
84
|
sp-7: $spacing-unit * 2.5,
|
91
85
|
sp-8: $spacing-unit * 3,
|
92
86
|
sp-9: $spacing-unit * 3.5,
|
93
|
-
sp-10: $spacing-unit * 4
|
87
|
+
sp-10: $spacing-unit * 4,
|
94
88
|
) !default;
|
95
89
|
|
96
90
|
$sp-1: map-get($spacers, sp-1) !default; // 0.25 rem == 4px
|
@@ -101,8 +95,8 @@ $sp-5: map-get($spacers, sp-5) !default; // 1.5 rem == 24px
|
|
101
95
|
$sp-6: map-get($spacers, sp-6) !default; // 2 rem == 32px
|
102
96
|
$sp-7: map-get($spacers, sp-7) !default; // 2.5 rem == 40px
|
103
97
|
$sp-8: map-get($spacers, sp-8) !default; // 3 rem == 48px
|
104
|
-
$sp-9: map-get($spacers, sp-9) !default; //
|
105
|
-
$sp-10: map-get($spacers, sp-10) !default; // 4
|
98
|
+
$sp-9: map-get($spacers, sp-9) !default; // 3.5 rem == 56px
|
99
|
+
$sp-10: map-get($spacers, sp-10) !default; // 4 rem == 64px
|
106
100
|
|
107
101
|
//
|
108
102
|
// Borders
|
@@ -118,13 +112,24 @@ $border-color: $grey-lt-100 !default;
|
|
118
112
|
|
119
113
|
$gutter-spacing: $sp-6 !default;
|
120
114
|
$gutter-spacing-sm: $sp-4 !default;
|
121
|
-
$nav-width:
|
115
|
+
$nav-width: 264px !default;
|
116
|
+
$nav-width-md: 248px !default;
|
117
|
+
$nav-list-item-height: $sp-6 !default;
|
118
|
+
$nav-list-item-height-sm: $sp-8 !default;
|
119
|
+
$nav-list-expander-right: true;
|
122
120
|
$content-width: 800px !default;
|
121
|
+
$header-height: 60px !default;
|
122
|
+
$search-results-width: $content-width - $nav-width !default;
|
123
|
+
$transition-duration: 400ms;
|
124
|
+
|
125
|
+
//
|
126
|
+
// Media queries in pixels
|
127
|
+
//
|
123
128
|
|
124
129
|
$media-queries: (
|
125
130
|
xs: 320px,
|
126
131
|
sm: 500px,
|
127
|
-
md:
|
128
|
-
lg:
|
129
|
-
xl:
|
132
|
+
md: $content-width,
|
133
|
+
lg: $content-width + $nav-width,
|
134
|
+
xl: 1400px,
|
130
135
|
) !default;
|