jekyll-text-theme 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/_data/locale.yml +12 -0
  4. data/_includes/analytics-providers/google.html +7 -9
  5. data/_includes/article-info.html +19 -35
  6. data/_includes/article-list.html +73 -0
  7. data/_includes/author-links.html +7 -0
  8. data/_includes/header.html +13 -9
  9. data/_includes/markdown-enhancements.html +3 -3
  10. data/_includes/paginator.html +73 -72
  11. data/_includes/scripts/archieve.js +57 -160
  12. data/_includes/scripts/aside/affix.js +2 -0
  13. data/_includes/scripts/lib/affix.js +8 -6
  14. data/_includes/scripts/lib/toc.js +3 -5
  15. data/_includes/scripts/search-data.js +14 -0
  16. data/_includes/scripts/search.js +177 -0
  17. data/_includes/scripts/utils.js +1 -1
  18. data/_includes/scripts/variables.html +6 -0
  19. data/_includes/search.html +24 -0
  20. data/_includes/snippets/is_collection.html +6 -0
  21. data/_includes/snippets/prepend-baseurl.html +4 -1
  22. data/_includes/snippets/prepend-path.html +1 -0
  23. data/_includes/svg/icon/social/npm.svg +9 -0
  24. data/_includes/tags.html +2 -2
  25. data/_layouts/archive.html +3 -9
  26. data/_layouts/base.html +1 -0
  27. data/_layouts/home.html +1 -28
  28. data/_layouts/landing.html +11 -4
  29. data/_layouts/page.html +18 -8
  30. data/_sass/common/_classes.scss +1 -0
  31. data/_sass/common/_function.scss +2 -2
  32. data/_sass/common/_reset.scss +5 -5
  33. data/_sass/common/_variables.scss +22 -14
  34. data/_sass/common/classes/_animation.scss +1 -1
  35. data/_sass/common/classes/_clearfix.scss +7 -3
  36. data/_sass/common/classes/_clickable.scss +13 -13
  37. data/_sass/common/classes/_display.scss +3 -0
  38. data/_sass/common/classes/_flex.scss +131 -131
  39. data/_sass/common/classes/_grid.scss +3 -3
  40. data/_sass/common/classes/_horizontal-rules.scss +3 -3
  41. data/_sass/common/classes/_overflow.scss +3 -3
  42. data/_sass/common/classes/_spacing.scss +24 -24
  43. data/_sass/common/classes/_transform.scss +1 -1
  44. data/_sass/common/classes/_transition.scss +1 -1
  45. data/_sass/common/classes/_user-select.scss +3 -3
  46. data/_sass/common/components/_button.scss +19 -9
  47. data/_sass/common/components/_card.scss +2 -2
  48. data/_sass/common/components/_item.scss +90 -0
  49. data/_sass/common/components/_menu.scss +8 -4
  50. data/_sass/common/components/_toc.scss +7 -2
  51. data/_sass/components/_article-content.scss +25 -18
  52. data/_sass/components/_article-info.scss +2 -2
  53. data/_sass/components/_article-list.scss +3 -0
  54. data/_sass/components/_author-links.scss +3 -0
  55. data/_sass/components/_author-profile.scss +5 -5
  56. data/_sass/components/_footer.scss +13 -5
  57. data/_sass/components/_header.scss +80 -46
  58. data/_sass/components/_main.scss +3 -3
  59. data/_sass/components/_search.scss +97 -0
  60. data/_sass/components/_tags.scss +3 -2
  61. data/_sass/layout/_archive.scss +5 -82
  62. data/_sass/layout/_article.scss +2 -2
  63. data/_sass/layout/_base.scss +1 -1
  64. data/_sass/layout/_home.scss +10 -68
  65. data/_sass/layout/_landing.scss +5 -6
  66. data/_sass/layout/_page.scss +34 -12
  67. data/_sass/skins/_chocolate.scss +2 -1
  68. data/_sass/skins/_dark.scss +3 -2
  69. data/_sass/skins/_default.scss +2 -1
  70. data/_sass/skins/_forest.scss +2 -1
  71. data/_sass/skins/_ocean.scss +2 -1
  72. data/_sass/skins/_orange.scss +2 -1
  73. data/_sass/skins/highlight/tomorrow/_highlight.scss +65 -65
  74. data/_sass/skins/highlight/tomorrow/_night-blue.scss +2 -2
  75. data/_sass/skins/highlight/tomorrow/_night-bright.scss +1 -1
  76. data/_sass/skins/highlight/tomorrow/_night-eighties.scss +7 -7
  77. data/_sass/skins/highlight/tomorrow/_night.scss +1 -1
  78. data/assets/css/main.scss +4 -1
  79. data/assets/search.js +3 -0
  80. metadata +14 -3
  81. data/_includes/scripts/article-list.html +0 -25
