jekyll-text-theme 1.5.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -153
  3. data/_data/authors.yml +0 -0
  4. data/_data/licenses.yml +16 -0
  5. data/_data/locale.yml +4 -10
  6. data/_data/navigation.yml +13 -0
  7. data/_data/variables.yml +22 -6
  8. data/_includes/analytics-providers/custom.html +0 -0
  9. data/_includes/analytics-providers/google.html +16 -0
  10. data/_includes/analytics.html +7 -0
  11. data/_includes/article-footer/custom.html +1 -0
  12. data/_includes/article-footer/license.html +24 -0
  13. data/_includes/article-info.html +90 -0
  14. data/_includes/aside/toc.html +1 -0
  15. data/_includes/author-profile.html +50 -0
  16. data/_includes/comments-providers/custom.html +0 -0
  17. data/_includes/comments-providers/disqus.html +22 -0
  18. data/_includes/comments-providers/gitalk.html +32 -0
  19. data/_includes/comments.html +9 -0
  20. data/_includes/follow-me.html +84 -0
  21. data/_includes/footer.html +39 -0
  22. data/_includes/head.html +54 -0
  23. data/_includes/header.html +33 -0
  24. data/_includes/markdown-enhancements.html +32 -0
  25. data/_includes/{utils → markdown-enhancements}/chart.html +1 -3
  26. data/_includes/{utils → markdown-enhancements}/mathjax.html +11 -4
  27. data/_includes/{utils → markdown-enhancements}/mermaid.html +1 -3
  28. data/_includes/pageview-providers/custom.html +0 -0
  29. data/_includes/pageview-providers/custom/home.html +0 -0
  30. data/_includes/pageview-providers/custom/post.html +0 -0
  31. data/_includes/pageview-providers/leancloud/home.html +35 -0
  32. data/_includes/pageview-providers/leancloud/leancloud.js +71 -0
  33. data/_includes/pageview-providers/leancloud/post.html +31 -0
  34. data/_includes/pageview.html +31 -0
  35. data/_includes/scripts/archieve.js +238 -0
  36. data/_includes/scripts/article-list.html +27 -0
  37. data/_includes/scripts/article.js +24 -0
  38. data/_includes/scripts/aside/affix.js +26 -0
  39. data/_includes/scripts/aside/toc.js +37 -0
  40. data/_includes/scripts/common.js +3 -0
  41. data/_includes/scripts/home.js +3 -0
  42. data/_includes/scripts/lib/affix.js +103 -0
  43. data/_includes/scripts/{utils.html → lib/lazyload.js} +55 -92
  44. data/_includes/scripts/lib/scroll.js +13 -0
  45. data/_includes/scripts/lib/throttle.js +28 -0
  46. data/_includes/scripts/lib/toc.js +106 -0
  47. data/_includes/scripts/page.js +3 -0
  48. data/_includes/scripts/sidebar.js +14 -0
  49. data/_includes/scripts/utils.js +38 -0
  50. data/_includes/scripts/variables.html +27 -0
  51. data/_includes/sidebar/toc.html +27 -0
  52. data/_includes/snippets/assign.html +5 -0
  53. data/_includes/snippets/get-nav-url.html +3 -2
  54. data/_includes/snippets/page-title.html +11 -6
  55. data/_includes/snippets/page-url.html +3 -1
  56. data/_includes/snippets/to-boolean.html +7 -0
  57. data/_includes/{icon → svg/icon}/social/behance.svg +0 -0
  58. data/_includes/{icon → svg/icon}/social/douban.svg +0 -0
  59. data/_includes/{icon → svg/icon}/social/facebook.svg +0 -0
  60. data/_includes/{icon → svg/icon}/social/flicker.svg +0 -0
  61. data/_includes/{icon → svg/icon}/social/github.svg +0 -0
  62. data/_includes/{icon → svg/icon}/social/googleplus.svg +0 -0
  63. data/_includes/{icon → svg/icon}/social/linkedin.svg +0 -0
  64. data/_includes/{icon → svg/icon}/social/mail.svg +0 -0
  65. data/_includes/{icon → svg/icon}/social/pinterest.svg +0 -0
  66. data/_includes/{icon → svg/icon}/social/qq.svg +0 -0
  67. data/_includes/{icon → svg/icon}/social/twitter.svg +0 -0
  68. data/_includes/{icon → svg/icon}/social/weibo.svg +0 -0
  69. data/_includes/{icon → svg/icon}/social/weixin.svg +0 -0
  70. data/_includes/{icon → svg/icon}/social/zhihu.svg +0 -0
  71. data/_includes/{logo → svg}/logo.svg +1 -1
  72. data/_includes/tags.html +52 -0
  73. data/_layouts/404.html +12 -0
  74. data/_layouts/archive.html +25 -0
  75. data/_layouts/article.html +78 -0
  76. data/_layouts/base.html +13 -33
  77. data/_layouts/home.html +135 -121
  78. data/_layouts/landing.html +164 -0
  79. data/_layouts/page.html +157 -9
  80. data/_sass/additional/_alert.scss +25 -0
  81. data/_sass/additional/_photo-frame.scss +17 -0
  82. data/_sass/animate/_fade-in-down.scss +1 -1
  83. data/_sass/animate/_fade-in.scss +1 -1
  84. data/_sass/common/_classes.scss +5 -2
  85. data/_sass/common/_reset.scss +32 -22
  86. data/_sass/common/_variables.scss +87 -31
  87. data/_sass/common/classes/_animation.scss +9 -0
  88. data/_sass/common/classes/_clearfix.scss +8 -0
  89. data/_sass/common/classes/_grid.scss +48 -0
  90. data/_sass/common/classes/_horizontal-rules.scss +14 -0
  91. data/_sass/common/classes/_link.scss +18 -145
  92. data/_sass/common/classes/_media.scss +1 -2
  93. data/_sass/common/classes/_overflow.scss +8 -0
  94. data/_sass/common/classes/_pseudo.scss +26 -0
  95. data/_sass/common/classes/_shadow.scss +13 -5
  96. data/_sass/common/classes/_spacing.scss +52 -0
  97. data/_sass/common/components/_button.scss +179 -47
  98. data/_sass/common/components/_card.scss +18 -0
  99. data/_sass/common/components/_menu.scss +43 -0
  100. data/_sass/common/components/_toc.scss +125 -0
  101. data/_sass/components/_article.content.scss +37 -45
  102. data/_sass/components/_article.info.scss +25 -0
  103. data/_sass/components/_author-profile.scss +43 -0
  104. data/_sass/components/_follow-me.scss +16 -19
  105. data/_sass/components/_footer.scss +16 -6
  106. data/_sass/components/_header.scss +26 -18
  107. data/_sass/components/_license.scss +1 -25
  108. data/_sass/components/_main.scss +13 -11
  109. data/_sass/components/_tags.scss +17 -36
  110. data/_sass/layout/{_error-404.scss → _404.scss} +2 -2
  111. data/_sass/layout/_all.scss +72 -63
  112. data/_sass/layout/_article.scss +44 -0
  113. data/_sass/layout/_home.scss +61 -52
  114. data/_sass/layout/_landing.scss +104 -0
  115. data/_sass/layout/_page.scss +155 -0
  116. data/_sass/{colors → skins}/_chocolate.scss +17 -6
  117. data/_sass/skins/_dark.scss +56 -0
  118. data/_sass/{colors → skins}/_default.scss +16 -5
  119. data/_sass/{colors → skins}/_forest.scss +16 -5
  120. data/_sass/{colors → skins}/_ocean.scss +16 -5
  121. data/_sass/{colors → skins}/_orange.scss +20 -9
  122. data/assets/android-chrome-192x192.png +0 -0
  123. data/assets/android-chrome-512x512.png +0 -0
  124. data/assets/apple-touch-icon.png +0 -0
  125. data/assets/browserconfig.xml +9 -0
  126. data/assets/css/main.scss +46 -0
  127. data/assets/favicon-16x16.png +0 -0
  128. data/assets/favicon-32x32.png +0 -0
  129. data/assets/favicon.ico +0 -0
  130. data/assets/images/logo/logo.svg +1 -1
  131. data/assets/mstile-144x144.png +0 -0
  132. data/assets/mstile-150x150.png +0 -0
  133. data/assets/mstile-310x150.png +0 -0
  134. data/assets/mstile-310x310.png +0 -0
  135. data/assets/mstile-70x70.png +0 -0
  136. data/assets/safari-pinned-tab.svg +38 -0
  137. data/assets/site.webmanifest +19 -0
  138. metadata +108 -76
  139. data/_includes/common-head.html +0 -10
  140. data/_includes/components/article-data.html +0 -55
  141. data/_includes/components/follow-me.html +0 -78
  142. data/_includes/components/footer.html +0 -10
  143. data/_includes/components/header.html +0 -42
  144. data/_includes/components/license.html +0 -26
  145. data/_includes/components/tags.html +0 -52
  146. data/_includes/head-icons-rel.html +0 -38
  147. data/_includes/icon/clear.svg +0 -3
  148. data/_includes/icon/link.svg +0 -1
  149. data/_includes/icon/menu.svg +0 -3
  150. data/_includes/icon/next.svg +0 -3
  151. data/_includes/icon/omit.svg +0 -1
  152. data/_includes/icon/previous.svg +0 -3
  153. data/_includes/icon/search.svg +0 -3
  154. data/_includes/scripts/all.html +0 -244
  155. data/_includes/scripts/common.html +0 -30
  156. data/_includes/scripts/data.html +0 -27
  157. data/_includes/scripts/home.html +0 -26
  158. data/_includes/scripts/page-post.html +0 -32
  159. data/_includes/scripts/post.html +0 -183
  160. data/_includes/utils/comment-disqus.html +0 -19
  161. data/_includes/utils/comment-gitalk.html +0 -25
  162. data/_includes/utils/google-analytics.html +0 -11
  163. data/_layouts/all.html +0 -20
  164. data/_layouts/error-404.html +0 -9
  165. data/_layouts/post.html +0 -60
  166. data/_sass/colors/_dark.scss +0 -45
  167. data/_sass/common/classes/_shape.scss +0 -19
  168. data/_sass/common/classes/_space.scss +0 -40
  169. data/_sass/components/_article.content.extra.scss +0 -41
  170. data/_sass/components/_article.data.scss +0 -36
  171. data/_sass/components/_pagination.scss +0 -19
  172. data/_sass/components/_toc.scss +0 -72
  173. data/_sass/layout/_default.scss +0 -19
  174. data/_sass/layout/_post.scss +0 -80
  175. data/assets/css/blog.scss +0 -41
  176. data/assets/images/logo/icon-120x120.png +0 -0
  177. data/assets/images/logo/icon-128x128.png +0 -0
  178. data/assets/images/logo/icon-150x150.png +0 -0
  179. data/assets/images/logo/icon-152x152.png +0 -0
  180. data/assets/images/logo/icon-167x167.png +0 -0
  181. data/assets/images/logo/icon-16x16.png +0 -0
  182. data/assets/images/logo/icon-180x180.png +0 -0
  183. data/assets/images/logo/icon-192x192.png +0 -0
  184. data/assets/images/logo/icon-310x150.png +0 -0
  185. data/assets/images/logo/icon-310x310.png +0 -0
  186. data/assets/images/logo/icon-48x48.png +0 -0
  187. data/assets/images/logo/icon-70x70.png +0 -0
