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.
Files changed (46) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -2
  3. data/_includes/css/custom.scss.liquid +1 -0
  4. data/_includes/css/just-the-docs.scss.liquid +7 -0
  5. data/_includes/head.html +19 -13
  6. data/_includes/head_custom.html +0 -0
  7. data/_includes/js/custom.js +0 -0
  8. data/_includes/nav.html +55 -44
  9. data/_includes/title.html +5 -0
  10. data/_includes/vendor/anchor_headings.html +100 -0
  11. data/_layouts/default.html +146 -55
  12. data/_layouts/table_wrappers.html +7 -0
  13. data/_layouts/vendor/compress.html +10 -0
  14. data/_sass/base.scss +16 -18
  15. data/_sass/buttons.scss +1 -1
  16. data/_sass/code.scss +211 -72
  17. data/_sass/color_schemes/dark.scss +4 -1
  18. data/_sass/color_schemes/light.scss +0 -0
  19. data/_sass/content.scss +80 -1
  20. data/_sass/custom/custom.scss +0 -120
  21. data/_sass/labels.scss +5 -4
  22. data/_sass/layout.scss +118 -62
  23. data/_sass/modules.scss +20 -0
  24. data/_sass/navigation.scss +125 -77
  25. data/_sass/print.scss +40 -0
  26. data/_sass/search.scss +263 -56
  27. data/_sass/support/_functions.scss +2 -3
  28. data/_sass/support/_variables.scss +27 -22
  29. data/_sass/support/mixins/_layout.scss +1 -3
  30. data/_sass/support/mixins/_typography.scss +6 -1
  31. data/_sass/tables.scss +13 -33
  32. data/_sass/typography.scss +9 -7
  33. data/_sass/utilities/_layout.scss +74 -17
  34. data/_sass/utilities/_lists.scss +7 -1
  35. data/_sass/utilities/_spacing.scss +69 -25
  36. data/assets/css/just-the-docs-dark.scss +3 -0
  37. data/assets/css/just-the-docs-default.scss +8 -0
  38. data/assets/css/just-the-docs-light.scss +3 -0
  39. data/assets/js/just-the-docs.js +425 -130
  40. data/assets/js/vendor/lunr.min.js +3 -3
  41. data/assets/js/zzzz-search-data.json +58 -0
  42. data/lib/tasks/search.rake +54 -9
  43. metadata +43 -26
  44. data/assets/css/dark-mode-preview.scss +0 -41
  45. data/assets/css/just-the-docs.scss +0 -44
  46. data/assets/js/search-data.json +0 -12