@@ -1,15 +1,15 @@
1
1
  .author-profile {
2
2
  max-width: 25rem;
3
- background-color: $text-background-color;
4
- font-size: map-get($base, font-size-sm);
5
3
  margin: map-get($base, vertical-space-lg) 0;
4
+ font-size: map-get($base, font-size-sm);
5
+ background-color: $text-background-color;
6
6
  @include media-breakpoint-down(md) {
7
7
  text-align: center;
8
8
  }
9
9
  img {
10
10
  width: 5rem;
11
- border-radius: 50%;
12
11
  margin-top: map-get($base, vertical-space);
12
+ border-radius: 50%;
13
13
  }
14
14
  .author-profile__name {
15
15
  font-size: map-get($base, font-size-lg);
@@ -25,13 +25,13 @@
25
25
  }
26
26
  }
27
27
  .right-col {
28
- margin-left: 5rem;
29
28
  padding-left: map-get($spacers, 4);
29
+ margin-left: 5rem;
30
30
  @include media-breakpoint-down(md) {
31
31
  float: none;
32
- margin-left: 0;
33
32
  padding-left: 0;
34
33
  margin-left: 0;
34
+ margin-left: 0;
35
35
  }
36
36
  .author-links {
37
37
  float: left;
@@ -3,12 +3,20 @@
3
3
  */
4
4
 
5
5
  .footer {
6
- @include flexbox;
6
+ @include flexbox();
7
7
  @include align-items(center);
8
- background: $footer-background;
9
8
  height: map-get($layout, footer-height);
9
+ background: $footer-background;
10
+ & > .main {
11
+ max-width: 100%;
12
+ }
10
13
  .author-links {
14
+ @include overflow(auto);
11
15
  padding-top: 1rem;
16
+ text-align: center;
17
+ & > .menu {
18
+ @include inline-flex();
19
+ }
12
20
  }
13
21
  p {
14
22
  color: $footer-text-color;
@@ -17,6 +25,9 @@
17
25
  @include link-colors ($footer-text-color, $main-color-1);
18
26
  }
19
27
  .site-info {
28
+ margin: 1rem auto 0 auto;
29
+ font-size: map-get($base, font-size-xs);
30
+ text-align: center;
20
31
  .menu {
21
32
  line-height: map-get($base, line-height-xs);
22
33
  & > * {
@@ -27,8 +38,5 @@
27
38
  }
28
39
  }
29
40
  }
30
- text-align: center;
31
- font-size: map-get($base, font-size-xs);
32
- margin: 1rem auto 0 auto;
33
41
  }
34
42
  }
@@ -5,59 +5,93 @@
5
5
  text-decoration: none !important;
6
6
  @include link-colors($header-text-color, $main-color-1);
7
7
  }
