just-the-docs 0.2.6 → 0.3.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 (40) hide show
  1. checksums.yaml +4 -4
  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 +4 -4
  6. data/_includes/nav.html +55 -40
  7. data/_includes/title.html +5 -1
  8. data/_includes/vendor/anchor_headings.html +2 -2
  9. data/_layouts/default.html +146 -73
  10. data/_layouts/table_wrappers.html +1 -1
  11. data/_sass/base.scss +16 -18
  12. data/_sass/code.scss +209 -71
  13. data/_sass/color_schemes/dark.scss +1 -1
  14. data/_sass/color_schemes/light.scss +0 -0
  15. data/_sass/content.scss +53 -5
  16. data/_sass/custom/custom.scss +0 -129
  17. data/_sass/labels.scss +5 -4
  18. data/_sass/layout.scss +67 -55
  19. data/_sass/modules.scss +20 -0
  20. data/_sass/navigation.scss +129 -53
  21. data/_sass/print.scss +40 -0
  22. data/_sass/search.scss +204 -48
  23. data/_sass/support/_functions.scss +2 -3
  24. data/_sass/support/_variables.scss +15 -9
  25. data/_sass/support/mixins/_layout.scss +1 -3
  26. data/_sass/support/mixins/_typography.scss +6 -1
  27. data/_sass/typography.scss +9 -7
  28. data/_sass/utilities/_layout.scss +74 -17
  29. data/_sass/utilities/_lists.scss +7 -1
  30. data/_sass/utilities/_spacing.scss +69 -25
  31. data/assets/css/just-the-docs-dark.scss +3 -0
  32. data/assets/css/just-the-docs-default.scss +8 -0
  33. data/assets/css/just-the-docs-light.scss +3 -0
  34. data/assets/js/just-the-docs.js +374 -197
  35. data/assets/js/zzzz-search-data.json +58 -0
  36. data/lib/tasks/search.rake +54 -9
  37. metadata +36 -24
  38. data/assets/css/dark-mode-preview.scss +0 -41
  39. data/assets/css/just-the-docs.scss +0 -44
  40. data/assets/js/search-data.json +0 -11
@@ -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,28 +2,15 @@
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
9
  background-color: $sidebar-color;
23
10
 
24
11
  @include mq(md) {
25
12
  flex-wrap: nowrap;
26
- position: absolute;
13
+ position: fixed;
27
14
  width: $nav-width-md;
28
15
  height: 100%;
29
16
  flex-direction: column;
@@ -37,20 +24,7 @@
37
24
  }
38
25
  }
39
26
 