@@ -1,120 +0,0 @@
1
- // //
2
- // // Typography
3
- // //
4
- //
5
- // $body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif;
6
- // $mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace;
7
- // $root-font-size: 16px; // Base font-size for rems
8
- // $body-line-height: 1.4;
9
- // $body-heading-line-height: 1.15;
10
- //
11
- // //
12
- // // Colors
13
- // //
14
- //
15
- // $white: #fff;
16
- //
17
- // $grey-dk-000: #959396;
18
- // $grey-dk-100: #5c5962;
19
- // $grey-dk-200: #44434d;
20
- // $grey-dk-250: #302d36 !default;
21
- // $grey-dk-300: #27262b;
22
- //
23
- // $grey-lt-000: #f5f6fa;
24
- // $grey-lt-100: #eeebee;
25
- // $grey-lt-200: #ecebed;
26
- // $grey-lt-300: #e6e1e8;
27
- //
28
- // $purple-000: #7253ed;
29
- // $purple-100: #5e41d0;
30
- // $purple-200: #4e26af;
31
- // $purple-300: #381885;
32
- //
33
- // $blue-000: #2c84fa;
34
- // $blue-100: #2869e6;
35
- // $blue-200: #264caf;
36
- // $blue-300: #183385;
37
- //
38
- // $green-000: #41d693;
39
- // $green-100: #11b584;
40
- // $green-200: #009c7b;
41
- // $green-300: #026e57;
42
- //
43
- // $body-background-color: $white !default;
44
- // $sidebar-color: $grey-lt-000 !default;
45
- // $code-background-color: $grey-lt-000 !default;
46
-
47
- // $body-text-color: $grey-dk-100 !default;
48
- // $body-heading-color: $grey-dk-300 !default;
49
- // $nav-child-link-color: $grey-dk-100 !default;
50
- // $link-color: $purple-000 !default;
51
- // $btn-primary-color: $purple-100 !default;
52
- // $base-button-color: #f7f7f7 !default;
53
- //
54
- // //
55
- // // Media queries in pixels
56
- // //
57
- //
58
- // $media-queries: (
59
- // xs: 320px,
60
- // sm: 500px,
61
- // md: 740px,
62
- // lg: 1120px,
63
- // xl: 1400px
64
- // );
65
- //
66
- // //
67
- // // Spacing
68
- // //
69
- //
70
- // $spacing-unit: 1rem; // 1rem == 16px
71
- //
72
- // $spacers: (
73
- // sp-0: 0,
74
- // sp-1: $spacing-unit * 0.25,
75
- // sp-2: $spacing-unit * 0.5,
76
- // sp-3: $spacing-unit * 0.75,
77
- // sp-4: $spacing-unit,
78
- // sp-5: $spacing-unit * 1.5,
79
- // sp-6: $spacing-unit * 2,
80
- // sp-7: $spacing-unit * 2.5,
81
- // sp-8: $spacing-unit * 3,
82
- // sp-9: $spacing-unit * 3.5,
83
- // sp-10: $spacing-unit * 4
84
- // );
85
- //
86
- // $sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px
87
- // $sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px
88
- // $sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px
89
- // $sp-4: map-get($spacers, sp-4); // 1 rem == 16px
90
- // $sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px
91
- // $sp-6: map-get($spacers, sp-6); // 2 rem == 32px
92
- // $sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px
93
- // $sp-8: map-get($spacers, sp-8); // 3 rem == 48px
94
- // $sp-9: map-get($spacers, sp-9); // 4 rem == 48px
95
- // $sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px
96
- //
97
- // //
98
- // // Borders
99
- // //
100
- //
101
- // $border: 1px solid;
102
- // $border-radius: 4px;
103
- // $border-color: $grey-lt-100;
104
- //
105
- // //
106
- // // Grid system
107
- // //
108
- //
109
- // $gutter-spacing: $sp-6;
110
- // $gutter-spacing-sm: $sp-4;
111
- // $nav-width: 232px;
112
- // $content-width: 800px;
113
- //
114
- // $media-queries: (
115
- // xs: 320px,
116
- // sm: 500px,
117
- // md: 740px,
118
- // lg: 800px,
119
- // xl: 1316px
120
- // );
@@ -6,16 +6,17 @@
6
6
  .label-blue {
7
7
  display: inline-block;
8
8
  padding-top: 0.16em;
9
- padding-right: 0.42em;
9
+ padding-right: 0.56em;
10
10
  padding-bottom: 0.16em;
11
- padding-left: 0.42em;
12
- margin-right: $sp-1;
13
- margin-left: $sp-1;
11
+ padding-left: 0.56em;
12
+ margin-right: $sp-2;
13
+ margin-left: $sp-2;
14
14
  color: $white;
15
15
  text-transform: uppercase;
16
16
  vertical-align: middle;
17
17
  background-color: $blue-100;
18
18
  @include fs-2;
19
+ border-radius: 12px;
19
20
  }
20
21
 
