jekyll-theme-yat 1.1.0 → 1.4.0

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.
@@ -14,7 +14,10 @@ dl, dd, ol, ul, figure {
14
14
  * Basic styling
15
15
  */
16
16
  body {
17
- font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
17
+ font-family: $base-font-family;
18
+ font-weight: $base-font-weight;
19
+ font-size: #{$base-font-size};
20
+ line-height: #{$base-line-height};
18
21
  color: $text-color;
19
22
  background-color: $background-color;
20
23
  -webkit-text-size-adjust: 100%;
@@ -107,7 +110,7 @@ a {
107
110
  text-decoration: none;
108
111
 
109
112
  &:visited {
110
- color: darken($brand-color, 15%);
113
+ color: #606060;
111
114
  }
112
115
 
113
116
  &:hover {
@@ -149,22 +152,50 @@ blockquote {
149
152
  pre,
150
153
  code {
151
154
  @include relative-font-size(0.9375);
152
- border-radius: 3px;
153
- background-color: #3d3d3d;
155
+ color: $text-color;
154
156
  }
155
157
 
156
- code {
158
+ *:not(pre) > code {
157
159
  padding: 1px 5px;
160
+ border-radius: 3px;
161
+ color: #fff;
162
+ background-color: $brand-color;
158
163
  }
159
164
 
160
165
  pre {
161
- padding: 8px 12px;
162
166
  overflow-x: auto;
167
+ position: relative;
168
+ background-color: #f0f0f0;
169
+
170
+ // code language badge
171
+ &:before {
172
+ content: attr(data-lang);
173
+ color: #fff;
174
+ background-color: #ff4e00;
175
+ padding: 0 .5em;
176
+ border-radius: 0 2px;
177
+ text-transform: uppercase;
178
+ text-align: center;
179
+ min-width: 32px;
180
+ display: inline-block;
181
+ position: absolute;
182
+ right: 0;
183
+ }
163
184
 
164
185
  > code {
186
+ display: inline-block;
187
+ padding: 20px!important;
188
+ background-color: transparent;
165
189
  border: 0;
166
- padding-right: 0;
167
- padding-left: 0;
190
+ }
191
+
192
+ table, pre {
193
+ margin-bottom: 0;
194
+
195
+ .gutter, .code {
196
+ padding: 6px;
197
+ border: none;
198
+ }
168
199
  }
169
200
  }
170
201
 
@@ -179,11 +210,6 @@ pre {
179
210
  padding-right: $spacing-unit;
180
211
  padding-left: $spacing-unit;
181
212
  @extend %clearfix;
182
-
183
- @include media-query($on-laptop) {
184
- padding-right: $spacing-unit / 2;
185
- padding-left: $spacing-unit / 2;
186
- }
187
213
  }
188
214
 
189
215
 
@@ -205,22 +231,25 @@ table {
205
231
  margin-bottom: $spacing-unit;
206
232
  width: 100%;
207
233
  text-align: $table-text-align;
208
- color: lighten($text-color, 18%);
234
+ color: lighten($text-color, 5%);
209
235
  border-collapse: collapse;
210
- border: 1px solid $grey-color-light;
236
+
211
237
  tr {
212
238
  &:nth-child(even) {
213
239
  background-color: lighten($grey-color-light, 6%);
214
240
  }
215
241
  }
242
+
216
243
  th, td {
217
244
  padding: ($spacing-unit / 3) ($spacing-unit / 2);
218
245
  }
246
+
219
247
  th {
220
248
  background-color: lighten($grey-color-light, 3%);
221
249
  border: 1px solid darken($grey-color-light, 4%);
222
250
  border-bottom-color: darken($grey-color-light, 12%);
223
251
  }
252
+
224
253
  td {
225
254
  border: 1px solid $grey-color-light;
226
255
  }
@@ -229,7 +258,7 @@ table {
229
258
  /**
230
259
  * Flex layout
231
260
  */
232
- %flex-layout {
261
+ %flex {
233
262
  display: flex;
234
263
  }
235
264
 
@@ -243,6 +272,10 @@ table {
243
272
  */
244
273
  @mixin flex-sticky($top) {
245
274
  position: sticky;
275
+ position: -moz-sticky; /* <-- fix sticky compatibility issue */
276
+ position: -ms-sticky;
277
+ position: -o-sticky;
278
+ position: -webkit-sticky;
246
279
  align-self: flex-start; /* <-- fix the sticky not work issue */
247
280
  transform: scale(0.9999); /* <-- fix the sticky x overflow issue */
248
281
  top: $top;
@@ -1,40 +1,109 @@
1
+ /**
2
+ * Animation for transparent header
3
+ */
4
+ html {
5
+ &[data-header-transparent] {
6
+ header.site-header {
7
+ position: fixed;
8
+ }
9
+ }
10
+
11
+ &[data-scroll-status='top'] {
12
+ header.site-header-transparent {
13
+ height: 0;
14
+ margin-top: 20px;
15
+ background-color: transparent;
16
+ transition: 0.1s height,background-color,box-shadow;
17
+
18
+ &.site-header {
19
+ .site-brand-inner, .page-link {
20
+ color: #fff;
21
+ transition: 0.1s color;
22
+ }
23
+
24
+ @include media-query($on-laptop) {
25
+ .page-link {
26
+ color: unset;
27
+ }
28
+
29
+ .menu-icon {
30
+ > svg {
31
+ fill: $white-color;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+ footer.site-footer {
39
+ background-color: transparent;
40
+
41
+ .site-footer-inner {
42
+ border-top: solid 1px #eee;
43
+ }
44
+ }
45
+ }
46
+
47
+ &[data-scroll-status='down'] {
48
+ header.site-header {
49
+ top: -$header-height;
50
+ }
51
+
52
+ .framework .sidebar {
53
+ top: 20px;
54
+ }
55
+ }
56
+ }
57
+
1
58
  /**
2
59
  * Site header
3
60
  */
4
61
  .site-header {
5
- background: $header-background-color;
62
+ background-color: $header-background-color;
6
63
  height: $header-height;
7
64
  width: 100%;
65
+ transition: height 0.2s, text-shadow 0.2s, top 0.2s;
66
+ box-shadow: 0 1px 0 0 rgba(0, 0, 0, .06);
8
67
 
9
68
  // Positioning context for the mobile navigation icon
10
69
  @include flex-sticky(0);
11
70
  z-index: 1000;
12
71
 
72
+ & > .wrapper {
73
+ margin: 0 60px;
74
+ padding: 0;
75
+ max-width: 100%;
76
+ transition: 0.2s margin;
77
+
78
+ @include media-query(1024px) {
79
+ margin: 0 20px;
80
+ max-width: unset;
81
+ }
82
+ }
83
+
13
84
  a {
14
85
  text-decoration: none;
15
86
  }
87
+
88
+ .site-header-inner {
89
+ position: relative;
90
+ }
16
91
  }
17
92
 
18
93
  .site-brand {
19
- @include vertical-center(absolute);
94
+ line-height: $header-height;
20
95
  margin-right: 50px;
21
96
 
22
97
  .site-brand-inner {
23
98
  @include relative-font-size(1.125);
24
99
  font-weight: $base-font-weight;
25
- filter: drop-shadow(0 0 2px #08080880);
26
- text-shadow: 0 0 2px #080808d0;
27
100
  letter-spacing: -1px;
28
- transition: drop-shadow 0.2s;
101
+ transition: 0.1s filter color;
29
102
 
30
103
  &, &:visited {
31
104
  color: $header-text-color;
32
105
  }
33
106
 
34
- &:hover {
35
- filter: drop-shadow(0 0 3px #080808a0);
36
- }
37
-
38
107
  .site-favicon {
39
108
  display: inline-block;
40
109
  height: $header-height / 1.5;
@@ -44,9 +113,11 @@
44
113
  }
45
114
 
46
115
  .site-nav {
47
- @include relative-font-size(1.025);
48
- float: right;
116
+ @include relative-font-size(1.125);
49
117
  line-height: $header-height;
118
+ position: absolute;
119
+ right: 0;
120
+ top: 0;
50
121
 
51
122
  .nav-trigger {
52
123
  display: none;
@@ -57,23 +128,26 @@
57
128
  }
58
129
 
59
130
  .page-link {
60
- color: $header-text-color;
61
131
  line-height: $base-line-height;
132
+ color: $header-text-color;
133
+ transition: 0.1s ease-in-out;
62
134
 
63
135
  // Gaps between nav items, but not on the last one
64
136
  &:not(:last-child) {
65
- margin-right: 20px;
137
+ margin-right: 24px;
138
+ &:hover {
139
+ text-decoration: underline;
140
+ }
66
141
  }
67
142
  }
68
143
 
69
- @include media-query($on-palm) {
144
+ @include media-query($on-laptop) {
70
145
  position: absolute;
71
- right: $spacing-unit / 2;
146
+ top: 0;
72
147
  text-align: left;
73
148
 
74
149
  label[for="nav-trigger"] {
75
150
  display: block;
76
- float: right;
77
151
  z-index: 2;
78
152
  cursor: pointer;
79
153
  }
@@ -84,13 +158,16 @@
84
158
  text-align: center;
85
159
 
86
160
  > svg {
87
- fill: $white-color;
161
+ fill: rgba($header-text-color, 80%);
162
+ transition: 0.1s fill;
88
163
  }
89
164
  }
90
165
 
91
166
  input ~ .trigger {
92
167
  clear: both;
93
168
  display: none;
169
+ border-radius: 3px;
170
+ box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, .06);
94
171
  }
95
172
 
96
173
  input:checked ~ .trigger {
@@ -111,14 +188,19 @@
111
188
  * Site footer
112
189
  */
113
190
  .site-footer {
114
- @include relative-font-size(0.9);
191
+ @include relative-font-size(1.0);
115
192
  color: $footer-text-color;
116
- background: $footer-background-color;
117
- padding: $spacing-unit * 0.8 0;
193
+ background-color: $footer-background-color;
118
194
  text-align: left;
195
+ transition: background-color 0.2s;
196
+
197
+ .site-footer-inner {
198
+ transition: border-top 0.2s;
199
+ padding: $spacing-unit * 1.8 0;
200
+ }
119
201
 
120
202
  a {
121
- $a-color: invert(mix(invert($theme-color), #0030ae));
203
+ $a-color: $brand-color;
122
204
  color: $a-color;
123
205
 
124
206
  &:hover {
@@ -144,6 +226,15 @@
144
226
  @include relative-font-size(2.25);
145
227
  }
146
228
  }
229
+
230
+ .post-tags {
231
+ display: inline-block;
232
+ padding-right: 150px;
233
+
234
+ .post-tag {
235
+ margin: 0 12px 0 0;
236
+ }
237
+ }
147
238
  }
148
239
 
149
240
  /**
@@ -151,7 +242,8 @@
151
242
  */
152
243
  .page-content {
153
244
  @extend %flex-1; /* <-- Keep footer on the bottom */
154
- padding: $spacing-unit * 1.5 0;
245
+ -ms-flex: none; /* <-- Fix IE footer issue */
246
+ padding: $spacing-unit * 2 0;
155
247
  }
156
248
 
157
249
  .page-heading {
@@ -171,20 +263,104 @@
171
263
  list-style: none;
172
264
 
173
265
  > li {
174
- margin-bottom: $spacing-unit;
266
+ margin-bottom: $spacing-unit * 1.5;
267
+ padding-bottom: 30px;
268
+
269
+ &:not(:last-child) {
270
+ border-bottom: 1px solid #e3e3e3;
271
+ }
272
+ }
273
+ }
274
+
275
+ .post-title {
276
+ margin-bottom: 2px;
277
+ transition: 0.2s all;
278
+
279
+ a {
280
+ text-decoration: none;
281
+
282
+ &:after {
283
+ content: 'NEW';
284
+ position: absolute;
285
+ margin-left: 8px;
286
+ margin-top: 3px;
287
+ padding: 0px 3px;
288
+ background-color: $brand-color;
289
+ color: #fff;
290
+ font-size: 10px;
291
+ font-weight: 600;
292
+ border-radius: 2px;
293
+ }
294
+
295
+ &:visited:after {
296
+ background-color: #fff;
297
+ }
175
298
  }
176
299
  }
177
300
 
178
301
  .post-meta {
179
- font-size: $small-font-size;
302
+ font-size: $base-font-size;
180
303
  color: $grey-color;
304
+ margin-bottom: $spacing-unit * 0.5;
181
305
  }
182
306
 
183
307
  .post-link {
184
308
  @include relative-font-size(1.5);
309
+ font-weight: $base-font-weight * 1.5;
310
+ color: #15171a;
311
+ }
312
+
313
+ .post-excerpt {
314
+ color: #777;
315
+ }
316
+
317
+ .post-tags .post-tag {
318
+ text-decoration: none;
319
+ border: 1px solid;
320
+ padding: 2px 4px;
321
+ border-radius: 2px;
322
+
323
+ &:not(:first-child) {
324
+ margin-left: 8px;
325
+ }
326
+ }
327
+
328
+ .paginator {
329
+ text-align: center;
330
+
331
+ & > .previous:before {
332
+ content: ' ';
333
+ border: solid #787878;
334
+ border-width: 0 2px 2px 0;
335
+ display: inline-block;
336
+ padding: 4px;
337
+ margin-right: 8px;
338
+ transform: rotate(135deg);
339
+ -webkit-transform: rotate(135deg);
340
+ }
341
+
342
+ & > .next:after {
343
+ content: ' ';
344
+ border: solid #787878;
345
+ border-width: 0 2px 2px 0;
346
+ display: inline-block;
347
+ padding: 4px;
348
+ margin-left: 8px;
349
+ transform: rotate(-45deg);
350
+ -webkit-transform: rotate(-45deg);
351
+ }
352
+
353
+ .previous span, .next span {
354
+ color: #b3b3b3;
355
+ }
356
+
357
+ a:hover {
358
+ color: #000;
359
+ }
185
360
 
186
- display: block;
187
- font-weight: 600;
361
+ .indicator {
362
+ padding: 0 15px;
363
+ }
188
364
  }
189
365
  }
190
366
 
@@ -195,6 +371,20 @@
195
371
  .post {
196
372
  @extend %post-header;
197
373
 
374
+ .post-header {
375
+ margin: 50px auto 60px;
376
+ padding: 0 0 20px;
377
+ border-bottom: 1px solid #ebebeb;
378
+
379
+ .post-title {
380
+ margin-bottom: 2px;
381
+ }
382
+
383
+ .post-meta {
384
+ color: #808080;
385
+ }
386
+ }
387
+
198
388
  .post-content {
199
389
  margin-bottom: $spacing-unit;
200
390
 
@@ -221,6 +411,66 @@
221
411
  @include relative-font-size(1.125);
222
412
  }
223
413
  }
414
+
415
+ img, iframe {
416
+ margin-left: auto;
417
+ margin-right: auto;
418
+ display: block;
419
+ }
420
+
421
+ h2, h3, h4, h5, h6 {
422
+ margin: 60px 0 19px;
423
+ }
424
+
425
+ p, hr {
426
+ margin-bottom: 24px;
427
+ }
428
+
429
+ hr {
430
+ height: 1px;
431
+ background-color: #ebebeb;
432
+ border: none;
433
+ }
434
+ }
435
+
436
+ .post-related {
437
+ &>*:first-child {
438
+ @include relative-font-size(1.425);
439
+ color: #333;
440
+ margin-bottom: 14px;
441
+ }
442
+
443
+ ul {
444
+ margin-left: 15px;
445
+ .post-link {
446
+ @include relative-font-size(1.075);
447
+ }
448
+
449
+ a {
450
+ color: #666;
451
+
452
+ &:hover {
453
+ color: #333;
454
+ }
455
+
456
+ &:after {
457
+ content: 'NEW';
458
+ position: absolute;
459
+ margin-left: 8px;
460
+ margin-top: 3px;
461
+ padding: 0px 3px;
462
+ background-color: $brand-color;
463
+ color: #fff;
464
+ font-size: 10px;
465
+ font-weight: 600;
466
+ border-radius: 2px;
467
+ }
468
+
469
+ &:visited:after {
470
+ background-color: #fff;
471
+ }
472
+ }
473
+ }
224
474
  }
225
475
  }
226
476
 
@@ -231,9 +481,35 @@
231
481
  .post-nav {
232
482
  display: flex;
233
483
  justify-content: space-between;
484
+ margin: 72px 0 59px;
485
+ padding: 31px 0 0;
234
486
 
235
487
  a {
236
- display: flex;
488
+ @include relative-font-size(1.125);
489
+ line-height: 15px;
490
+ color: #666;
491
+ }
492
+
493
+ .previous:before {
494
+ content: ' ';
495
+ border: solid #787878;
496
+ border-width: 0 2px 2px 0;
497
+ display: inline-block;
498
+ padding: 4px;
499
+ margin-right: 8px;
500
+ transform: rotate(135deg);
501
+ -webkit-transform: rotate(135deg);
502
+ }
503
+
504
+ .next:after {
505
+ content: ' ';
506
+ border: solid #787878;
507
+ border-width: 0 2px 2px 0;
508
+ display: inline-block;
509
+ padding: 4px;
510
+ margin-left: 8px;
511
+ transform: rotate(-45deg);
512
+ -webkit-transform: rotate(-45deg);
237
513
  }
238
514
  }
239
515
 
@@ -271,6 +547,8 @@
271
547
  position: relative;
272
548
  height: $banner-height;
273
549
  background-color: $banner-background;
550
+ transition: height 0.2s;
551
+ margin-bottom: 32px;
274
552
 
275
553
  .page-banner-img {
276
554
  position: absolute;
@@ -292,25 +570,69 @@
292
570
 
293
571
  color: $banner-text-color;
294
572
  padding: 10px 5px;
295
- text-shadow: 1px 1px 2px #333;
573
+ text-shadow: 1px 1px 2px #33333355;
296
574
 
297
- .page-banner-heading {
298
- @include relative-font-size(2.825);
299
- letter-spacing: -1px;
300
- line-height: 1;
301
- margin-bottom: 10px;
575
+ & > *:first-child {
576
+ margin: 0;
577
+
578
+ > :nth-child(1) {
579
+ @include relative-font-size(3.9);
580
+ letter-spacing: -1px;
581
+ line-height: 0.95;
582
+ margin-bottom: 18px;
583
+ font-weight: normal;
584
+ transition: 0.2s all;
585
+
586
+ @include media-query($on-palm) {
587
+ @include relative-font-size(2.425);
588
+ }
589
+ }
302
590
 
303
- @include media-query($on-palm) {
304
- @include relative-font-size(2.425);
591
+ > :nth-child(2) {
592
+ font-weight: normal;
593
+ margin-bottom: 0;
594
+ }
595
+
596
+ > :last-child {
597
+ margin-bottom: 0;
305
598
  }
306
599
  }
307
600
 
308
- @extend %post-header;
601
+ .post-subtitle {
602
+ @include relative-font-size(1.525);
603
+ color: #ffffffcc;
604
+ padding-right: 280px;
605
+ }
309
606
 
310
- .post-title {
311
- @include relative-font-size(2.925);
607
+ .post-meta {
608
+ color: #ffffffcc;
609
+ }
610
+
611
+ .left-vsplit:before {
612
+ background: #e3e3e388;
613
+ }
614
+
615
+ .post-tags {
616
+ color: #999;
617
+ padding-right: 280px;
618
+
619
+ .post-tag {
620
+ @include relative-font-size(1.125);
621
+ display: inline-block;
622
+ text-decoration: none;
623
+ margin: 9px 12px 0 0;
624
+ color: #fff;
625
+
626
+ &:hover {
627
+ text-decoration: underline;
628
+ }
629
+ }
312
630
  }
313
631
  }
632
+
633
+ @include media-query($on-palm) {
634
+ height: $banner-height / 1.5;
635
+ }
314
636
  }
315
637
 
316
638
 
@@ -318,7 +640,7 @@
318
640
  * Layout and sidebar
319
641
  */
320
642
  .framework {
321
- @extend %flex-layout;
643
+ @extend %flex;
322
644
 
323
645
  .main {
324
646
  @extend %flex-1;
@@ -326,10 +648,11 @@
326
648
 
327
649
  .sidebar {
328
650
  padding-left: 8px;
651
+ transition: top 0.2s, display 0.2s;
329
652
 
330
653
  @include flex-sticky($header-height + 20px);
331
654
 
332
- @include media-query($on-palm) {
655
+ @include media-query($on-laptop) {
333
656
  display: none;
334
657
  }
335
658
 
@@ -347,7 +670,7 @@
347
670
  }
348
671
 
349
672
  .segment-name {
350
- font-weight: 600;
673
+ font-weight: $base-font-weight * 1.5;
351
674
  margin-bottom: 8px;
352
675
  position: relative;
353
676
 
@@ -357,7 +680,6 @@
357
680
  margin-top: 28px;
358
681
  }
359
682
 
360
-
361
683
  &:hover:before {
362
684
  content: '#';
363
685
  left: -1em;
@@ -370,5 +692,42 @@
370
692
  color: $grey-color;
371
693
  }
372
694
 
695
+ li a {
696
+ &.post-link {
697
+ margin-left: 5px;
698
+ }
699
+
700
+ color: #303030;
701
+
702
+ &:hover {
703
+ color: #000;
704
+ }
705
+
706
+ &:after {
707
+ content: 'NEW';
708
+ position: absolute;
709
+ margin-left: 8px;
710
+ margin-top: 3px;
711
+ padding: 0px 3px;
712
+ background-color: $brand-color;
713
+ color: #fff;
714
+ font-size: 10px;
715
+ font-weight: 600;
716
+ border-radius: 2px;
717
+ }
718
+
719
+ &:visited:after {
720
+ background-color: #fff;
721
+ }
722
+ }
373
723
  }
374
724
 
725
+ .left-vsplit:before {
726
+ content: "";
727
+ display: inline-block;
728
+ width: 1px;
729
+ height: 10px;
730
+ margin: 0 10px;
731
+ background-color: #e3e3e3e3;
732
+ vertical-align: baseline;
733
+ }