jekyll-text-theme 2.2.3 → 2.2.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/README.md +2 -2
- data/_data/variables.yml +2 -0
- data/_includes/comments-providers/valine.html +33 -0
- data/_includes/comments.html +2 -0
- data/_includes/scripts/components/lightbox.js +49 -0
- data/_includes/scripts/components/search/search.js +30 -45
- data/_includes/scripts/components/sidebar.js +2 -5
- data/_includes/scripts/lib/affix.js +1 -1
- data/_includes/scripts/lib/gallery.js +89 -0
- data/_includes/scripts/lib/modal.js +62 -0
- data/_includes/scripts/lib/swiper.js +65 -34
- data/_includes/scripts/lib/toc.js +1 -1
- data/_includes/scripts/utils/imagesLoad.js +28 -0
- data/_includes/scripts/{utils.js → utils/utils.js} +8 -3
- data/_includes/scripts/variables.html +2 -1
- data/_includes/search.html +2 -4
- data/_layouts/base.html +4 -2
- data/_layouts/page.html +20 -7
- data/_sass/common/_reset.scss +5 -10
- data/_sass/common/_variables.scss +10 -10
- data/_sass/common/classes/_overflow.scss +22 -4
- data/_sass/common/components/_button.scss +20 -1
- data/_sass/common/components/_card.scss +1 -0
- data/_sass/common/components/_gallery.scss +21 -0
- data/_sass/common/components/_item.scss +1 -1
- data/_sass/common/components/_modal.scss +39 -0
- data/_sass/common/components/_swiper.scss +7 -4
- data/_sass/common/components/_toc.scss +47 -50
- data/_sass/components/_article-content.scss +1 -1
- data/_sass/components/_header.scss +1 -1
- data/_sass/components/_lightbox.scss +7 -0
- data/_sass/components/_search.scss +52 -26
- data/_sass/layout/_base.scss +0 -4
- data/_sass/layout/_page.scss +17 -54
- data/_sass/skins/_chocolate.scss +4 -1
- data/_sass/skins/_dark.scss +4 -1
- data/_sass/skins/_default.scss +4 -1
- data/_sass/skins/_forest.scss +4 -1
- data/_sass/skins/_ocean.scss +9 -6
- data/_sass/skins/_orange.scss +4 -1
- data/assets/css/main.scss +3 -0
- metadata +11 -4
- data/_includes/comments-providers/custom.html +0 -0
@@ -2,7 +2,6 @@
|
|
2
2
|
display: inline-block;
|
3
3
|
font-weight: map-get($button, font-weight);
|
4
4
|
line-height: 1 !important;
|
5
|
-
|
6
5
|
text-decoration: none !important;
|
7
6
|
cursor: pointer;
|
8
7
|
outline: none;
|
@@ -48,6 +47,14 @@
|
|
48
47
|
@include clickable($text-color-function, $red);
|
49
48
|
}
|
50
49
|
|
50
|
+
.button--theme-light {
|
51
|
+
@include clickable($text-color-theme-dark, $main-color-theme-light);
|
52
|
+
}
|
53
|
+
|
54
|
+
.button--theme-dark {
|
55
|
+
@include clickable($text-color-theme-light, $main-color-theme-dark);
|
56
|
+
}
|
57
|
+
|
51
58
|
.button--outline-primary {
|
52
59
|
color: $main-color-1;
|
53
60
|
border: 1px solid $main-color-1;
|
@@ -84,6 +91,18 @@
|
|
84
91
|
@include clickable($red, transparent, $text-color-function, $red);
|
85
92
|
}
|
86
93
|
|
94
|
+
.button--outline-theme-light {
|
95
|
+
color: $main-color-theme-light;
|
96
|
+
border: 1px solid $main-color-theme-light;
|
97
|
+
@include clickable($text-color-theme-dark, $main-color-theme-light);
|
98
|
+
}
|
99
|
+
|
100
|
+
.button--outline-theme-dark {
|
101
|
+
color: $main-color-theme-dark;
|
102
|
+
border: 1px solid $main-color-theme-dark;
|
103
|
+
@include clickable($text-color-theme-light, $main-color-theme-dark);
|
104
|
+
}
|
105
|
+
|
87
106
|
.button--pill {
|
88
107
|
border-radius: map-get($button, pill-radius);
|
89
108
|
@extend .button--md;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.gallery {
|
2
|
+
height: 100%;
|
3
|
+
@include flexbox();
|
4
|
+
@include flex-direction(column);
|
5
|
+
}
|
6
|
+
|
7
|
+
.gallery__swiper {
|
8
|
+
@include flex(1);
|
9
|
+
}
|
10
|
+
|
11
|
+
.gallery-item{
|
12
|
+
display: table;
|
13
|
+
width: 100%;
|
14
|
+
height: 100%;
|
15
|
+
}
|
16
|
+
|
17
|
+
.gallery-item__content {
|
18
|
+
display: table-cell;
|
19
|
+
text-align: center;
|
20
|
+
vertical-align: middle;
|
21
|
+
}
|
@@ -35,7 +35,7 @@ a.item__header, .item__header > a {
|
|
35
35
|
|
36
36
|
.item__description {
|
37
37
|
&, .article__content {
|
38
|
-
font-size: map-get($base, font-size-
|
38
|
+
font-size: map-get($base, font-size-sm);
|
39
39
|
line-height: map-get($base, line-height);
|
40
40
|
@include block-elements() {
|
41
41
|
margin-top: map-get($spacers, 2);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@mixin modal($z-index: default, $color: default, $background-color: default) {
|
2
|
+
@if $z-index == default {
|
3
|
+
$z-index: map-get($z-indexes, modal);
|
4
|
+
}
|
5
|
+
@if $color == default {
|
6
|
+
$color: $text-color-theme-dark;
|
7
|
+
}
|
8
|
+
@if $background-color == default {
|
9
|
+
$background-color: $mask-color;
|
10
|
+
}
|
11
|
+
position: fixed;
|
12
|
+
top: 0;
|
13
|
+
left: 0;
|
14
|
+
z-index: $z-index;
|
15
|
+
width: 100%;
|
16
|
+
height: 100%;
|
17
|
+
color: $color;
|
18
|
+
touch-action: none;
|
19
|
+
background-color: $background-color;
|
20
|
+
opacity: 0;
|
21
|
+
@include transform(translate(100%, 0));
|
22
|
+
@include transition(#{opacity map-get($animation, duration) map-get($animation, timing-function),
|
23
|
+
transform 0s map-get($animation, duration) map-get($animation, timing-function)});
|
24
|
+
}
|
25
|
+
@mixin modal--show() {
|
26
|
+
opacity: 1;
|
27
|
+
@include transform(translate(0, 0));
|
28
|
+
@include transition(#{opacity map-get($animation, duration) map-get($animation, timing-function)});
|
29
|
+
}
|
30
|
+
|
31
|
+
.modal {
|
32
|
+
@include modal();
|
33
|
+
}
|
34
|
+
.modal--show {
|
35
|
+
@include modal--show();
|
36
|
+
}
|
37
|
+
.modal--overflow {
|
38
|
+
@include overflow(auto);
|
39
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.swiper {
|
2
2
|
position: relative;
|
3
|
-
overflow
|
3
|
+
@include overflow(hidden);
|
4
4
|
}
|
5
5
|
|
6
6
|
.swiper__wrapper, .swiper__slide {
|
@@ -18,6 +18,9 @@
|
|
18
18
|
|
19
19
|
.swiper__slide {
|
20
20
|
@include flex-shrink(0);
|
21
|
+
& > img {
|
22
|
+
max-width: 100%;
|
23
|
+
}
|
21
24
|
}
|
22
25
|
|
23
26
|
.swiper__button {
|
@@ -25,15 +28,15 @@
|
|
25
28
|
top: 50%;
|
26
29
|
@extend .button, .button--circle;
|
27
30
|
@include transform(translate(0, -50%));
|
28
|
-
@include clickable($text-color-d, rgba($main-color-3, .
|
31
|
+
@include clickable($text-color-d, rgba($main-color-3, .4));
|
29
32
|
}
|
30
33
|
|
31
34
|
.swiper--light .swiper__button {
|
32
|
-
@include clickable($text-color-theme-light, rgba(
|
35
|
+
@include clickable($text-color-theme-light, rgba($main-color-theme-dark, .4));
|
33
36
|
}
|
34
37
|
|
35
38
|
.swiper--dark .swiper__button {
|
36
|
-
@include clickable($text-color-theme-dark, rgba(
|
39
|
+
@include clickable($text-color-theme-dark, rgba($main-color-theme-light, .4));
|
37
40
|
}
|
38
41
|
|
39
42
|
.swiper__button--prev {
|
@@ -6,60 +6,42 @@ ul.toc {
|
|
6
6
|
margin: map-get($spacers, 1) 0;
|
7
7
|
&.active {
|
8
8
|
a {
|
9
|
-
color: $
|
10
|
-
background-color: $main-color-3;
|
11
|
-
box-shadow: 0 0 0 2px rgba($main-color-3, .4);
|
9
|
+
color: $main-color-1;
|
12
10
|
}
|
13
11
|
}
|
14
12
|
}
|
15
13
|
|
16
14
|
a {
|
17
15
|
display: inline-block;
|
18
|
-
|
16
|
+
margin: map-get($spacers, 1) / 4 0;
|
19
17
|
text-decoration: none !important;
|
20
|
-
|
21
|
-
@include clickable($text-color, null, $text-color-3, $main-color-3);
|
18
|
+
@include link-colors($text-color, $main-color-1);
|
22
19
|
}
|
23
|
-
|
24
20
|
.toc-h1 {
|
25
|
-
@include split-line(bottom);
|
26
|
-
padding: map-get($spacers, 2) 0 map-get($spacers, 1) 0;
|
27
|
-
margin-bottom: map-get($spacers, 2);
|
28
21
|
a {
|
29
22
|
@include link-colors($text-color-d);
|
30
23
|
}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
font-weight: map-get($base, font-weight-bold);
|
36
|
-
}
|
37
|
-
}
|
38
|
-
.toc-h3,
|
39
|
-
.toc-h4,
|
40
|
-
.toc-h5,
|
41
|
-
.toc-h6 {
|
42
|
-
&, a {
|
43
|
-
font-weight: map-get($base, font-weight);
|
24
|
+
&.active {
|
25
|
+
a {
|
26
|
+
color: $main-color-1;
|
27
|
+
}
|
44
28
|
}
|
45
29
|
}
|
46
|
-
.toc-h5,
|
47
|
-
.toc-h6 {
|
30
|
+
.toc-h5, .toc-h6 {
|
48
31
|
a {
|
49
32
|
@include link-colors($text-color-l);
|
50
33
|
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
margin-left: map-get($spacers, 3) * 2;
|
57
|
-
}
|
58
|
-
.toc-h5, .toc-h6 {
|
59
|
-
margin-left: map-get($spacers, 3) * 3;
|
34
|
+
&.active {
|
35
|
+
a {
|
36
|
+
color: $main-color-1;
|
37
|
+
}
|
38
|
+
}
|
60
39
|
}
|
61
40
|
|
62
41
|
.toc-h1 {
|
42
|
+
@include split-line(bottom);
|
43
|
+
padding: map-get($spacers, 2) 0 map-get($spacers, 1) 0;
|
44
|
+
margin-bottom: map-get($spacers, 2);
|
63
45
|
&, a {
|
64
46
|
font-size: map-get($base, font-size);
|
65
47
|
line-height: map-get($base, line-height);
|
@@ -71,34 +53,58 @@ ul.toc {
|
|
71
53
|
line-height: map-get($base, line-height-sm);
|
72
54
|
}
|
73
55
|
}
|
56
|
+
.toc-h1,
|
57
|
+
.toc-h2 {
|
58
|
+
&, a {
|
59
|
+
font-weight: map-get($base, font-weight-bold);
|
60
|
+
}
|
61
|
+
}
|
74
62
|
.toc-h3,
|
75
63
|
.toc-h4,
|
76
64
|
.toc-h5,
|
77
65
|
.toc-h6 {
|
78
66
|
&, a {
|
79
67
|
font-size: map-get($base, font-size-xs);
|
68
|
+
font-weight: map-get($base, font-weight);
|
80
69
|
line-height: map-get($base, line-height-xs);
|
81
70
|
}
|
82
71
|
}
|
72
|
+
.toc-h3 {
|
73
|
+
margin-left: map-get($spacers, 3);
|
74
|
+
}
|
75
|
+
.toc-h4 {
|
76
|
+
margin-left: map-get($spacers, 3) * 2;
|
77
|
+
}
|
78
|
+
.toc-h5, .toc-h6 {
|
79
|
+
margin-left: map-get($spacers, 3) * 3;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
ul.toc--ellipsis {
|
84
|
+
& > li {
|
85
|
+
@include overflow(hidden);
|
86
|
+
text-overflow: ellipsis;
|
87
|
+
white-space: nowrap;
|
88
|
+
}
|
83
89
|
}
|
84
90
|
|
85
91
|
ul.toc--navigator {
|
86
92
|
& > li {
|
87
|
-
@include active() {
|
88
|
-
a {
|
89
|
-
background-color: transparent;
|
90
|
-
}
|
91
|
-
}
|
92
93
|
&.active {
|
93
94
|
a {
|
94
95
|
margin-left: -4px;
|
95
|
-
background-color: transparent;
|
96
|
-
box-shadow: none;
|
97
96
|
@include link-colors($main-color-1);
|
98
97
|
@include split-line(left, 4px, $main-color-1);
|
99
98
|
}
|
100
99
|
}
|
101
100
|
}
|
101
|
+
a {
|
102
|
+
padding-left: map-get($spacers, 2);
|
103
|
+
margin: map-get($spacers, 1) 0;
|
104
|
+
@include hover() {
|
105
|
+
background-color: transparent;
|
106
|
+
}
|
107
|
+
}
|
102
108
|
|
103
109
|
.toc-h2,
|
104
110
|
.toc-h3,
|
@@ -107,13 +113,4 @@ ul.toc--navigator {
|
|
107
113
|
@include link-colors($text-color-l);
|
108
114
|
}
|
109
115
|
}
|
110
|
-
|
111
|
-
a {
|
112
|
-
padding: 0 0 0 map-get($spacers, 2);
|
113
|
-
margin: map-get($spacers, 1) 0;
|
114
|
-
border-radius: 0;
|
115
|
-
@include hover() {
|
116
|
-
background-color: transparent;
|
117
|
-
}
|
118
|
-
}
|
119
116
|
}
|
@@ -1,7 +1,28 @@
|
|
1
|
+
.search {
|
2
|
+
@include overflow(auto);
|
3
|
+
}
|
4
|
+
|
5
|
+
.search__header {
|
6
|
+
margin-top: map-get($spacers, 4);
|
7
|
+
font-size: map-get($base, font-size-h1);
|
8
|
+
font-weight: map-get($base, font-weight-bold);
|
9
|
+
color: $text-color-d;
|
10
|
+
.search--light & {
|
11
|
+
color: $text-color-theme-light-d;
|
12
|
+
}
|
13
|
+
.search--dark & {
|
14
|
+
color: $text-color-theme-dark-d;
|
15
|
+
}
|
16
|
+
@include media-breakpoint-down(md) {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
1
21
|
.search-bar {
|
2
22
|
@include flexbox();
|
3
23
|
margin: map-get($spacers, 3) 0 map-get($spacers, 4) 0;
|
4
24
|
}
|
25
|
+
|
5
26
|
.search-box {
|
6
27
|
position: relative;
|
7
28
|
width: 100%;
|
@@ -22,15 +43,23 @@
|
|
22
43
|
border: 2px solid $border-color;
|
23
44
|
border-radius: map-get($button, pill-radius);
|
24
45
|
-webkit-appearance: none; /* fix iOS don't display box-shadow properly */
|
46
|
+
@include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
|
47
|
+
@include focus {
|
48
|
+
box-shadow: 0 0 0 2px rgba($border-color, .4);
|
49
|
+
}
|
25
50
|
.search--light & {
|
26
51
|
color: $text-color-theme-light;
|
52
|
+
border-color: $text-color-theme-light;
|
53
|
+
@include focus {
|
54
|
+
box-shadow: 0 0 0 2px rgba($text-color-theme-light, .4);
|
55
|
+
}
|
27
56
|
}
|
28
57
|
.search--dark & {
|
29
58
|
color: $text-color-theme-dark;
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
59
|
+
border-color: $text-color-theme-dark;
|
60
|
+
@include focus {
|
61
|
+
box-shadow: 0 0 0 2px rgba($text-color-theme-dark, .4);
|
62
|
+
}
|
34
63
|
}
|
35
64
|
}
|
36
65
|
& > .search-box__icon-search {
|
@@ -75,11 +104,19 @@
|
|
75
104
|
left: 0;
|
76
105
|
}
|
77
106
|
}
|
107
|
+
|
108
|
+
.search__cancel {
|
109
|
+
margin-left: map-get($spacers, 2);
|
110
|
+
font-weight: map-get($base, font-weight-bold);
|
111
|
+
white-space: nowrap;
|
112
|
+
}
|
113
|
+
|
78
114
|
.search-result {
|
79
115
|
margin: map-get($spacers, 4) 0;
|
80
116
|
font-size: map-get($base, font-size-sm);
|
81
117
|
line-height: map-get($base, line-height-sm);
|
82
118
|
}
|
119
|
+
|
83
120
|
.search-result__header {
|
84
121
|
margin: map-get($spacers, 3) 0 map-get($spacers, 2) 0;
|
85
122
|
font-size: map-get($base, font-size-lg);
|
@@ -93,6 +130,7 @@
|
|
93
130
|
color: $text-color-theme-dark-l;
|
94
131
|
}
|
95
132
|
}
|
133
|
+
|
96
134
|
.search-result__item {
|
97
135
|
list-style-type: none;
|
98
136
|
a {
|
@@ -100,10 +138,10 @@
|
|
100
138
|
@include transition(none);
|
101
139
|
@include clickable($text-color, transparent, $text-color-3, $main-color-3);
|
102
140
|
.search--light & {
|
103
|
-
@include clickable($text-color-theme-light, transparent, $text-color-
|
141
|
+
@include clickable($text-color-theme-light, transparent, $text-color-theme-dark, $main-color-theme-light);
|
104
142
|
}
|
105
143
|
.search--dark & {
|
106
|
-
@include clickable($text-color-theme-dark, transparent, $text-color-
|
144
|
+
@include clickable($text-color-theme-dark, transparent, $text-color-theme-light, $main-color-theme-dark);
|
107
145
|
}
|
108
146
|
}
|
109
147
|
&.active {
|
@@ -111,30 +149,18 @@
|
|
111
149
|
@include plain() {
|
112
150
|
color: $text-color-3;
|
113
151
|
background-color: $main-color-3;
|
152
|
+
.search--light & {
|
153
|
+
color: $text-color-theme-dark;
|
154
|
+
background-color: $main-color-theme-light;
|
155
|
+
}
|
156
|
+
.search--dark & {
|
157
|
+
color: $text-color-theme-light;
|
158
|
+
background-color: $main-color-theme-dark;
|
159
|
+
}
|
114
160
|
}
|
115
161
|
@include active() {
|
116
162
|
@include transition(map-get($link, transition));
|
117
163
|
}
|
118
164
|
}
|
119
165
|
}
|
120
|
-
}
|
121
|
-
.search__header {
|
122
|
-
margin-top: map-get($spacers, 4);
|
123
|
-
font-size: map-get($base, font-size-h1);
|
124
|
-
font-weight: map-get($base, font-weight-bold);
|
125
|
-
color: $text-color-d;
|
126
|
-
.search--light & {
|
127
|
-
color: $text-color-theme-light-d;
|
128
|
-
}
|
129
|
-
.search--dark & {
|
130
|
-
color: $text-color-theme-dark-d;
|
131
|
-
}
|
132
|
-
@include media-breakpoint-down(md) {
|
133
|
-
display: none;
|
134
|
-
}
|
135
|
-
}
|
136
|
-
.search__cancel {
|
137
|
-
margin-left: map-get($spacers, 2);
|
138
|
-
font-weight: map-get($base, font-weight-bold);
|
139
|
-
white-space: nowrap;
|
140
166
|
}
|