jekyll-docs-theme 0.1.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +20 -16
  3. data/README.md +11 -34
  4. data/_includes/fa-icon.html +13 -0
  5. data/_includes/footer/content-post.html +4 -0
  6. data/_includes/footer/content-pre.html +4 -0
  7. data/_includes/footer/content.html +137 -0
  8. data/_includes/footer/full.html +13 -0
  9. data/_includes/footer/scripts-post.html +4 -0
  10. data/_includes/footer/scripts-pre.html +4 -0
  11. data/_includes/footer/scripts.html +48 -0
  12. data/_includes/head/base.html +3 -0
  13. data/_includes/head/content-post.html +0 -0
  14. data/_includes/head/content-pre.html +0 -0
  15. data/_includes/head/content.html +8 -0
  16. data/_includes/head/full.html +9 -0
  17. data/_includes/head/stylesheets-post.html +0 -0
  18. data/_includes/head/stylesheets-pre.html +0 -0
  19. data/_includes/head/stylesheets.html +16 -0
  20. data/_includes/internal/variables.html +21 -0
  21. data/_includes/jekyll-docs-theme/anchor_headings.html +34 -0
  22. data/_includes/jekyll-docs-theme/toc.html +38 -0
  23. data/_includes/jekyll-docs-theme/vendor/anchor_headings.html +110 -0
  24. data/_includes/jekyll-docs-theme/vendor/toc.html +112 -0
  25. data/_includes/masthead.html +13 -0
  26. data/_includes/masthead/button.html +11 -0
  27. data/_includes/masthead/buttons.html +30 -0
  28. data/_includes/masthead/title.html +7 -0
  29. data/_includes/navigation.html +50 -20
  30. data/_includes/sidebar/content-post.html +0 -0
  31. data/_includes/sidebar/content-pre.html +0 -0
  32. data/_includes/sidebar/content.html +10 -0
  33. data/_layouts/default.html +10 -4
  34. data/_layouts/full.html +5 -3
  35. data/_layouts/page.html +31 -11
  36. data/_sass/abstracts/_highlight-dark.scss +136 -0
  37. data/_sass/abstracts/_highlight-light.scss +251 -0
  38. data/_sass/abstracts/_themer.scss +18 -0
  39. data/_sass/abstracts/_variables.scss +6 -0
  40. data/_sass/base/_anchor.scss +20 -0
  41. data/_sass/base/_blockquote.scss +19 -0
  42. data/_sass/base/_body.scss +12 -0
  43. data/_sass/base/_horizontal-rule.scss +9 -0
  44. data/_sass/base/_scope-markdown.scss +108 -0
  45. data/_sass/components/_alert.scss +5 -0
  46. data/_sass/components/_footer.scss +39 -0
  47. data/_sass/components/_header.scss +22 -0
  48. data/_sass/components/_highlight.scss +59 -0
  49. data/_sass/components/_masthead.scss +62 -0
  50. data/_sass/components/_mobile-toc.scss +30 -0
  51. data/_sass/components/_sidebar.scss +86 -0
  52. data/_sass/utilities/_colors.scss +301 -0
  53. data/_sass/utilities/_js.scss +3 -0
  54. data/assets/css/styles.scss +40 -50
  55. data/assets/js/docs.js +49 -0
  56. metadata +54 -26
  57. data/_includes/footer.html +0 -91
  58. data/_includes/head.html +0 -26
  59. data/_includes/jumbotron.html +0 -21
  60. data/assets/css/docs.css +0 -1527
  61. data/assets/js/docs.min.js +0 -49
@@ -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
+ ;
@@ -0,0 +1,3 @@
1
+ .no-js .js-only {
2
+ display: none;
3
+ }
@@ -1,53 +1,43 @@
1
1
  ---
2
2
  ---
3
3
 
