jekyll-text-theme 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +171 -0
  3. data/README.md +5 -4
  4. data/_data/variables.yml +22 -8
  5. data/_includes/article-footer/author-profile.html +29 -27
  6. data/_includes/article-footer/license.html +4 -13
  7. data/_includes/article-header.html +47 -0
  8. data/_includes/article-info.html +79 -50
  9. data/_includes/article-list.html +82 -15
  10. data/_includes/article-section-navigator.html +2 -2
  11. data/_includes/author-links.html +1 -2
  12. data/_includes/footer.html +3 -1
  13. data/_includes/head.html +2 -2
  14. data/_includes/header.html +38 -32
  15. data/_includes/markdown-enhancements.html +6 -9
  16. data/_includes/markdown-enhancements/mathjax.html +2 -2
  17. data/_includes/scripts/article.js +1 -1
  18. data/_includes/scripts/lib/affix.js +2 -2
  19. data/_includes/scripts/lib/toc.js +1 -1
  20. data/_includes/scripts/variables.html +1 -0
  21. data/_includes/snippets/{page-title.html → get-article-title.html} +2 -2
  22. data/_layouts/archive.html +1 -1
  23. data/_layouts/article.html +17 -4
  24. data/_layouts/articles.html +89 -0
  25. data/_layouts/home.html +8 -2
  26. data/_layouts/landing.html +77 -101
  27. data/_layouts/page.html +158 -74
  28. data/_sass/additional/_alert.scss +8 -4
  29. data/_sass/additional/_tag.scss +21 -0
  30. data/_sass/common/_classes.scss +1 -0
  31. data/_sass/common/_variables.scss +26 -2
  32. data/_sass/common/classes/_grid.scss +112 -29
  33. data/_sass/common/classes/_spacing.scss +53 -42
  34. data/_sass/common/classes/_text.scss +37 -0
  35. data/_sass/common/components/_button.scss +9 -0
  36. data/_sass/common/components/_card.scss +93 -9
  37. data/_sass/common/components/_hero.scss +79 -0
  38. data/_sass/common/components/_image.scss +19 -0
  39. data/_sass/common/components/_item.scss +13 -9
  40. data/_sass/components/_article-header.scss +47 -0
  41. data/_sass/components/_article-info.scss +1 -1
  42. data/_sass/components/_article-list.scss +8 -0
  43. data/_sass/components/_author-links.scss +1 -1
  44. data/_sass/components/_author-profile.scss +10 -28
  45. data/_sass/components/_footer.scss +7 -11
  46. data/_sass/components/_header.scss +30 -19
  47. data/_sass/components/_main.scss +1 -0
  48. data/_sass/layout/_archive.scss +0 -6
  49. data/_sass/layout/_articles.scss +13 -0
  50. data/_sass/layout/_landing.scss +2 -99
  51. data/_sass/layout/_page.scss +26 -30
  52. data/assets/css/main.scss +12 -6
  53. metadata +17 -6
@@ -142,4 +142,13 @@
142
142
  width: map-get($button, circle-diameter-lg);
143
143
  height: map-get($button, circle-diameter-lg);
144
144
  }
145
+ }
146
+
147
+ .button--xl {
148
+ padding: map-get($button, padding-y-xl) map-get($button, padding-x-xl);
149
+ font-size: map-get($base, font-size-xl);
150
+ &.button--circle {
151
+ width: map-get($button, circle-diameter-xl);
152
+ height: map-get($button, circle-diameter-xl);
153
+ }
145
154
  }