8
- & > .main > .logo {
9
- float: left;
10
- @include menu(3, 0);
11
- @include align-items(center);
12
- height: map-get($layout, header-height);
13
- & > svg {
14
- margin-right: .8rem;
15
- vertical-align: middle;
16
- width: map-get($base, font-size-h4) * 1.6;
17
- height: map-get($base, font-size-h4) * 1.6;
18
- @include media-breakpoint-down(md) {
19
- margin-right: .5rem;
20
- width: map-get($base, font-size-h4) * 1.2;
21
- height: map-get($base, font-size-h4) * 1.2;
22
- }
8
+ .main {
9
+ @include flexbox();
10
+ @include media-breakpoint-down(md) {
11
+ @include flex-direction(column);
23
12
  }
24
- & > a {
25
- display: inline-block;
26
- font-size: map-get($base, font-size-h4);
27
- @include media-breakpoint-down(md) {
28
- font-size: map-get($base, font-size-h4-small);
29
- }
13
+ }
14
+ }
15
+
16
+ .header__main {
17
+ @include menu(3, 0);
18
+ @include align-items(center);
19
+ @include flex-wrap(nowrap);
20
+ @include flex(1);
21
+ height: map-get($layout, header-height);
22
+ margin-right: map-get($spacers, 3);
23
+ white-space: nowrap;
24
+ @include media-breakpoint-down(md) {
25
+ height: map-get($layout, header-height-sm);
26
+ margin-right: 0;
27
+ }
28
+ & > .logo {
29
+ @include flex(1);
30
+ }
31
+ & > .search-button {
32
+ display: none;
33
+ margin-left: map-get($spacers, 2);
34
+ @include media-breakpoint-down(md) {
35
+ @include flexbox();
30
36
  }
37
+ }
38
+ }
39
+
40
+ .logo {
41
+ & > svg {
42
+ width: map-get($base, font-size-h4) * 1.6;
43
+ height: map-get($base, font-size-h4) * 1.6;
44
+ margin-right: .8rem;
45
+ vertical-align: middle;
31
46
  @include media-breakpoint-down(md) {
32
- float: none;
33
- height: map-get($layout, header-height-sm);
34
- }
35
- }
36
- & > .main > nav {
37
- display: block;
38
- float: right;
39
- white-space: nowrap;
40
- @include overflow(auto);
41
- ul {
42
- margin: 0;
43
- @include menu(3, 2, nowrap);
44
- @include align-items(center);
45
- height: map-get($layout, header-height);
46
- @include media-breakpoint-down(md) {
47
- height: auto;
48
- }
49
- & > li {
50
- @include split-line(bottom, 4px, transparent);
51
- &.active {
47
+ width: map-get($base, font-size-h4) * 1.2;
48
+ height: map-get($base, font-size-h4) * 1.2;
49
+ }
50
+ }
51
+ & > a {
52
+ display: inline-block;
53
+ font-size: map-get($base, font-size-h4);
54
+ @include media-breakpoint-down(md) {
55
+ font-size: map-get($base, font-size-h4-small);
56
+ }
57
+ }
58
+ }
59
+
60
+ .navigation {
61
+ @include overflow(auto);
62
+ & > ul {
63
+ height: map-get($layout, header-height);
64
+ padding-bottom: 0;
65
+ margin: 0;
66
+ @include media-breakpoint-down(md) {
67
+ padding-bottom: 4px;
68
+ margin: -4px 0 0 0;
69
+ }
70
+ @include menu(3, 2, nowrap);
71
+ @include align-items(center);
72
+ @include media-breakpoint-down(md) {
73
+ height: auto;
74
+ }
75
+ & > li {
76
+ &.active {
77
+ a {
78
+ @include link-colors($main-color-1, $main-color-1);
79
+ }
80
+ &::after {
52
81
  @include split-line(bottom, 4px, $main-color-1);
53
- a {
54
- @include link-colors($main-color-1, $main-color-1);
55
- }
56
82
  }
57
83
  }
84
+ &::after {
85
+ display: block;
86
+ margin-bottom: -4px;
87
+ content: "";
88
+ @include split-line(bottom, 4px, transparent);
89
+ }
58
90
  }
59
- @include media-breakpoint-down(md) {
60
- float: none;
91
+ .search-button {
92
+ @include media-breakpoint-down(md) {
93
+ display: none;
94
+ }
61
95
  }
62
96
  }
63
97
  }
@@ -1,7 +1,7 @@
1
1
  .main {
2
- margin: 0 auto;
3
- padding: 0 2rem;
4
2
  max-width: map-get($layout, content-max-width);
3
+ padding: 0 2rem;
4
+ margin: 0 auto;
5
5
  @include media-breakpoint-down(lg) {
6
6
  padding: 0 1rem;
7
7
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  .full-width {
21
21
  .main {
22
- max-width: 100%;
23
22
  width: 100%;
23
+ max-width: 100%;
24
24
  }
25
25
  }
@@ -0,0 +1,97 @@
1
+ .search-bar {
2
+ @include flexbox();
3
+ margin: map-get($base, vertical-space-lg) 0;
4
+ }
5
+ .search-box {
6
+ position: relative;
7
+ width: 100%;
8
+ max-width: 22rem;
9
+ @include media-breakpoint-down(md) {
10
+ width: 100%;
11
+ max-width: none;
12
+ }
13
+ & > input {
14
+ display: inline-block;
15
+ width: 100%;
16
+ height: $button-height-lg;
17
+ padding: 0 1.8rem;
18
+ margin: 0;
19
+ line-height: 1 !important;
20
+ background-color: transparent;
21
+ border: 2px solid $border-color;
22
+ border-radius: map-get($button, pill-radius);
23
+ -webkit-appearance: none; /* fix iOS don't display box-shadow properly */
24
+ @include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
25
+ @include focus {
26
+ box-shadow: 0 0 0 2px rgba($border-color, .4);
27
+ }
28
+ }
29
+ & > .search-box__icon-search {
30
+ color: $text-color-l;
31
+ }
32
+ & > .search-box__icon-clear {
33
+ & > a {
34
+ @include link-colors($text-color);
35
+ cursor: pointer;
36
+ }
37
+ }
38
+ & > .search-box__icon-search, & > .search-box__icon-clear {
39
+ position: absolute;
40
+ width: $button-height-lg;
41
+ height: $button-height-lg;
42
+ line-height: $button-height-lg;
43
+ text-align: center;
44
+ vertical-align: middle;
45
+ }
46
+ &.not-empty > .search-box__icon-clear {
47
+ display: block;
48
+ }
49
+ & > .search-box__icon-clear {
50
+ top: 0;
51
+ right: 0;
52
+ display: none;
53
+ }
54
+ & > .search-box__icon-search {
55
+ top: 0;
56
+ left: 0;
57
+ }
58
+ }
59
+ .search-result {
60
+ margin: map-get($base, vertical-space-lg) 0;
61
+ font-size: map-get($base, font-size-sm);
62
+ line-height: map-get($base, line-height-sm);
63
+ }
64
+ .search-result__header {
65
+ margin: map-get($base, vertical-space) * 2 0 map-get($base, vertical-space) 0;
66
+ font-size: map-get($base, font-size-lg);
67
+ font-weight: map-get($base, font-weight-bold);
68
+ color: $text-color-l;
69
+ text-transform: uppercase;
70
+ }
71
+ .search-result__item {
72
+ list-style-type: none;
73
+ a {
74
+ padding: .4rem 1rem;
75
+ @include clickable($text-color, transparent, $text-color-3, $main-color-3);
76
+ }
77
+ &.active {
78
+ a {
79
+ color: $text-color-3;
80
+ background-color: $main-color-3;
81
+ }
82
+ }
83
+ }
84
+ .search__header {
85
+ margin-top: 1.5rem;
86
+ font-size: map-get($base, font-size-h1);
87
+ font-weight: map-get($base, font-weight-bold);
88
+ color: $text-color-d;
89
+ @include media-breakpoint-down(md) {
90
+ display: none;
91
+ }
92
+ }
93
+ .search__cancel {
94
+ margin-left: map-get($spacers, 2);
95
+ font-weight: map-get($base, font-weight-bold);
96
+ white-space: nowrap;
97
+ }
@@ -1,11 +1,12 @@
1
1
  .site-tags {
2
+ margin: map-get($base, vertical-space-lg) 0;
2
3
  .tag-button {
3
4
  @include clickable($text-color-3, $main-color-3, default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
4
5
  & > .tag-button__count {
5
- font-size: map-get($base, font-size-xs);
6
6
  display: inline-block;
7
- line-height: 1;
8
7
  margin-left: .2rem;
8
+ font-size: map-get($base, font-size-xs);
9
+ line-height: 1;
9
10
  vertical-align: top;
10
11
  }
11
12
  }
@@ -1,88 +1,11 @@
1
1
  .layout--archive {
2
- .site-tags {
3
- margin-bottom: map-get($base, vertical-space-lg) * 2;
4
- display: block;
5
- }
6
-
7
- .search-box {
8
- position: relative;
9
- max-width: 22rem;
10
- margin: map-get($base, vertical-space-lg) 0;
11
- @include media-breakpoint-down(md) {
12
- max-width: none;
13
- width: 100%;
14
- }
15
- & > input {
16
- -webkit-appearance: none; /* fix iOS don't display box-shadow properly */
17
- display: inline-block;
18
- width: 100%;
19
- padding: .2rem 1.8rem;
20
- margin: 0;
21
- border: 2px solid $border-color;
22
- border-radius: map-get($button, pill-radius);
23
- background-color: transparent;
24
- @include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
25
- @include focus {
26
- box-shadow: 0 0 0 2px rgba($border-color, .4);
27
- }
28
- }
29
- & > .search-box__icon-search, & > .search-box__icon-clear {
30
- position: absolute;
31
- vertical-align: middle;
32
- top: 50%;
33
- @include transform(translateY(-50%));
34
- }
35
- &.not-empty > .search-box__icon-clear {
36
- display: block;
37
- }
38
- & > .search-box__icon-clear {
39
- display: none;
40
- right: .35rem;
41
- }
42
- & > .search-box__icon-search {
43
- left: .6rem;
44
- }
45
- }
46
-
47
2
  & > .layout--archive__result {
48
3
  margin: map-get($base, vertical-space-lg) 0;
49
- section {
50
- &:not(:last-child) {
51
- padding: 0 0 .4rem 0;
52
- }
53
- .year {
54
- font-size: 1.6rem;
55
- }
56
- ul > li {
57
- list-style-type: none;
58
- margin: .4rem 0;
59
- .date {
60
- font-family: map-get($base, font-family-code);
61
- display: inline-block;
62
- font-size: map-get($base, font-size-sm);
63
- color: $text-color-l;
64
- padding: 0 1rem 0 0;
65
- }
66
- .link {
67
- font-size: 1rem;
68
- @include link-colors($text-color-d, $main-color-1);
69
- }
70
- }
71
- }
72
- }
73
- &.search {
74
- & > .site-tags {
75
- display: none;
76
- }
77
- & > .layout--archive__result {
78
- section {
79
- ul > li {
80
- .date {
81
- display: none;
82
- }
83
- }
84
- }
4
+ .item__meta {
5
+ padding: 0 1rem 0 0;
6
+ font-family: map-get($base, font-family-code);
7
+ font-size: map-get($base, font-size-sm);
8
+ white-space: nowrap;
85
9
  }
86
10
  }
87
-
88
11
  }
@@ -14,9 +14,9 @@
14
14
  }
15
15
  }
16
16
  .article__section-navigator {
17
- word-wrap: break-word;
18
- margin: map-get($spacers, 4) 0 map-get($spacers, 3) 0;
19
17
  padding-top: map-get($base, vertical-space-lg) / 2;
18
+ margin: map-get($spacers, 4) 0 map-get($spacers, 3) 0;
19
+ word-wrap: break-word;
20
20
  @include split-line(top, 4px);
21
21
  & > .previous, & > .next {
22
22
  width: 50%;