jekyll-docs-theme 0.1.2 → 1.0.0.pre.beta.1

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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +20 -16
  3. data/README.md +8 -35
  4. data/_includes/anchor_headings.html +109 -0
  5. data/_includes/fa-icon.html +13 -0
  6. data/_includes/footer/content-post.html +4 -0
  7. data/_includes/footer/content-pre.html +4 -0
  8. data/_includes/footer/content.html +137 -0
  9. data/_includes/footer/full.html +13 -0
  10. data/_includes/footer/scripts-post.html +4 -0
  11. data/_includes/footer/scripts-pre.html +4 -0
  12. data/_includes/footer/scripts.html +48 -0
  13. data/_includes/head/base.html +3 -0
  14. data/_includes/head/content-post.html +0 -0
  15. data/_includes/head/content-pre.html +0 -0
  16. data/_includes/head/content.html +8 -0
  17. data/_includes/head/full.html +9 -0
  18. data/_includes/head/stylesheets-post.html +0 -0
  19. data/_includes/head/stylesheets-pre.html +0 -0
  20. data/_includes/head/stylesheets.html +16 -0
  21. data/_includes/internal/variables.html +21 -0
  22. data/_includes/masthead.html +13 -0
  23. data/_includes/masthead/button.html +11 -0
  24. data/_includes/masthead/buttons.html +30 -0
  25. data/_includes/masthead/title.html +7 -0
  26. data/_includes/navigation.html +37 -19
  27. data/_includes/toc.html +87 -0
  28. data/_layouts/default.html +4 -4
  29. data/_layouts/full.html +5 -3
  30. data/_layouts/page.html +46 -11
  31. data/_sass/abstracts/_highlight-dark.scss +136 -0
  32. data/_sass/abstracts/_highlight-light.scss +251 -0
  33. data/_sass/abstracts/_themer.scss +18 -0
  34. data/_sass/abstracts/_variables.scss +6 -0
  35. data/_sass/base/_anchor.scss +20 -0
  36. data/_sass/base/_body.scss +12 -0
  37. data/_sass/base/_scope-markdown.scss +94 -0
  38. data/_sass/components/_alert.scss +5 -0
  39. data/_sass/components/_footer.scss +39 -0
  40. data/_sass/components/_header.scss +22 -0
  41. data/_sass/components/_highlight.scss +59 -0
  42. data/_sass/components/_masthead.scss +62 -0
  43. data/_sass/components/_mobile-toc.scss +30 -0
  44. data/_sass/components/_sidebar.scss +84 -0
  45. data/_sass/utilities/_colors.scss +301 -0
  46. data/_sass/utilities/_js.scss +3 -0
  47. data/assets/css/styles.scss +38 -50
  48. data/assets/js/docs.js +49 -0
  49. metadata +48 -27
  50. data/_includes/footer.html +0 -91
  51. data/_includes/head.html +0 -26
  52. data/_includes/jumbotron.html +0 -21
  53. data/assets/css/docs.css +0 -1527
  54. data/assets/js/docs.min.js +0 -49