40
- .main-content-wrap {
41
- @include mq(md) {
42
- position: absolute;
43
- top: 0;
44
- left: 0;
45
- width: 100%;
46
- height: 100%;
47
- -webkit-overflow-scrolling: touch;
48
- overflow-x: hidden;
49
- overflow-y: scroll;
50
- }
51
- }
52
-
53
- .main-content {
27
+ .main {
54
28
  @include mq(md) {
55
29
  position: relative;
56
30
  max-width: $content-width;
@@ -58,15 +32,13 @@
58
32
  }
59
33
 
60
34
  @include mq(lg) {
61
- margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
35
+ margin-left: calc(
36
+ (100% - #{$nav-width + $content-width}) / 2 + #{$nav-width}
37
+ );
62
38
  }
63
39
  }
64
40
 
65
- .js-main-content:focus {
66
- outline: none;
67
- }
68
-
69
- .page {
41
+ .main-content-wrap {
70
42
  @include container;
71
43
  padding-top: $gutter-spacing-sm;
72
44
  padding-bottom: $gutter-spacing-sm;
@@ -77,16 +49,14 @@
77
49
  }
78
50
  }
79
51
 
80
- .page-header {
81
- @include container;
52
+ .main-header {
53
+ z-index: 0;
82
54
  display: none;
83
- padding-top: $gutter-spacing-sm;
84
- padding-bottom: $gutter-spacing-sm;
85
55
  background-color: $sidebar-color;
86
56
 
87
57
  @include mq(md) {
88
58
  display: flex;
89
- justify-content: flex-end;
59
+ justify-content: space-between;
90
60
  height: $header-height;
91
61
  background-color: $body-background-color;
92
62
  border-bottom: $border $border-color;
@@ -101,10 +71,9 @@
101
71
  }
102
72
  }
103
73
 
104
- .navigation,
74
+ .site-nav,
105
75
  .site-header,
106
76
  .site-footer {
107
-
108
77
  width: 100%;
109
78
 
110
79
  @include mq(lg) {
@@ -112,10 +81,15 @@
112
81
  }
113
82
  }
114
83
 
115
- .navigation {
116
- @include container;
84
+ .site-nav {
85
+ display: none;
86
+
87
+ &.nav-open {
88
+ display: block;
89
+ }
117
90
 
118
91
  @include mq(md) {
92
+ display: block;
119
93
  padding-top: $sp-8;
120
94
  padding-bottom: $gutter-spacing-sm;
121
95
  overflow-y: auto;
@@ -125,12 +99,11 @@
125
99
 
126
100
  .site-header {
127
101
  display: flex;
102
+ min-height: $header-height;
128
103
  align-items: center;
129
104
 
130
105
  @include mq(md) {
131
- z-index: 101;
132
106
  height: $header-height;
133
- min-height: $header-height;
134
107
  max-height: $header-height;
135
108
  border-bottom: $border $border-color;
136
109
  }
@@ -142,33 +115,64 @@
142
115
  display: flex;
143
116
  height: 100%;
144
117
  align-items: center;
145
- padding-top: $gutter-spacing-sm;
146
- padding-bottom: $gutter-spacing-sm;
118
+ padding-top: $sp-3;
119
+ padding-bottom: $sp-3;
147
120
  color: $body-heading-color;
148
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
+ }
149
138
  }
150
139
 
151
- .menu-button {
152
- appearance: none;
140
+ .site-button {
153
141
  display: flex;
154
142
  height: 100%;
155
143
  padding: $gutter-spacing-sm;
156
144
  align-items: center;
157
- color: $link-color;
158
- text-transform: uppercase;
159
- background: transparent;
160
- border: 0;
145
+ }
161
146
 
162
- @include mq(md) {
147
+ @include mq(md) {
148
+ .site-header .site-button {
163
149
  display: none;
164
150
  }
165
151
  }
166
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
+
167
170
  // stylelint-disable selector-max-type
168
171
 
169
172
  body {
170
173
  position: relative;
171
174
  padding-bottom: $sp-10;
175
+ overflow-y: scroll;
172
176
 
173
177
  @include mq(md) {
174
178
  position: static;
@@ -185,9 +189,17 @@ body {
185
189
  left: 0;
186
190
  padding-top: $sp-4;
187
191
  padding-bottom: $sp-4;
192
+ color: $grey-dk-000;
193
+ @include fs-2;
188
194
 
189
195
  @include mq(md) {
190
196
  position: static;
191
197
  justify-self: end;
192
198
  }
193
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,89 +1,165 @@
1
1
  //
2
2
  // Main nav, breadcrumb, etc...
3
3
  //
4
- .navigation-list {
4
+ // stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type, selector-max-specificity
5
+
6
+ .nav-list {
5
7
  padding: 0;
6
8
  margin-top: 0;
7
9
  margin-bottom: 0;
8
10
  list-style: none;
9
- }
10
11
 
11
- .navigation-list-child-list {
12
- padding-left: $sp-3;
13
- list-style: none;
12
+ .nav-list-item {
13
+ @include fs-4;
14
+ position: relative;
15
+ margin: 0;
14
16
 
15
- .navigation-list-link {
16
- color: $nav-child-link-color;
17
- }
17
+ @include mq(md) {
18
+ @include fs-3;
19
+ }
18
20
 
19
- .navigation-list-item {
20
- position: relative;
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
+ }
21
34
 
22
- &::before {
23
- position: absolute;
24
- margin-top: 0.3em;
25
- margin-left: -0.8em;
26
- color: rgba($body-text-color, 0.3);
27
- content: "- ";
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
+ }
46
+
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
+ }
28
61
  }
29
62
 
30
- &.active {
31
- &::before {
32
- 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
+ }
33
97
  }
34
98
  }
35
- }
36
- }
37
99
 
38
- .navigation-list-item {
39
- @include fs-4;
40
- margin: 0;
100
+ > .nav-list {
101
+ display: none;
102
+ padding-left: $sp-3;
103
+ list-style: none;
41
104
 
42
- @include mq(md) {
43
- @include fs-3;
44
- }
105
+ .nav-list-item {
106
+ position: relative;
45
107
 
46
- .navigation-list-child-list {
47
- display: none;
48
- }
108
+ .nav-list-link {
109
+ color: $nav-child-link-color;
110
+ }
49
111
 
50
- &.active {
51
- .navigation-list-child-list {
52
- display: block;
112
+ .nav-list-expander {
113
+ color: $nav-child-link-color;
114
+ }
115
+ }
53
116
  }
54
- }
55
- }
56
117
 
57
- .navigation-list-link {
58
- display: block;
59
- padding-top: $sp-1;
60
- 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
+ }
61
126
 
62
- &.active {
63
- font-weight: 600;
64
- color: $body-heading-color;
65
- text-decoration: none;
127
+ > .nav-list {
128
+ display: block;
129
+ }
130
+ }
66
131
  }
67
132
  }
68
133
 
69
- // Small screen nav
134
+ // Aux nav
70
135
 
71
- .main-nav {
72
- display: none;
136
+ .aux-nav {
137
+ height: 100%;
138
+ overflow-x: auto;
139
+ @include fs-2;
73
140
 
74
- &.nav-open {
75
- display: block;
141
+ .aux-nav-list {
142
+ display: flex;
143
+ height: 100%;
144
+ padding: 0;
145
+ margin: 0;
146
+ list-style: none;
76
147
  }
77
- @include mq(md) {
78
- display: block;
148
+
149
+ .aux-nav-list-item {
150
+ display: inline-block;
151
+ height: 100%;
152
+ padding: 0;
153
+ margin: 0;
79
154
  }
80
- }
81
155
 
82
- .aux-nav {
83
- align-self: center;
156
+ @include mq(md) {
157
+ padding-right: $gutter-spacing-sm;
158
+ }
84
159
  }
85
160
 
86
161
  // Breadcrumb nav
162
+
87
163
  .breadcrumb-nav {
88
164
  @include mq(md) {
89
165
  margin-top: -$sp-4;