@@ -2,13 +2,21 @@
2
2
  @if $color == default {
3
3
  $color: #000;
4
4
  }
5
+ @if $level == 0 {
6
+ box-shadow: none;
7
+ }
5
8
  @if $level == 1 or $level == default {
6
- box-shadow: 0 2px 10px rgba($color, 0.15);
9
+ box-shadow: 0 4px 6px rgba($color, .11), 0 1px 3px rgba($color, .08);
7
10
  }
8
11
  @if $level == 2 {
9
- box-shadow: 0 2px 4px rgba($color, .12), 0 2px 8px rgba($color, .06), 0 2px 10px rgba($color, .2);
10
- }
11
- @if $level == 3 {
12
- box-shadow: 0 4px 4px rgba($color, .16), 0 2px 8px rgba($color, .1), 0 4px 12px rgba($color, .25);
12
+ box-shadow: 0 7px 14px rgba($color, .1), 0 3px 6px rgba($color, .08);
13
13
  }
14
+ }
15
+
16
+ .box-shadow-1 {
17
+ @include box-shadow();
18
+ }
19
+
20
+ .box-shadow-2 {
21
+ @include box-shadow(2);
14
22
  }
@@ -0,0 +1,52 @@
1
+ @mixin make-spacing($type, $direction, $spacer) {
2
+
3
+ $_type: null;
4
+ $_dirs: null;
5
+
6
+ @if ($type == 'm') {
7
+ $_type: 'margin';
8
+ } @else if ($type == 'p') {
9
+ $_type: 'padding';
10
+ }
11
+
12
+ @if ($direction == 't') {
13
+ $_dirs: ('top');
14
+ }
15
+ @else if ($direction == 'b') {
16
+ $_dirs: ('bottom');
17
+ }
18
+ @else if ($direction == 'l') {
19
+ $_dirs: ('left');
20
+ }
21
+ @else if ($direction == 'r') {
22
+ $_dirs: ('right');
23
+ }
24
+ @else if ($direction == 'x') {
25
+ $_dirs: ('left', 'right');
26
+ }
27
+ @else if ($direction == 'y') {
28
+ $_dirs: ('top', 'bottom');
29
+ }
30
+ @else if ($direction == '') {
31
+ $_dirs: ('top', 'bottom', 'left', 'right');
32
+ }
33
+
34
+ @each $dir in $_dirs {
35
+ #{$_type}-#{$dir} : map-get($spacers, $spacer);
36
+ }
37
+ }
38
+
39
+
40
+ $_types: ('m', 'p');
41
+ $_directions: ('t', 'b', 'l', 'r', 'x', 'y', '');
42
+ $_spacers: (0, 1, 2, 3, 4, 5);
43
+
44
+ @each $i in $_types {
45
+ @each $j in $_directions {
46
+ @each $k in $_spacers {
47
+ .#{$i}#{$j}-#{$k} {
48
+ @include make-spacing($i, $j, $k);
49
+ }
50
+ }
51
+ }
52
+ }
@@ -1,72 +1,204 @@
1
- %button {
2
- font-weight: map-get($base, font-weight-bold);
3
- line-height: 1;
4
- box-sizing: border-box;
5
- display: block;
6
- cursor: pointer;
7
- @include link-normal() {
8
- text-decoration: none;
1
+ @mixin button-colors($clr, $bg-clr, $hover-clr: default, $hover-bg-clr: default, $active-clr: default, $active-bg-clr: default, $focus-clr: default, $focus-bg-clr: default, $theme: default) {
2
+ @if $theme == default {
3
+ $theme: light;
4
+ }
5
+ @if $hover-clr == default {
6
+ $hover-clr: $clr
7
+ }
8
+ @if $hover-bg-clr == default {
9
+ @if $theme == 'light' {
10
+ $hover-bg-clr: darken($bg-clr, 13%);
11
+ }
12
+ @if $theme == 'dark' {
13
+ $hover-bg-clr: lighten($bg-clr, 23%);
14
+ }
15
+ }
16
+
17
+ @if $active-clr == default {
18
+ $active-clr: $clr
19
+ }
20
+ @if $active-bg-clr == default {
21
+ @if $theme == 'light' {
22
+ $active-bg-clr: darken($bg-clr, 13%);
23
+ }
24
+ @if $theme == 'dark' {
25
+ $active-bg-clr: lighten($bg-clr, 23%);
26
+ }
27
+ }
28
+
29
+ @if $focus-clr == default {
30
+ $focus-clr: $clr
31
+ }
32
+ @if $focus-bg-clr == default {
33
+ @if $theme == 'light' {
34
+ $focus-bg-clr: darken($bg-clr, 13%);
35
+ }
36
+ @if $theme == 'dark' {
37
+ $focus-bg-clr: lighten($bg-clr, 23%);
38
+ }
9
39
  }
10
- .not-touch &, & {
11
- @include link-hover() {
12
- text-decoration: none;
40
+ @include plain {
41
+ color: $clr;
42
+ background-color: $bg-clr;
43
+ svg path {
44
+ fill: $clr;
13
45
  }
14
46
  }
15
- @include link-active() {
16
- text-decoration: none;
47
+ @include hover {
48
+ color: $hover-clr;
49
+ background-color: $hover-bg-clr;
50
+ svg path {
51
+ fill: $hover-clr;
52
+ }
17
53
  }
18
- @include link-focus() {
19
- text-decoration: none;
54
+ @include active {
55
+ color: $active-clr;
56
+ background-color: $active-bg-clr;
57
+ svg path {
58
+ fill: $active-clr;
59
+ }
20
60
  }
21
- @include link-colors($text-color-3, $main-color-3, $text-color-1, $main-color-1, $text-color-1, $main-color-1);
22
- @include link-animation();
61
+ @include focus {
62
+ color: $focus-clr;
63
+ @include box-shadow(2, $focus-bg-clr);
64
+ background-color: $focus-bg-clr;
65
+ svg path {
66
+ fill: $focus-clr;
67
+ }
68
+ }
69
+ }
70
+
71
+ @mixin button() {
72
+ font-weight: map-get($button, font-weight);
73
+ line-height: map-get($base, line-height);
74
+ outline: none;
75
+ display: inline-block;
76
+ cursor: pointer;
77
+ text-decoration: none !important;
78
+ @include transition(map-get($button, transition));
23
79
  svg {
24
80
  width: 1rem;
25
81
  height: 1rem;
26
82
  path {
27
- @include link-animation();
83
+ @include transition(map-get($button, transition));
28
84
  }
29
85
  }
30
- &.inactive {
86
+ &.disabled,
87
+ &:disabled {
31
88
  cursor: not-allowed;
32
- @include link-normal() {
33
- color: rgba($text-color-3, .2) !important;
34
- background-color: $main-color-3 !important;
35
- svg path {
36
- fill: rgba($text-color-3, .2) !important;
37
- }
38
- }
39
- @include link-emphasize() {
40
- color: rgba($text-color-3, .2) !important;
41
- background-color: $main-color-3 !important;
42
- svg path {
43
- fill: rgba($text-color-3, .2) !important;
44
- }
89
+ color: rgba($text-color-3, .2) !important;
90
+ background-color: $main-color-3 !important;
91
+ svg path {
92
+ fill: rgba($text-color-3, .2) !important;
45
93
  }
46
94
  }
47
95
  }
48
96
 
49
- %floating-action {
50
- @include box-shadow(2);
51
- &:hover {
52
- @include box-shadow(3);
53
- }
97
+ .button {
98
+ @include button();
99
+ }
100
+
101
+ .button--primary {
102
+ @include button-colors($text-color-1, $main-color-1);
103
+ }
104
+
105
+ .button--secondary {
106
+ @include button-colors($text-color-3, $main-color-3);
54
107
  }
55
108
 
56
- .round-button {
57
- @extend %button;
58
- @include round;
59
- @include flexbox;
109
+ .button--success {
110
+ @include button-colors($text-color-function, $green);
111
+ }
112
+
113
+ .button--info {
114
+ @include button-colors($text-color-function, $blue);
115
+ }
116
+
117
+ .button--warning {
118
+ @include button-colors($text-color-function, $yellow);
119
+ }
120
+
121
+ .button--error {
122
+ @include button-colors($text-color-function, $red);
123
+ }
124
+
125
+ .button--outline-primary {
126
+ color: $main-color-1;
127
+ border: 1px solid $main-color-1;
128
+ @include button-colors($main-color-1, transparent, $text-color-1, $main-color-1, $text-color-1, $main-color-1, $text-color-1, $main-color-1);
129
+ }
130
+
131
+ .button--outline-secondary {
132
+ color: $main-color-3;
133
+ border: 1px solid $main-color-3;
134
+ @include button-colors($main-color-3, transparent, $text-color-3, $main-color-3, $text-color-3, $main-color-3, $text-color-3, $main-color-3);
135
+ }
136
+
137
+ .button--outline-success {
138
+ color: $green;
139
+ border: 1px solid $green;
140
+ @include button-colors($green, transparent, $text-color-function, $green, $text-color-function, $green, $text-color-function, $green);
141
+ }
142
+
143
+ .button--outline-info {
144
+ color: $blue;
145
+ border: 1px solid $blue;
146
+ @include button-colors($blue, transparent, $text-color-function, $blue, $text-color-function, $blue, $text-color-function, $blue);
147
+ }
148
+
149
+ .button--outline-warning {
150
+ color: $yellow;
151
+ border: 1px solid $yellow;
152
+ @include button-colors($yellow, transparent, $text-color-function, $yellow, $text-color-function, $yellow, $text-color-function, $yellow);
153
+ }
154
+
155
+ .button--outline-error {
156
+ color: $red;
157
+ border: 1px solid $red;
158
+ @include button-colors($red, transparent, $text-color-function, $red, $text-color-function, $red, $text-color-function, $red);
159
+ }
160
+
161
+ .button--pill {
162
+ border-radius: 2rem;
163
+ @extend .button--md;
164
+ }
165
+
166
+ .button--rounded {
167
+ border-radius: map-get($base, border-radius);
168
+ @extend .button--md;
169
+ }
170
+
171
+ .button--circle {
172
+ @include flexbox();
60
173
  @include justify-content(center);
61
174
  @include align-items(center);
175
+ border-radius: 50%;
176
+ @extend .button--md;
62
177
  }
63
178
 
64
- .floating-action-round-button {
65
- @extend .round-button;
66
- @extend %floating-action;
179
+ .button--md {
180
+ font-size: map-get($base, font-size);
181
+ padding: map-get($button, padding-y) map-get($button, padding-x);
182
+ &.button--circle {
183
+ width: map-get($button, circle-diameter);
184
+ height: map-get($button, circle-diameter);
185
+ }
67
186
  }
68
187
 
69
- .pill-button {
70
- @extend %button;
71
- @include round-rect(2rem, .4rem .6rem);
188
+ .button--sm {
189
+ font-size: map-get($base, font-size-sm);
190
+ padding: map-get($button, padding-y-sm) map-get($button, padding-x-sm);
191
+ &.button--circle {
192
+ width: map-get($button, circle-diameter-sm);
193
+ height: map-get($button, circle-diameter-sm);
194
+ }
72
195
  }
196
+
197
+ .button--lg {
198
+ font-size: map-get($base, font-size-lg);
199
+ padding: map-get($button, padding-y-lg) map-get($button, padding-x-lg);
200
+ &.button--circle {
201
+ width: map-get($button, circle-diameter-lg);
202
+ height: map-get($button, circle-diameter-lg);
203
+ }
204
+ }
@@ -0,0 +1,18 @@
1
+ @mixin card($has-shadow: default) {
2
+ @if $has-shadow == default {
3
+ $has-shadow: true
4
+ }
5
+ border-radius: map-get($base, border-radius);
6
+ padding: .5rem 1rem;
7
+ @if $has-shadow {
8
+ @include box-shadow();
9
+ }
10
+ }
11
+
12
+ .card {
13
+ @include card();
14
+ }
15
+
16
+ .card--no-shadow {
17
+ @include box-shadow(0);
18
+ }
@@ -0,0 +1,43 @@
1
+ @mixin menu($horizontal-spacer: default, $horizontal-item-vertical-spacer: default, $wrap: default) {
2
+ @if $horizontal-spacer == default {
3
+ $horizontal-spacer: map-get($menu, horizontal-spacer);
4
+ }
5
+ @if $horizontal-item-vertical-spacer == default {
6
+ $horizontal-item-vertical-spacer: map-get($menu, horizontal-item-vertical-spacer);
7
+ }
8
+ @if $wrap == default {
9
+ $wrap: wrap;
10
+ }
11
+ @include flexbox();
12
+ @include flex-wrap($wrap);
13
+ @include align-items(center);
14
+ margin-top: 0;
15
+ margin-bottom: 0;
16
+ & > li {
17
+ @if $horizontal-item-vertical-spacer {
18
+ margin-top: map-get($spacers, $horizontal-item-vertical-spacer);
19
+ margin-bottom: map-get($spacers, $horizontal-item-vertical-spacer);
20
+ }
21
+ list-style-type: none;
22
+ margin-right: map-get($spacers, $horizontal-spacer);
23
+ &:last-child {
24
+ margin-right: 0;
25
+ }
26
+ }
27
+ }
28
+
29
+ .menu {
30
+ @include menu();
31
+ }
32
+
33
+ .menu--center {
34
+ @include justify-content(center);
35
+ }
36
+
37
+ .menu--nowrap {
38
+ @include flex-wrap(nowrap);
39
+ }
40
+
41
+ .menu--grow {
42
+ @include flex-grow(1);
43
+ }
@@ -0,0 +1,125 @@
1
+ ul.toc {
2
+ display: block;
3
+ margin: 0;
4
+ list-style-type: none;
5
+ & > li {
6
+ margin: .1rem 0;
7
+ &.active {
8
+ a {
9
+ background-color: $main-color-3;
10
+ @include link-colors($main-color-1);
11
+ }
12
+ }
13
+ }
14
+
15
+ a {
16
+ display: inline-block;
17
+ padding: .2rem .8rem .2rem .8rem;
18
+ border-radius: map-get($base, border-radius);
19
+ @include link-colors($text-color);
20
+ @include plain() {
21
+ text-decoration: none;
22
+ }
23
+ @include hover() {
24
+ color: $text-color-3;
25
+ background-color: $main-color-3;
26
+ text-decoration: none;
27
+ }
28
+ @include active() {
29
+ text-decoration: none;
30
+ }
31
+ @include focus() {
32
+ text-decoration: none;
33
+ }
34
+ }
35
+
36
+ .toc-h1 {
37
+ @include split-line(bottom);
38
+ padding: .8rem 0 .3rem 0;
39
+ margin-bottom: .6rem;
40
+ &, a {
41
+ color: $text-color-d;
42
+ }
43
+ }
44
+ .toc-h1,
45
+ .toc-h2 {
46
+ &, a {
47
+ font-weight: map-get($base, font-weight-bold);
48
+ }
49
+ }
50
+ .toc-h3,
51
+ .toc-h4,
52
+ .toc-h5,
53
+ .toc-h6 {
54
+ &, a {
55
+ font-weight: map-get($base, font-weight);
56
+ }
57
+ }
58
+ .toc-h5,
59
+ .toc-h6 {
60
+ &, a {
61
+ color: $text-color-l;
62
+ }
63
+ }
64
+ .toc-h3 {
65
+ margin-left: 1rem;
66
+ }
67
+ .toc-h4 {
68
+ margin-left: 2rem;
69
+ }
70
+ .toc-h5, .toc-h6 {
71
+ margin-left: 3rem;
72
+ }
73
+
74
+ .toc-h1 {
75
+ &, a {
76
+ font-size: map-get($base, font-size);
77
+ line-height: map-get($base, line-height-lg);
78
+ }
79
+ }
80
+ .toc-h2 {
81
+ &, a {
82
+ font-size: map-get($base, font-size-sm);
83
+ line-height: map-get($base, line-height);
84
+ }
85
+ }
86
+ .toc-h3,
87
+ .toc-h4,
88
+ .toc-h5,
89
+ .toc-h6 {
90
+ &, a {
91
+ font-size: map-get($base, font-size-xs);
92
+ line-height: map-get($base, line-height-xs);
93
+ }
94
+ }
95
+ }
96
+
97
+ ul.toc--navigator {
98
+ & > li {
99
+ &.active {
100
+ a {
101
+ background-color: transparent;
102
+ @include link-colors($main-color-1);
103
+ @include split-line(left, 4px, $main-color-1);
104
+ margin-left: -4px;
105
+ }
106
+ }
107
+ }
108
+
109
+ .toc-h2,
110
+ .toc-h3,
111
+ .toc-h4 {
112
+ &, a {
113
+ @include link-colors($text-color-l, $main-color-1, $main-color-1);
114
+ }
115
+ }
116
+
117
+ a {
118
+ padding: 0 0 0 .5rem;
119
+ margin: .2rem 0;
120
+ border-radius: 0;
121
+ @include hover() {
122
+ background-color: transparent;
123
+ }
124
+ }
125
+ }