@@ -0,0 +1,22 @@
1
+ .navbar-custom {
2
+ a {
3
+ border-bottom: 0;
4
+ }
5
+
6
+ .navbar-brand {
7
+ font-weight: bold;
8
+ }
9
+
10
+ .icon-bar {
11
+ @include themer(background, (
12
+ 'dark': $site-ui-brand-dark,
13
+ 'light': $site-ui-brand-light,
14
+ ));
15
+
16
+ border-radius: 1px;
17
+ display: block;
18
+ height: 2px;
19
+ margin: 4px 0;
20
+ width: 22px;
21
+ }
22
+ }
@@ -0,0 +1,59 @@
1
+ @if $site-ui-mode == 'auto' {
2
+ @media (prefers-color-scheme: dark) {
3
+ @include highlight-dark-theme();
4
+ }
5
+
6
+ @media (prefers-color-scheme: light) {
7
+ @include highlight-light-theme();
8
+ }
9
+ }
10
+ @else if $site-ui-mode == 'dark' {
11
+ @include highlight-dark-theme();
12
+ }
13
+ @else if $site-ui-mode == 'light' {
14
+ @include highlight-light-theme();
15
+ }
16
+
17
+ .highlight {
18
+ @include themer(background-color, (
19
+ 'dark': #3f3f3f,
20
+ 'light': #f7f7f9,
21
+ ));
22
+ @include themer(border-color, (
23
+ 'dark': #222222,
24
+ 'light': #e1e1e8,
25
+ ));
26
+
27
+ border-style: solid;
28
+ border-width: 1px;
29
+ border-radius: 4px;
30
+ padding: 9px 14px;
31
+ margin-bottom: 14px;
32
+ }
33
+
34
+ .highlight pre {
35
+ background-color: transparent;
36
+ border: 0;
37
+ padding: 0;
38
+ margin-top: 0;
39
+ margin-bottom: 0;
40
+ }
41
+
42
+ .highlight pre code {
43
+ @include themer(color, (
44
+ 'dark': #fdce93,
45
+ 'light': #333,
46
+ ));
47
+
48
+ font-size: inherit;
49
+ white-space: pre;
50
+ }
51
+
52
+ .highlight pre .lineno {
53
+ display: inline-block;
54
+ color: #bebec5;
55
+ margin-right: 10px;
56
+ padding-right: 5px;
57
+ text-align: right;
58
+ width: 22px;
59
+ }
@@ -0,0 +1,62 @@
1
+ .site-masthead {
2
+ @include themer(background, (
3
+ 'dark': $site-ui-header-dark-color1,
4
+ 'light': $site-ui-header-light-color1,
5
+ ));
6
+ @include themer(background, (
7
+ 'dark': linear-gradient(135deg, $site-ui-header-dark-color1, $site-ui-header-dark-color2),
8
+ 'light': linear-gradient(135deg, $site-ui-header-light-color1, $site-ui-header-light-color2),
9
+ ));
10
+
11
+ color: white;
12
+ position: relative;
13
+
14
+ &::after {
15
+ @include themer(background, (
16
+ 'dark': linear-gradient(135deg, transparent 50px, $background-color-dark 50px),
17
+ 'light': linear-gradient(135deg, transparent 50px, $background-color-light 50px),
18
+ ));
19
+
20
+ bottom: 0;
21
+ content: "";
22
+ height: 50px;
23
+ position: absolute;
24
+ right: 0;
25
+ width: 30%;
26
+ }
27
+ }
28
+
29
+ .site-masthead__button {
30
+ @include themer(border-color, (
31
+ 'dark': $site-ui-masthead-color-dark,
32
+ 'light': $site-ui-masthead-color-light,
33
+ ));
34
+ @include themer(color, (
35
+ 'dark': $site-ui-masthead-color-dark,
36
+ 'light': $site-ui-masthead-color-light,
37
+ ));
38
+
39
+ border-radius: 5px;
40
+ border-style: solid;
41
+ border-width: 1px;
42
+ display: inline-block;
43
+ font-size: 1.25rem;
44
+ padding: 0.75rem 2rem;
45
+
46
+ &:hover {
47
+ @include themer(background-color, (
48
+ 'dark': $site-ui-masthead-color-dark,
49
+ 'light': $site-ui-masthead-color-light,
50
+ ));
51
+ @include themer(color, (
52
+ 'dark': $site-ui-brand-dark,
53
+ 'light': $site-ui-brand-light,
54
+ ));
55
+
56
+ text-decoration: none;
57
+ }
58
+ }
59
+
60
+ .site-masthead__version {
61
+ font-size: 0.8rem;
62
+ }
@@ -0,0 +1,30 @@
1
+ .mobile-toc {
2
+ h2 {
3
+ font-size: 1rem;
4
+ font-weight: bold;
5
+ }
6
+
7
+ ul {
8
+ padding-left: 1.4rem;
9
+ }
10
+
11
+ .toggle-toc {
12
+ @include themer(color, (
13
+ 'dark': $site-ui-brand-dark,
14
+ 'light': $site-ui-brand-light,
15
+ ));
16
+
17
+ background-color: transparent;
18
+ border: none;
19
+ cursor: pointer;
20
+ padding: 0;
21
+
22
+ &::before {
23
+ content: '[';
24
+ }
25
+
26
+ &::after {
27
+ content: ']';
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,84 @@
1
+ // Only hide nested ULs if they are accessible via JS
2
+ .js .page-sidebar {
3
+ ul ul {
4
+ display: none;
5
+ }
6
+ }
7
+
8
+ .page-sidebar {
9
+ position: -webkit-sticky;
10
+ position: sticky;
11
+ top: 20px;
12
+
13
+ a {
14
+ @include themer(color, (
15
+ 'dark': #c7c7c7,
16
+ 'light': #999,
17
+ ));
18
+
19
+ border-bottom: 0;
20
+ }
21
+
22
+ ul {
23
+ padding-left: 15px;
24
+
25
+ & ul {
26
+ font-size: 90%;
27
+ }
28
+
29
+ li {
30
+ list-style: none;
31
+ }
32
+
33
+ a {
34
+ border-bottom: 0;
35
+ display: block;
36
+ font-weight: 500;
37
+ position: relative;
38
+
39
+ &:focus,
40
+ &:hover {
41
+ @include themer(color, (
42
+ 'dark': $site-ui-brand-dark,
43
+ 'light': $site-ui-brand-light,
44
+ ));
45
+
46
+ background-color: transparent;
47
+ }
48
+
49
+ &.active,
50
+ &.active:focus,
51
+ &.active:hover {
52
+ @include themer(color, (
53
+ 'dark': $site-ui-brand-dark,
54
+ 'light': $site-ui-brand-light,
55
+ ));
56
+
57
+ font-weight: 700;
58
+
59
+ // In order to prevent being affected by the extra width misaligning
60
+ // content, we'll do position absolute the border.
61
+ &::before {
62
+ @include themer(border-left-color, (
63
+ 'dark': $site-ui-brand-dark,
64
+ 'light': $site-ui-brand-light,
65
+ ));
66
+
67
+ border-left-style: solid;
68
+ border-left-width: $sidebar-border-width;
69
+ content: '';
70
+ display: block;
71
+ height: 100%;
72
+ left: 0;
73
+ position: absolute;
74
+ top: 0;
75
+ }
76
+ }
77
+
78
+ // Unhide any nested ULs when this TOC section is active
79
+ &.active + ul {
80
+ display: block;
81
+ }
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,301 @@
1
+ // Calculate the luminance for a color.
2
+ // See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
3
+ @function luminance($color) {
4
+ $red: nth($linear-channel-values, red($color) + 1);
5
+ $green: nth($linear-channel-values, green($color) + 1);
6
+ $blue: nth($linear-channel-values, blue($color) + 1);
7
+
8
+ @return .2126 * $red + .7152 * $green + .0722 * $blue;
9
+ }
10
+
11
+ // Calculate the contrast ratio between two colors.
12
+ // See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
13
+ @function contrast($back, $front) {
14
+ $backLum: luminance($back) + .05;
15
+ $foreLum: luminance($front) + .05;
16
+
17
+ @return max($backLum, $foreLum) / min($backLum, $foreLum);
18
+ }
19
+
20
+ // Determine whether to use dark or light text on top of given color.
21
+ // Returns black for dark text and white for light text.
22
+ @function choose-contrast-color($color) {
23
+ $lightContrast: contrast($color, white);
24
+ $darkContrast: contrast($color, black);
25
+
26
+ @if ($lightContrast > $darkContrast) {
27
+ @return white;
28
+ }
29
+ @else {
30
+ @return black;
31
+ }
32
+ }
33
+
34
+ // Precomputed linear color channel values, for use in contrast calculations.
35
+ // See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
36
+ //
37
+ // Algorithm, for c in 0 to 255:
38
+ // f(c) {
39
+ // c = c / 255;
40
+ // return c < 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
41
+ // }
42
+ //
43
+ // This lookup table is needed since there is no `pow` in SASS.
44
+ $linear-channel-values:
45
+ 0
46
+ .0003035269835488375
47
+ .000607053967097675
48
+ .0009105809506465125
49
+ .00121410793419535
50
+ .0015176349177441874
51
+ .001821161901293025
52
+ .0021246888848418626
53
+ .0024282158683907
54
+ .0027317428519395373
55
+ .003035269835488375
56
+ .003346535763899161
57
+ .003676507324047436
58
+ .004024717018496307
59
+ .004391442037410293
60
+ .004776953480693729
61
+ .005181516702338386
62
+ .005605391624202723
63
+ .006048833022857054
64
+ .006512090792594475
65
+ .006995410187265387
66
+ .007499032043226175
67
+ .008023192985384994
68
+ .008568125618069307
69
+ .009134058702220787
70
+ .00972121732023785
71
+ .010329823029626936
72
+ .010960094006488246
73
+ .011612245179743885
74
+ .012286488356915872
75
+ .012983032342173012
76
+ .013702083047289686
77
+ .014443843596092545
78
+ .01520851442291271
79
+ .01599629336550963
80
+ .016807375752887384
81
+ .017641954488384078
82
+ .018500220128379697
83
+ .019382360956935723
84
+ .0202885630566524
85
+ .021219010376003555
86
+ .022173884793387385
87
+ .02315336617811041
88
+ .024157632448504756
89
+ .02518685962736163
90
+ .026241221894849898
91
+ .027320891639074894
92
+ .028426039504420793
93
+ .0295568344378088
94
+ .030713443732993635
95
+ .03189603307301153
96
+ .033104766570885055
97
+ .03433980680868217
98
+ .03560131487502034
99
+ .03688945040110004
100
+ .0382043715953465
101
+ .03954623527673284
102
+ .04091519690685319
103
+ .042311410620809675
104
+ .043735029256973465
105
+ .04518620438567554
106
+ .046665086336880095
107
+ .04817182422688942
108
+ .04970656598412723
109
+ .05126945837404324
110
+ .052860647023180246
111
+ .05448027644244237
112
+ .05612849004960009
113
+ .05780543019106723
114
+ .0595112381629812
115
+ .06124605423161761
116
+ .06301001765316767
117
+ .06480326669290577
118
+ .06662593864377289
119
+ .06847816984440017
120
+ .07036009569659588
121
+ .07227185068231748
122
+ .07421356838014963
123
+ .07618538148130785
124
+ .07818742180518633
125
+ .08021982031446832
126
+ .0822827071298148
127
+ .08437621154414882
128
+ .08650046203654976
129
+ .08865558628577294
130
+ .09084171118340768
131
+ .09305896284668745
132
+ .0953074666309647
133
+ .09758734714186246
134
+ .09989872824711389
135
+ .10224173308810132
136
+ .10461648409110419
137
+ .10702310297826761
138
+ .10946171077829933
139
+ .1119324278369056
140
+ .11443537382697373
141
+ .11697066775851084
142
+ .11953842798834562
143
+ .12213877222960187
144
+ .12477181756095049
145
+ .12743768043564743
146
+ .1301364766903643
147
+ .13286832155381798
148
+ .13563332965520566
149
+ .13843161503245183
150
+ .14126329114027164
151
+ .14412847085805777
152
+ .14702726649759498
153
+ .14995978981060856
154
+ .15292615199615017
155
+ .1559264637078274
156
+ .1589608350608804
157
+ .162029375639111
158
+ .1651321945016676
159
+ .16826940018969075
160
+ .1714411007328226
161
+ .17464740365558504
162
+ .17788841598362912
163
+ .18116424424986022
164
+ .184474994500441
165
+ .18782077230067787
166
+ .19120168274079138
167
+ .1946178304415758
168
+ .19806931955994886
169
+ .20155625379439707
170
+ .20507873639031693
171
+ .20863687014525575
172
+ .21223075741405523
173
+ .21586050011389926
174
+ .2195261997292692
175
+ .2232279573168085
176
+ .22696587351009836
177
+ .23074004852434915
178
+ .23455058216100522
179
+ .238397573812271
180
+ .24228112246555486
181
+ .24620132670783548
182
+ .25015828472995344
183
+ .25415209433082675
184
+ .2581828529215958
185
+ .26225065752969623
186
+ .26635560480286247
187
+ .2704977910130658
188
+ .27467731206038465
189
+ .2788942634768104
190
+ .2831487404299921
191
+ .2874408377269175
192
+ .29177064981753587
193
+ .2961382707983211
194
+ .3005437944157765
195
+ .3049873140698863
196
+ .30946892281750854
197
+ .31398871337571754
198
+ .31854677812509186
199
+ .32314320911295075
200
+ .3277780980565422
201
+ .33245153634617935
202
+ .33716361504833037
203
+ .3419144249086609
204
+ .3467040563550296
205
+ .35153259950043936
206
+ .3564001441459435
207
+ .3613067797835095
208
+ .3662525955988395
209
+ .3712376804741491
210
+ .3762621229909065
211
+ .38132601143253014
212
+ .386429433787049
213
+ .39157247774972326
214
+ .39675523072562685
215
+ .4019777798321958
216
+ .4072402119017367
217
+ .41254261348390375
218
+ .4178850708481375
219
+ .4232676699860717
220
+ .4286904966139066
221
+ .43415363617474895
222
+ .4396571738409188
223
+ .44520119451622786
224
+ .45078578283822346
225
+ .45641102318040466
226
+ .4620769996544071
227
+ .467783796112159
228
+ .47353149614800955
229
+ .4793201831008268
230
+ .4851499400560704
231
+ .4910208498478356
232
+ .4969329950608704
233
+ .5028864580325687
234
+ .5088813208549338
235
+ .5149176653765214
236
+ .5209955732043543
237
+ .5271151257058131
238
+ .5332764040105052
239
+ .5394794890121072
240
+ .5457244613701866
241
+ .5520114015120001
242
+ .5583403896342679
243
+ .5647115057049292
244
+ .5711248294648731
245
+ .5775804404296506
246
+ .5840784178911641
247
+ .5906188409193369
248
+ .5972017883637634
249
+ .6038273388553378
250
+ .6104955708078648
251
+ .6172065624196511
252
+ .6239603916750761
253
+ .6307571363461468
254
+ .6375968739940326
255
+ .6444796819705821
256
+ .6514056374198242
257
+ .6583748172794485
258
+ .665387298282272
259
+ .6724431569576875
260
+ .6795424696330938
261
+ .6866853124353135
262
+ .6938717612919899
263
+ .7011018919329731
264
+ .7083757798916868
265
+ .7156935005064807
266
+ .7230551289219693
267
+ .7304607400903537
268
+ .7379104087727308
269
+ .7454042095403874
270
+ .7529422167760779
271
+ .7605245046752924
272
+ .768151147247507
273
+ .7758222183174236
274
+ .7835377915261935
275
+ .7912979403326302
276
+ .799102738014409
277
+ .8069522576692516
278
+ .8148465722161012
279
+ .8227857543962835
280
+ .8307698767746546
281
+ .83879901174074
282
+ .846873231509858
283
+ .8549926081242338
284
+ .8631572134541023
285
+ .8713671191987972
286
+ .8796223968878317
287
+ .8879231178819663
288
+ .8962693533742664
289
+ .9046611743911496
290
+ .9130986517934192
291
+ .9215818562772946
292
+ .9301108583754237
293
+ .938685728457888
294
+ .9473065367331999
295
+ .9559733532492861
296
+ .9646862478944651
297
+ .9734452903984125
298
+ .9822505503331171
299
+ .9911020971138298
300
+ 1
301
+ ;