4
- img {
5
- max-width: 100%;
6
- }
7
-
8
- .bs-docs-masthead {
9
- padding-top: 50px;
10
- padding-bottom: 40px;
11
- margin-bottom: 20px;
12
- }
13
-
14
- .bs-docs-header h1, .bs-docs-header p {
15
- margin-right: 0;
16
- }
17
-
18
- .bs-docs-sidebar {
19
- display: none;
20
- position: -webkit-sticky;
21
- position: sticky;
22
- top: 20px;
23
- }
24
-
25
- .bs-docs-sidebar .nav > li > a {
26
- font-size: 15px;
27
- }
28
-
29
- .bs-docs-sidebar .nav .nav > li > a {
30
- font-size: 14px;
31
- }
32
-
33
- .back-top-top {
34
- font-size: 13px;
35
- }
36
-
37
- .bs-docs-container {
38
- position: relative;
39
- }
40
-
41
- #jumbotron-header {
42
- position:relative;
43
-
44
- &:after {
45
- content: "";
46
- position: absolute;
47
- bottom: 0;
48
- right: 0;
49
- height: 50px;
50
- width: 30%;
51
- background: linear-gradient(135deg, transparent 50px, white 50px);
52
- }
53
- }
4
+ $site-ui-mode: {{ site.ui.mode | default: 'auto' }};
5
+
6
+ $site-ui-brand-dark: {{ site.ui.brand.dark | default: '#00ceff' }};
7
+ $site-ui-brand-light: {{ site.ui.brand.light | default: '#a20000' }};
8
+
9
+ $site-ui-border-color-dark: {{ site.ui.border_color.dark | default: '#5f5f5f' }};
10
+ $site-ui-border-color-light: {{ site.ui.border_color.light | default: '#dee2e6' }};
11
+
12
+ $site-ui-header-dark-color1: {{ site.ui.header.dark.color1 | default: '#062a48' }};
13
+ $site-ui-header-dark-color2: {{ site.ui.header.dark.color2 | default: '#304e67' }};
14
+ $site-ui-header-light-color1: {{ site.ui.header.light.color1 | default: '#080331' }};
15
+ $site-ui-header-light-color2: {{ site.ui.header.light.color2 | default: '#673051' }};
16
+
17
+ $site-ui-masthead-color-dark: {{ site.ui.masthead.color.dark | default: '#fff' }};
18
+ $site-ui-masthead-color-light: {{ site.ui.masthead.color.light | default: '#fff' }};
19
+
20
+ @import 'abstracts/highlight-dark';
21
+ @import 'abstracts/highlight-light';
22
+ @import 'abstracts/themer';
23
+ @import 'abstracts/variables';
24
+
25
+ // Base Styles
26
+ @import 'base/anchor';
27
+ @import 'base/body';
28
+ @import 'base/blockquote';
29
+ @import 'base/horizontal-rule';
30
+ @import 'base/scope-markdown';
31
+
32
+ // Components
33
+ @import 'components/alert';
34
+ @import 'components/footer';
35
+ @import 'components/header';
36
+ @import 'components/highlight';
37
+ @import 'components/masthead';
38
+ @import 'components/mobile-toc';
39
+ @import 'components/sidebar';
40
+
41
+ // Utilities
42
+ @import 'utilities/colors';
43
+ @import 'utilities/js';
@@ -0,0 +1,49 @@
1
+ $(function() {
2
+ $('html').toggleClass('no-js js');
3
+
4
+ // Update sidebar highlighting based on Scrollspy
5
+ $(window).on('activate.bs.scrollspy', function () {
6
+ const spyTarget = $('[data-spy="scroll"]').data('target');
7
+ const $activeSpy = $(spyTarget).find('.nav-link.active');
8
+ const $tree = $activeSpy.parentsUntil('.bs-docs-sidenav', 'li');
9
+
10
+ $tree.find('> a').addClass('active');
11
+ });
12
+
13
+ // Toggleable mobile table of contents button
14
+ $('.toggle-toc').on('click', function () {
15
+ const $this = $(this);
16
+ const $toc = $("#mobileTOC");
17
+
18
+ $toc.toggle();
19
+ $this.attr('aria-expanded', $toc.is(':visible'));
20
+
21
+ const $btn = $this.find('[data-role="toggle"]');
22
+
23
+ if ($btn.text() === 'Hide') {
24
+ $btn.text('Show');
25
+ } else {
26
+ $btn.text('Hide');
27
+ }
28
+ });
29
+
30
+ // Make the triangular pattern in the header
31
+ if (uiColors) {
32
+ const $masthead = $('.site-masthead');
33
+
34
+ if ($masthead.length) {
35
+ const t = new Trianglify({
36
+ cellsize: 90,
37
+ noiseIntensity: 0,
38
+ x_gradient: [
39
+ uiColors[0],
40
+ uiColors[1],
41
+ ],
42
+ });
43
+ const pattern = t.generate(window.screen.width | $masthead.outerWidth(), $masthead.outerHeight() * 1.2);
44
+
45
+ const style = $('<style>.site-masthead { background-image: ' + pattern.dataUrl + '; }</style>');
46
+ $('html > head').append(style);
47
+ }
48
+ }
49
+ });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-docs-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir 'allejo' Jimenez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,45 +16,31 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.3'
19
+ version: '3.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.3'
26
+ version: '3.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.12'
33
+ version: '2.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.12'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
40
+ version: '2.1'
55
41
  description:
56
42
  email:
57
- - allejo@me.com
43
+ - me@allejo.io
58
44
  executables: []
59
45
  extensions: []
60
46
  extra_rdoc_files: []
@@ -62,19 +48,61 @@ files:
62
48
  - LICENSE.md
63
49
  - README.md
64
50
  - _includes/disqus.html
51
+ - _includes/fa-icon.html
65
52
  - _includes/facebook.html
66
- - _includes/footer.html
53
+ - _includes/footer/content-post.html
54
+ - _includes/footer/content-pre.html
55
+ - _includes/footer/content.html
56
+ - _includes/footer/full.html
57
+ - _includes/footer/scripts-post.html
58
+ - _includes/footer/scripts-pre.html
59
+ - _includes/footer/scripts.html
67
60
  - _includes/google-analytics.html
68
- - _includes/head.html
69
- - _includes/jumbotron.html
61
+ - _includes/head/base.html
62
+ - _includes/head/content-post.html
63
+ - _includes/head/content-pre.html
64
+ - _includes/head/content.html
65
+ - _includes/head/full.html
66
+ - _includes/head/stylesheets-post.html
67
+ - _includes/head/stylesheets-pre.html
68
+ - _includes/head/stylesheets.html
69
+ - _includes/internal/variables.html
70
+ - _includes/jekyll-docs-theme/anchor_headings.html
71
+ - _includes/jekyll-docs-theme/toc.html
72
+ - _includes/jekyll-docs-theme/vendor/anchor_headings.html
73
+ - _includes/jekyll-docs-theme/vendor/toc.html
74
+ - _includes/masthead.html
75
+ - _includes/masthead/button.html
76
+ - _includes/masthead/buttons.html
77
+ - _includes/masthead/title.html
70
78
  - _includes/navigation.html
79
+ - _includes/sidebar/content-post.html
80
+ - _includes/sidebar/content-pre.html
81
+ - _includes/sidebar/content.html
71
82
  - _includes/twitter.html
72
83
  - _layouts/default.html
73
84
  - _layouts/full.html
74
85
  - _layouts/page.html
75
- - assets/css/docs.css
86
+ - _sass/abstracts/_highlight-dark.scss
87
+ - _sass/abstracts/_highlight-light.scss
88
+ - _sass/abstracts/_themer.scss
89
+ - _sass/abstracts/_variables.scss
90
+ - _sass/base/_anchor.scss
91
+ - _sass/base/_blockquote.scss
92
+ - _sass/base/_body.scss
93
+ - _sass/base/_horizontal-rule.scss
94
+ - _sass/base/_scope-markdown.scss
95
+ - _sass/components/_alert.scss
96
+ - _sass/components/_footer.scss
97
+ - _sass/components/_header.scss
98
+ - _sass/components/_highlight.scss
99
+ - _sass/components/_masthead.scss
100
+ - _sass/components/_mobile-toc.scss
101
+ - _sass/components/_sidebar.scss
102
+ - _sass/utilities/_colors.scss
103
+ - _sass/utilities/_js.scss
76
104
  - assets/css/styles.scss
77
- - assets/js/docs.min.js
105
+ - assets/js/docs.js
78
106
  homepage: https://github.com/allejo/jekyll-docs-theme
79
107
  licenses:
80
108
  - MIT