@@ -1,18 +1,102 @@
1
- @mixin card($has-shadow: default) {
2
- @if $has-shadow == default {
3
- $has-shadow: true;
1
+
2
+ .card {
3
+ max-width: 18rem;
4
+ border-radius: map-get($base, border-radius);
5
+ @include box-shadow();
6
+ @include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
7
+ & > :first-child {
8
+ border-top-left-radius: map-get($base, border-radius);
9
+ border-top-right-radius: map-get($base, border-radius);
10
+ }
11
+ & > :last-child {
12
+ border-bottom-right-radius: map-get($base, border-radius);
13
+ border-bottom-left-radius: map-get($base, border-radius);
14
+ }
15
+ }
16
+
17
+ .cell {
18
+ & > .card {
19
+ max-width: unset;
4
20
  }
21
+ }
22
+
23
+ .card__content {
5
24
  padding: .5rem 1rem;
6
- border-radius: map-get($base, border-radius);
7
- @if $has-shadow {
8
- @include box-shadow();
25
+ }
26
+
27
+ a.card__header, .card__header > a {
28
+ @include link-colors($text-color-d, $main-color-1);
29
+ }
30
+
31
+ .card__image {
32
+ position: relative;
33
+ width: 100%;
34
+ & > img {
35
+ display: block;
36
+ width: 100%;
37
+ height: auto;
38
+ border-radius: inherit;
39
+ }
40
+ & > .overlay {
41
+ position: absolute;
42
+ width: 100%;
43
+ max-height: 100%;
44
+ padding: .5rem;
45
+ a {
46
+ text-decoration: none !important;
47
+ }
48
+ }
49
+ & > .overlay, & > .overlay--top {
50
+ top: 0;
51
+ bottom: auto;
52
+ border-top-left-radius: inherit;
53
+ border-top-right-radius: inherit;
54
+ border-bottom-right-radius: 0;
55
+ border-bottom-left-radius: 0;
56
+ }
57
+ & > .overlay--bottom {
58
+ top: auto;
59
+ bottom: 0;
60
+ border-top-left-radius: 0;
61
+ border-top-right-radius: 0;
62
+ border-bottom-right-radius: inherit;
63
+ border-bottom-left-radius: inherit;
64
+ }
65
+ & > .overlay--full {
66
+ top: 0;
67
+ bottom: 0;
68
+ }
69
+ & > .overlay, & > .overlay--dark {
70
+ @extend .text--dark;
71
+ background-color: rgba(#000, .4);
72
+ }
73
+ & > .overlay--light {
74
+ @extend .text--light;
75
+ background: rgba(#fff, .4);
9
76
  }
10
77
  }
11
78
 
12
- .card {
13
- @include card();
79
+ .card--clickable {
80
+ cursor: pointer;
81
+ @include hover() {
82
+ @include box-shadow(2);
83
+ .card__image {
84
+ & > img {
85
+ height: inherit;
86
+ }
87
+ }
88
+ }
14
89
  }
15
90
 
16
- .card--no-shadow {
91
+ .card--flat {
17
92
  @include box-shadow(0);
93
+ .card__image {
94
+ & > img {
95
+ border-radius: map-get($base, border-radius);
96
+ }
97
+ }
98
+ .card__content {
99
+ padding-top: 0;
100
+ padding-left: 0;
101
+ }
18
102
  }
@@ -0,0 +1,79 @@
1
+ .hero {
2
+ padding: map-get($spacers, 5);
3
+ background-position: 50% 50%;
4
+ @include media-breakpoint-down(lg) {
5
+ padding: map-get($spacers, 5) map-get($spacers, 3);
6
+ }
7
+ @include media-breakpoint-down(md) {
8
+ padding: map-get($spacers, 4) map-get($spacers, 3);
9
+ }
10
+ @include flexbox();
11
+ @include align-items(center);
12
+ h1 { font-size: map-get($base, font-size-h1-xl); }
13
+ h2 { font-size: map-get($base, font-size-h2-xl); }
14
+ h3 { font-size: map-get($base, font-size-h3-xl); }
15
+ h4 { font-size: map-get($base, font-size-h4-xl); }
16
+ h5 { font-size: map-get($base, font-size-h5-xl); }
17
+ h6 { font-size: map-get($base, font-size-h6-xl); }
18
+ p { font-size: map-get($base, font-size-xl); }
19
+ @include media-breakpoint-down(lg) {
20
+ h1 { font-size: map-get($base, font-size-h1-lg); }
21
+ h2 { font-size: map-get($base, font-size-h2-lg); }
22
+ h3 { font-size: map-get($base, font-size-h3-lg); }
23
+ h4 { font-size: map-get($base, font-size-h4-lg); }
24
+ h5 { font-size: map-get($base, font-size-h5-lg); }
25
+ h6 { font-size: map-get($base, font-size-h6-lg); }
26
+ p { font-size: map-get($base, font-size-lg); }
27
+ }
28
+ @include media-breakpoint-down(md) {
29
+ h1 { font-size: map-get($base, font-size-h1-sm); }
30
+ h2 { font-size: map-get($base, font-size-h2-sm); }
31
+ h3 { font-size: map-get($base, font-size-h3-sm); }
32
+ h4 { font-size: map-get($base, font-size-h4-sm); }
33
+ h5 { font-size: map-get($base, font-size-h5-sm); }
34
+ h6 { font-size: map-get($base, font-size-h6-sm); }
35
+ p { font-size: map-get($base, font-size); }
36
+ }
37
+
38
+ img {
39
+ display: block;
40
+ width: 100%;
41
+ margin: 0 auto;
42
+ }
43
+ background-size: cover;
44
+
45
+ }
46
+
47
+ .hero--center {
48
+ text-align: center;
49
+ .menu {
50
+ @extend .menu--center;
51
+ }
52
+ }
53
+
54
+ .hero--light {
55
+ @extend .text--light;
56
+ }
57
+
58
+ .hero--dark {
59
+ @extend .text--dark;
60
+ }
61
+
62
+ .hero__content {
63
+ width: 100%;
64
+ }
65
+ .hero__cover {
66
+ max-width: 800px;
67
+ }
68
+
69
+ .heros {
70
+ .hero {
71
+ margin: map-get($spacers, 5);
72
+ @include media-breakpoint-down(lg) {
73
+ margin: map-get($spacers, 3);
74
+ }
75
+ @include media-breakpoint-down(md) {
76
+ margin: map-get($spacers, 2) 0;
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,19 @@
1
+ .image {
2
+ max-width: 100%;
3
+ @extend .image--md;
4
+ }
5
+ .image--md {
6
+ width: map-get($image, width);
7
+ }
8
+ .image--xl {
9
+ width: map-get($image, width-xl);
10
+ }
11
+ .image--lg {
12
+ width: map-get($image, width-lg);
13
+ }
14
+ .image--sm {
15
+ width: map-get($image, width-sm);
16
+ }
17
+ .image--xs {
18
+ width: map-get($image, width-xs);
19
+ }
@@ -1,7 +1,7 @@
1
1
  .item {
2
2
  @include flexbox();
3
3
  @include media-breakpoint-down(md) {
4
- @include flex-direction(row);
4
+ @include flex-direction(column);
5
5
  }
6
6
  &:not(:last-child) {
7
7
  margin-bottom: map-get($base, vertical-space);
@@ -14,20 +14,24 @@
14
14
  @include media-breakpoint-down(md) {
15
15
  margin-right: 0;
16
16
  }
17
+ @include media-breakpoint-up(md) {
18
+ & + .item__content {
19
+ & > :first-child {
20
+ margin-top: 0;
21
+ & > :first-child {
22
+ margin-top: 0;
23
+ }
24
+ }
25
+ }
26
+ }
17
27
  }
18
28
 
19
29
  .item__content {
20
30
  @include flex(1);
21
- max-width: 100%;
31
+ min-width: 0;
22
32
  }
23
33
 
24
- .item__header {
25
- margin: 0 0 map-get($base, vertical-space) * 1.6 0;
26
- & > a {
27
- @include link-colors($text-color-d, $main-color-1);
28
- }
29
- }
30
- a.item__header {
34
+ a.item__header, .item__header > a {
31
35
  @include link-colors($text-color-d, $main-color-1);
32
36
  }
33
37
 
@@ -0,0 +1,47 @@
1
+ .article__header {
2
+ margin-top: map-get($spacers, 5);
3
+ margin-bottom: map-get($base, vertical-space-lg);
4
+ @include media-breakpoint-down(md) {
5
+ margin-top: map-get($spacers, 4);
6
+ }
7
+ header, h1 {
8
+ display: inline;
9
+ }
10
+ .split-space {
11
+ @include user-select(none);
12
+ }
13
+ .edit-on-github {
14
+ text-decoration: none !important;
15
+ }
16
+ }
17
+
18
+ .article__header--overlay {
19
+ .overlay {
20
+ min-height: 36rem;
21
+ padding-top: map-get($spacers, 5) * 2;
22
+ padding-bottom: map-get($spacers, 5) * 2;
23
+ @include media-breakpoint-down(md) {
24
+ min-height: 29rem;
25
+ padding-top: map-get($spacers, 5);
26
+ padding-bottom: map-get($spacers, 5);
27
+ }
28
+ }
29
+ .overlay__excerpt {
30
+ font-size: map-get($base, font-size-h3-xl);
31
+ @include media-breakpoint-down(lg) {
32
+ font-size: map-get($base, font-size-h3-lg);
33
+ }
34
+ @include media-breakpoint-down(md) {
35
+ font-size: map-get($base, font-size-h3-sm);
36
+ }
37
+ font-weight: map-get($base, font-weight-bold);
38
+ }
39
+
40
+ .article__header {
41
+ margin-top: 0;
42
+ }
43
+ }
44
+
45
+ .article__header--cover {
46
+ width: 100%;
47
+ }
@@ -1,5 +1,6 @@
1
1
  .article__info {
2
2
  font-size: map-get($base, font-size-sm);
3
+ color: $text-color-l;
3
4
  .left-col {
4
5
  float: left;
5
6
  @include media-breakpoint-down(md) {
@@ -9,7 +10,6 @@
9
10
  .right-col {
10
11
  float: right;
11
12
  margin-left: map-get($button, padding-x-sm);
12
- color: $text-color-l;
13
13
  @include media-breakpoint-down(md) {
14
14
  float: none;
15
15
  }
@@ -1,3 +1,11 @@
1
+ .article-list {
2
+ .item__meta {
3
+ padding: 0 1rem 0 0;
4
+ font-family: map-get($base, font-family-code);
5
+ font-size: map-get($base, font-size-sm);
6
+ white-space: nowrap;
7
+ }
8
+ }
1
9
  .article-list__group-header {
2
10
  margin-top: map-get($base, vertical-space) * 2;
3
11
  }
@@ -25,7 +25,7 @@
25
25
  }
26
26
  .douban-button {
27
27
  @include clickable($text-color-1, $douban-color);
28
- }
28
+ }
29
29
  .npm-button {
30
30
  @include clickable($text-color-1, $npm-color);
31
31
  }
@@ -1,5 +1,6 @@
1
1
  .author-profile {
2
2
  max-width: 25rem;
3
+ padding: .5rem 1rem;
3
4
  margin: map-get($base, vertical-space-lg) 0;
4
5
  font-size: map-get($base, font-size-sm);
5
6
  background-color: $text-background-color;
@@ -11,33 +12,14 @@
11
12
  margin-top: map-get($base, vertical-space);
12
13
  border-radius: 50%;
13
14
  }
14
- .author-profile__name {
15
- font-size: map-get($base, font-size-lg);
16
- font-weight: map-get($base, font-weight-bold);
17
- a {
18
- @include link-colors($text-color, $main-color-1);
19
- }
20
- }
21
- .left-col {
22
- float: left;
23
- @include media-breakpoint-down(md) {
24
- float: none;
25
- }
26
- }
27
- .right-col {
28
- padding-left: map-get($spacers, 4);
29
- margin-left: 5rem;
30
- @include media-breakpoint-down(md) {
31
- float: none;
32
- padding-left: 0;
33
- margin-left: 0;
34
- margin-left: 0;
35
- }
36
- .author-links {
37
- float: left;
38
- @include media-breakpoint-down(md) {
39
- float: none;
40
- }
41
- }
15
+ }
16
+ .author-profile__name {
17
+ font-size: map-get($base, font-size-lg);
18
+ font-weight: map-get($base, font-weight-bold);
19
+ a {
20
+ @include link-colors($text-color, $main-color-1);
42
21
  }
22
+ }
23
+ .author-profile__links {
24
+ @include overflow(auto);
43
25
  }
@@ -7,17 +7,6 @@
7
7
  @include align-items(center);
8
8
  height: map-get($layout, footer-height);
9
9
  background: $footer-background;
10
- & > .main {
11
- max-width: 100%;
12
- }
13
- .author-links {
14
- @include overflow(auto);
15
- padding-top: 1rem;
16
- text-align: center;
17
- & > .menu {
18
- @include inline-flex();
19
- }
20
- }
21
10
  p {
22
11
  color: $footer-text-color;
23
12
  }
@@ -39,4 +28,11 @@
39
28
  }
40
29
  }
41
30
  }
31
+ }
32
+ .footer__author-links {
33
+ @include overflow(auto);
34
+ .author-links {
35
+ padding-top: 1rem;
36
+ text-align: center;
37
+ }
42
38
  }
@@ -13,7 +13,17 @@
13
13
  }
14
14
  }
15
15
 
16
- .header__main {
16
+ .header--dark {
17
+ @extend .text--dark;
18
+ background: rgba(#000, .15);
19
+ }
20
+
21
+ .header--light {
22
+ @extend .text--light;
23
+ background: rgba(#fff, .15);
24
+ }
25
+
26
+ .header__title {
17
27
  @include menu(3, 0);
18
28
  @include align-items(center);
19
29
  @include flex-wrap(nowrap);
@@ -25,7 +35,7 @@
25
35
  height: map-get($layout, header-height-sm);
26
36
  margin-right: 0;
27
37
  }
28
- & > .logo {
38
+ & > .header__brand {
29
39
  @include flex(1);
30
40
  }
31
41
  & > .search-button {
@@ -37,7 +47,7 @@
37
47
  }
38
48
  }
39
49
 
40
- .logo {
50
+ .header__brand {
41
51
  & > svg {
42
52
  width: map-get($base, font-size-h4) * 1.6;
43
53
  height: map-get($base, font-size-h4) * 1.6;
@@ -72,26 +82,27 @@
72
82
  @include media-breakpoint-down(md) {
73
83
  height: auto;
74
84
  }
75
- & > li {
76
- &.active {
77
- a {
78
- @include link-colors($main-color-1, $main-color-1);
79
- }
80
- &::after {
81
- @include split-line(bottom, 4px, $main-color-1);
82
- }
83
- }
84
- &::after {
85
- display: block;
86
- margin-bottom: -4px;
87
- content: "";
88
- @include split-line(bottom, 4px, transparent);
89
- }
90
- }
91
85
  .search-button {
92
86
  @include media-breakpoint-down(md) {
93
87
  display: none;
94
88
  }
95
89
  }
96
90
  }
91
+ }
92
+
93
+ .navigation__link {
94
+ &::after {
95
+ display: block;
96
+ margin-bottom: -4px;
97
+ content: "";
98
+ @include split-line(bottom, 4px, transparent);
99
+ }
100
+ }
101
+ .navigation__link--active {
102
+ a {
103
+ @include link-colors($main-color-1, $main-color-1);
104
+ }
105
+ &::after {
106
+ @include split-line(bottom, 4px, $main-color-1);
107
+ }
97
108
  }