21
22
  .label-green {
@@ -2,34 +2,17 @@
2
2
  // The basic two column layout
3
3
  //
4
4
 
5
- .page-wrap {
6
- @include mq(md) {
7
- position: absolute;
8
- top: 0;
9
- left: 0;
10
- display: flex;
11
- width: 100%;
12
- height: 100%;
13
- overflow-x: hidden;
14
- overflow-y: hidden;
15
- }
16
- }
17
-
18
5
  .side-bar {
19
- z-index: 100;
6
+ z-index: 0;
20
7
  display: flex;
21
8
  flex-wrap: wrap;
22
- padding-top: $gutter-spacing-sm;
23
- padding-bottom: $gutter-spacing-sm;
24
9
  background-color: $sidebar-color;
25
10
 
26
11
  @include mq(md) {
27
12
  flex-wrap: nowrap;
28
- position: absolute;
29
- width: $nav-width + 16px;
13
+ position: fixed;
14
+ width: $nav-width-md;
30
15
  height: 100%;
31
- padding-top: $gutter-spacing * 2;
32
- padding-bottom: 0;
33
16
  flex-direction: column;
34
17
  border-right: $border $border-color;
35
18
  align-items: flex-end;
@@ -41,90 +24,155 @@
41
24
  }
42
25
  }
43
26
 
44
- .main-content-wrap {
27
+ .main {
45
28
  @include mq(md) {
46
- position: absolute;
47
- top: 0;
48
- left: 0;
49
- width: 100%;
50
- height: 100%;
51
- min-height: 600px;
52
- -webkit-overflow-scrolling: touch;
53
- overflow-x: hidden;
54
- overflow-y: scroll;
29
+ position: relative;
30
+ max-width: $content-width;
31
+ margin-left: $nav-width-md;
32
+ }
33
+
34
+ @include mq(lg) {
35
+ margin-left: calc(
36
+ (100% - #{$nav-width + $content-width}) / 2 + #{$nav-width}
37
+ );
55
38
  }
56
39
  }
57
40
 
58
- .main-content {
59
- padding-top: $gutter-spacing-sm;
41
+ .main-content-wrap {
60
42
  @include container;
43
+ padding-top: $gutter-spacing-sm;
44
+ padding-bottom: $gutter-spacing-sm;
61
45
 
62
46
  @include mq(md) {
63
- position: relative;
64
- max-width: $content-width;
65
47
  padding-top: $gutter-spacing;
66
48
  padding-bottom: $gutter-spacing;
67
- padding-left: $gutter-spacing * 1.5;
68
- margin-left: $nav-width;
69
49
  }
70
-
71
- @include mq(lg) {
72
- padding-left: $gutter-spacing;
73
- margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
74
- }
75
- }
76
-
77
- .js-main-content:focus {
78
- outline: none;
79
50
  }
80
51
 
81
- .page-header {
52
+ .main-header {
53
+ z-index: 0;
54
+ display: none;
82
55
  background-color: $sidebar-color;
83
56
 
84
57
  @include mq(md) {
58
+ display: flex;
59
+ justify-content: space-between;
60
+ height: $header-height;
85
61
  background-color: $body-background-color;
62
+ border-bottom: $border $border-color;
86
63
  }
87
64
 
88
- .main-content {
89
- padding-top: 0;
65
+ &.nav-open {
66
+ display: block;
90
67
 
91
68
  @include mq(md) {
92
69
  display: flex;
93
- justify-content: flex-end;
94
- height: 60px;
95
- padding-top: $sp-4;
96
- padding-bottom: $sp-4;
97
- border-bottom: $border $border-color;
98
70
  }
99
71
  }
100
72
  }
101
73
 
102
- .navigation,
103
- .site-title,
74
+ .site-nav,
75
+ .site-header,
104
76
  .site-footer {
105
-
106
- @include container;
107
-
108
77
  width: 100%;
109
78
 
110
79
  @include mq(lg) {
111
- width: $nav-width + 32px;
80
+ width: $nav-width;
112
81
  }
113
82
  }
114
83
 
115
- .navigation {
84
+ .site-nav {
85
+ display: none;
86
+
87
+ &.nav-open {
88
+ display: block;
89
+ }
90
+
116
91
  @include mq(md) {
92
+ display: block;
117
93
  padding-top: $sp-8;
94
+ padding-bottom: $gutter-spacing-sm;
118
95
  overflow-y: auto;
119
96
  flex: 1 1 auto;
120
97
  }
121
98
  }
122
99
 
100
+ .site-header {
101
+ display: flex;
102
+ min-height: $header-height;
103
+ align-items: center;
104
+
105
+ @include mq(md) {
106
+ height: $header-height;
107
+ max-height: $header-height;
108
+ border-bottom: $border $border-color;
109
+ }
110
+ }
111
+
112
+ .site-title {
113
+ @include container;
114
+ flex-grow: 1;
115
+ display: flex;
116
+ height: 100%;
117
+ align-items: center;
118
+ padding-top: $sp-3;
119
+ padding-bottom: $sp-3;
120
+ color: $body-heading-color;
121
+ @include fs-6;
122
+
123
+ @include mq(md) {
124
+ padding-top: $sp-2;
125
+ padding-bottom: $sp-2;
126
+ }
127
+ }
128
+
129
+ @if variable-exists(logo) {
130
+ .site-logo {
131
+ width: 100%;
132
+ height: 100%;
133
+ background-image: url($logo);
134
+ background-repeat: no-repeat;
135
+ background-position: left center;
136
+ background-size: contain;
137
+ }
138
+ }
139
+
140
+ .site-button {
141
+ display: flex;
142
+ height: 100%;
143
+ padding: $gutter-spacing-sm;
144
+ align-items: center;
145
+ }
146
+
147
+ @include mq(md) {
148
+ .site-header .site-button {
149
+ display: none;
150
+ }
151
+ }
152
+
153
+ .site-title:hover {
154
+ background-image: linear-gradient(
155
+ -90deg,
156
+ rgba($feedback-color, 1) 0%,
157
+ rgba($feedback-color, 0.8) 80%,
158
+ rgba($feedback-color, 0) 100%
159
+ );
160
+ }
161
+
162
+ .site-button:hover {
163
+ background-image: linear-gradient(
164
+ -90deg,
165
+ rgba($feedback-color, 1) 0%,
166
+ rgba($feedback-color, 0.8) 100%
167
+ );
168
+ }
169
+
123
170
  // stylelint-disable selector-max-type
124
171
 
125
172
  body {
126
173
  position: relative;
127
174
  padding-bottom: $sp-10;
175
+ overflow-y: scroll;
128
176
 
129
177
  @include mq(md) {
130
178
  position: static;
@@ -135,15 +183,23 @@ body {
135
183
  // stylelint-enable selector-max-type
136
184
 
137
185
  .site-footer {
186
+ @include container;
138
187
  position: absolute;
139
188
  bottom: 0;
189
+ left: 0;
140
190
  padding-top: $sp-4;
141
191
  padding-bottom: $sp-4;
192
+ color: $grey-dk-000;
193
+ @include fs-2;
142
194
 
143
195
  @include mq(md) {
144
196
  position: static;
145
- align-self: flex-end;
146
197
  justify-self: end;
147
- background-color: $sidebar-color;
148
198
  }
149
199
  }
200
+
201
+ .icon {
202
+ width: $sp-5;
203
+ height: $sp-5;
204
+ color: $link-color;
205
+ }
@@ -0,0 +1,20 @@
1
+ //
2
+ // Import external dependencies
3
+ //
4
+ @import "./vendor/normalize.scss/normalize.scss";
5
+
6
+ //
7
+ // Modules
8
+ //
9
+ @import "./base";
10
+ @import "./layout";
11
+ @import "./content";
12
+ @import "./navigation";
13
+ @import "./typography";
14
+ @import "./labels";
15
+ @import "./buttons";
16
+ @import "./search";
17
+ @import "./tables";
18
+ @import "./code";
19
+ @import "./utilities/utilities";
20
+ @import "./print";
@@ -1,117 +1,165 @@
1
1
  //
2
2
  // Main nav, breadcrumb, etc...
3
3
  //
4
+ // stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type, selector-max-specificity
4
5
 
5
- .site-title {
6
- display: block;
7
- flex: 1 1 auto;
8
- color: $body-heading-color;
9
- background-color: $sidebar-color;
10
-
11
- @include mq(md) {
12
- position: absolute;
13
- top: 0;
14
- right: 0;
15
- z-index: 101;
16
- height: 60px;
17
- padding-top: $sp-4;
18
- border-bottom: $border $border-color;
19
- }
20
- }
21
-
22
- .navigation-list {
6
+ .nav-list {
23
7
  padding: 0;
24
- margin-top: $sp-4;
8
+ margin-top: 0;
25
9
  margin-bottom: 0;
26
10
  list-style: none;
27
11
 
28
- @include mq(md) {
29
- margin-top: 0;
30
- }
31
- }
12
+ .nav-list-item {
13
+ @include fs-4;
14
+ position: relative;
15
+ margin: 0;
32
16
 
33
- .navigation-list-child-list {
34
- padding-left: $sp-3;
35
- list-style: none;
17
+ @include mq(md) {
18
+ @include fs-3;
19
+ }
36
20
 
37
- .navigation-list-link {
38
- color: $nav-child-link-color;
39
- }
21
+ .nav-list-link {
22
+ display: block;
23
+ min-height: $nav-list-item-height-sm;
24
+ padding-top: $sp-1;
25
+ padding-bottom: $sp-1;
26
+ line-height: #{$nav-list-item-height-sm - 2 * $sp-1};
27
+ @if $nav-list-expander-right {
28
+ padding-right: $nav-list-item-height-sm;
29
+ padding-left: $gutter-spacing-sm;
30
+ } @else {
31
+ padding-right: $gutter-spacing-sm;
32
+ padding-left: $nav-list-item-height-sm;
33
+ }
40
34
 
41
- .navigation-list-item {
42
- position: relative;
35
+ @include mq(md) {
36
+ min-height: $nav-list-item-height;
37
+ line-height: #{$nav-list-item-height - 2 * $sp-1};
38
+ @if $nav-list-expander-right {
39
+ padding-right: $nav-list-item-height;
40
+ padding-left: $gutter-spacing;
41
+ } @else {
42
+ padding-right: $gutter-spacing;
43
+ padding-left: $nav-list-item-height;
44
+ }
45
+ }
43
46
 
44
- &::before {
45
- position: absolute;
46
- margin-top: 0.3em;
47
- margin-left: -0.8em;
48
- color: rgba($body-text-color, 0.3);
49
- content: "- ";
47
+ &.active {
48
+ font-weight: 600;
49
+ text-decoration: none;
50
+ }
51
+
52
+ &:hover,
53
+ &.active {
54
+ background-image: linear-gradient(
55
+ -90deg,
56
+ rgba($feedback-color, 1) 0%,
57
+ rgba($feedback-color, 0.8) 80%,
58
+ rgba($feedback-color, 0) 100%
59
+ );
60
+ }
50
61
  }
51
62
 
52
- &.active {
53
- &::before {
54
- color: $body-text-color;
63
+ .nav-list-expander {
64
+ position: absolute;
65
+ @if $nav-list-expander-right {
66
+ right: 0;
67
+ }
68
+ width: $nav-list-item-height-sm;
69
+ height: $nav-list-item-height-sm;
70
+ padding-top: #{$nav-list-item-height-sm / 4};
71
+ padding-right: #{$nav-list-item-height-sm / 4};
72
+ padding-bottom: #{$nav-list-item-height-sm / 4};
73
+ padding-left: #{$nav-list-item-height-sm / 4};
74
+ color: $link-color;
75
+
76
+ @include mq(md) {
77
+ width: $nav-list-item-height;
78
+ height: $nav-list-item-height;
79
+ padding-top: #{$nav-list-item-height / 4};
80
+ padding-right: #{$nav-list-item-height / 4};
81
+ padding-bottom: #{$nav-list-item-height / 4};
82
+ padding-left: #{$nav-list-item-height / 4};
83
+ }
84
+
85
+ &:hover {
86
+ background-image: linear-gradient(
87
+ -90deg,
88
+ rgba($feedback-color, 1) 0%,
89
+ rgba($feedback-color, 0.8) 100%
90
+ );
91
+ }
92
+
93
+ @if $nav-list-expander-right {
94
+ svg {
95
+ transform: rotate(90deg);
96
+ }
55
97
  }
56
98
  }
57
- }
58
- }
59
99
 
60
- .navigation-list-item {
61
- @include fs-4;
62
- margin: 0;
100
+ > .nav-list {
101
+ display: none;
102
+ padding-left: $sp-3;
103
+ list-style: none;
63
104
 
64
- @include mq(md) {
65
- @include fs-3;
66
- }
105
+ .nav-list-item {
106
+ position: relative;
67
107
 
68
- .navigation-list-child-list {
69
- display: none;
70
- }
108
+ .nav-list-link {
109
+ color: $nav-child-link-color;
110
+ }
71
111
 
72
- &.active {
73
- .navigation-list-child-list {
74
- display: block;
112
+ .nav-list-expander {
113
+ color: $nav-child-link-color;
114
+ }
115
+ }
75
116
  }
76
- }
77
- }
78
117
 
79
- .navigation-list-link {
80
- display: block;
81
- padding-top: $sp-1;
82
- padding-bottom: $sp-1;
118
+ &.active {
119
+ > .nav-list-expander svg {
120
+ @if $nav-list-expander-right {
121
+ transform: rotate(-90deg);
122
+ } @else {
123
+ transform: rotate(90deg);
124
+ }
125
+ }
83
126
 
84
- &.active {
85
- font-weight: 600;
86
- color: $body-heading-color;
87
- text-decoration: none;
127
+ > .nav-list {
128
+ display: block;
129
+ }
130
+ }
88
131
  }
89
132
  }
90
133
 
91
- // Small screen nav
134
+ // Aux nav
92
135
 
93
- .main-nav,
94
136
  .aux-nav {
95
- display: none;
137
+ height: 100%;
138
+ overflow-x: auto;
139
+ @include fs-2;
96
140
 
97
- &.nav-open {
98
- display: block;
141
+ .aux-nav-list {
142
+ display: flex;
143
+ height: 100%;
144
+ padding: 0;
145
+ margin: 0;
146
+ list-style: none;
99
147
  }
100
- @include mq(md) {
101
- display: block;
102
- }
103
- }
104
148
 
105
- .navigation-list-toggle {
106
- position: absolute;
107
- right: $sp-4;
149
+ .aux-nav-list-item {
150
+ display: inline-block;
151
+ height: 100%;
152
+ padding: 0;
153
+ margin: 0;
154
+ }
108
155
 
109
156
  @include mq(md) {
110
- display: none !important;
157
+ padding-right: $gutter-spacing-sm;
111
158
  }
112
159
  }
113
160
 
114
161
  // Breadcrumb nav
162
+
115
163
  .breadcrumb-nav {
116
164
  @include mq(md) {
117
165
  margin-top: -$sp-4;