jekyll-text-theme 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -3
  3. data/_data/locale.yml +4 -4
  4. data/_data/variables.yml +1 -0
  5. data/_includes/article-footer/author-profile.html +2 -7
  6. data/_includes/article-footer/license.html +1 -2
  7. data/_includes/article-info.html +6 -13
  8. data/_includes/article-section-navigator.html +54 -0
  9. data/_includes/{follow-me.html → author-links.html} +4 -10
  10. data/_includes/footer.html +20 -21
  11. data/_includes/head.html +10 -18
  12. data/_includes/header.html +5 -8
  13. data/_includes/markdown-enhancements.html +6 -18
  14. data/_includes/markdown-enhancements/mathjax.html +4 -8
  15. data/_includes/markdown-enhancements/mermaid.html +3 -1
  16. data/_includes/pageview.html +1 -3
  17. data/_includes/paginator.html +97 -0
  18. data/_includes/scripts/archieve.js +4 -4
  19. data/_includes/scripts/article-list.html +2 -4
  20. data/_includes/scripts/aside/affix.js +7 -9
  21. data/_includes/scripts/aside/toc.js +7 -9
  22. data/_includes/scripts/{sidebar.js → components/sidebar.js} +0 -0
  23. data/_includes/scripts/lib/affix.js +35 -26
  24. data/_includes/scripts/lib/toc.js +7 -5
  25. data/_includes/sidebar/toc.html +2 -4
  26. data/_includes/snippets/assign.html +7 -3
  27. data/_includes/snippets/get-nav-url.html +4 -4
  28. data/_includes/snippets/get-sources.html +1 -4
  29. data/_includes/snippets/locale-to-string.html +4 -4
  30. data/_includes/snippets/page-title.html +2 -4
  31. data/_includes/snippets/page-url.html +1 -2
  32. data/_includes/snippets/prepend-baseurl.html +1 -1
  33. data/_includes/tags.html +1 -1
  34. data/_layouts/article.html +8 -38
  35. data/_layouts/home.html +4 -108
  36. data/_layouts/landing.html +6 -12
  37. data/_layouts/page.html +16 -28
  38. data/_sass/additional/_alert.scss +4 -4
  39. data/_sass/animate/_fade-in-up.scss +10 -0
  40. data/_sass/common/_classes.scss +2 -1
  41. data/_sass/common/_reset.scss +0 -13
  42. data/_sass/common/_variables.scss +1 -1
  43. data/_sass/common/classes/_clickable.scss +1 -1
  44. data/_sass/common/classes/_link.scss +0 -62
  45. data/_sass/common/components/_menu.scss +21 -1
  46. data/_sass/common/components/_toc.scss +9 -10
  47. data/_sass/components/{_article.content.scss → _article-content.scss} +3 -5
  48. data/_sass/components/{_article.info.scss → _article-info.scss} +3 -3
  49. data/_sass/components/{_follow-me.scss → _author-links.scss} +1 -1
  50. data/_sass/components/_author-profile.scss +1 -1
  51. data/_sass/components/_footer.scss +14 -12
  52. data/_sass/components/_header.scss +2 -1
  53. data/_sass/components/_tags.scss +1 -0
  54. data/_sass/layout/_archive.scss +7 -4
  55. data/_sass/layout/_article.scss +1 -1
  56. data/_sass/layout/_base.scss +10 -0
  57. data/_sass/layout/_home.scss +3 -0
  58. data/_sass/layout/_page.scss +5 -1
  59. data/_sass/skins/_chocolate.scss +25 -14
  60. data/_sass/skins/_dark.scss +19 -8
  61. data/_sass/skins/_default.scss +16 -5
  62. data/_sass/skins/_forest.scss +17 -6
  63. data/_sass/skins/_ocean.scss +23 -12
  64. data/_sass/skins/_orange.scss +26 -14
  65. data/_sass/skins/highlight/_default.scss +0 -0
  66. data/_sass/skins/highlight/_tomorrow-night-blue.scss +2 -0
  67. data/_sass/skins/highlight/_tomorrow-night-bright.scss +2 -0
  68. data/_sass/skins/highlight/_tomorrow-night-eighties.scss +2 -0
  69. data/_sass/skins/highlight/_tomorrow-night.scss +2 -0
  70. data/_sass/skins/highlight/_tomorrow.scss +2 -0
  71. data/_sass/skins/highlight/tomorrow/_default.scss +10 -0
  72. data/_sass/skins/highlight/tomorrow/_highlight.scss +74 -0
  73. data/_sass/skins/highlight/tomorrow/_night-blue.scss +10 -0
  74. data/_sass/skins/highlight/tomorrow/_night-bright.scss +10 -0
  75. data/_sass/skins/highlight/tomorrow/_night-eighties.scss +10 -0
  76. data/_sass/skins/highlight/tomorrow/_night.scss +10 -0
  77. data/assets/css/main.scss +20 -9
  78. metadata +23 -9
  79. data/_includes/snippets/to-boolean.html +0 -7
  80. data/_sass/common/_highlighting.scss +0 -65
@@ -1,3 +1,14 @@
1
+ @mixin menu-direction($direction: default) {
2
+ @if $direction == default {
3
+ $direction: 'horizontal';
4
+ }
5
+ @if $direction == 'vertical' {
6
+ @include flex-direction(column);
7
+ } @else {
8
+ @include flex-direction(row);
9
+ }
10
+ }
11
+
1
12
  @mixin menu($horizontal-spacer: default, $horizontal-item-vertical-spacer: default, $wrap: default) {
2
13
  @if $horizontal-spacer == default {
3
14
  $horizontal-spacer: map-get($menu, horizontal-spacer);
@@ -10,7 +21,6 @@
10
21
  }
11
22
  @include flexbox();
12
23
  @include flex-wrap($wrap);
13
- @include align-items(center);
14
24
  margin-top: 0;
15
25
  margin-bottom: 0;
16
26
  & > li {
@@ -28,6 +38,16 @@
28
38
 
29
39
  .menu {
30
40
  @include menu();
41
+ @include menu-direction();
42
+ @include align-items(center);
43
+ }
44
+
45
+ .menu--vertical {
46
+ @include menu-direction('vertical');
47
+ @include align-items(normal);
48
+ & > li {
49
+ margin-right: 0;
50
+ }
31
51
  }
32
52
 
33
53
  .menu--center {
@@ -3,11 +3,12 @@ ul.toc {
3
3
  margin: 0;
4
4
  list-style-type: none;
5
5
  & > li {
6
- margin: .1rem 0;
6
+ margin: .2rem 0;
7
7
  &.active {
8
8
  a {
9
+ color: $text-color-3;
9
10
  background-color: $main-color-3;
10
- @include link-colors($main-color-1);
11
+ box-shadow: 0 0 0 2px rgba($main-color-3, .4);
11
12
  }
12
13
  }
13
14
  }
@@ -17,17 +18,14 @@ ul.toc {
17
18
  padding: .2rem .8rem .2rem .8rem;
18
19
  border-radius: map-get($base, border-radius);
19
20
  text-decoration: none !important;
20
- @include link-colors($text-color);
21
- @include hover() {
22
- background-color: $main-color-3;
23
- }
21
+ @include clickable($text-color, null, $text-color-3, $main-color-3);
24
22
  }
25
23
 
26
24
  .toc-h1 {
27
25
  @include split-line(bottom);
28
26
  padding: .8rem 0 .3rem 0;
29
27
  margin-bottom: .6rem;
30
- &, a {
28
+ a {
31
29
  @include link-colors($text-color-d);
32
30
  }
33
31
  }
@@ -47,7 +45,7 @@ ul.toc {
47
45
  }
48
46
  .toc-h5,
49
47
  .toc-h6 {
50
- &, a {
48
+ a {
51
49
  @include link-colors($text-color-l);
52
50
  }
53
51
  }
@@ -64,13 +62,13 @@ ul.toc {
64
62
  .toc-h1 {
65
63
  &, a {
66
64
  font-size: map-get($base, font-size);
67
- line-height: map-get($base, line-height-lg);
65
+ line-height: map-get($base, line-height);
68
66
  }
69
67
  }
70
68
  .toc-h2 {
71
69
  &, a {
72
70
  font-size: map-get($base, font-size-sm);
73
- line-height: map-get($base, line-height);
71
+ line-height: map-get($base, line-height-sm);
74
72
  }
75
73
  }
76
74
  .toc-h3,
@@ -89,6 +87,7 @@ ul.toc--navigator {
89
87
  &.active {
90
88
  a {
91
89
  background-color: transparent;
90
+ box-shadow: none;
92
91
  @include link-colors($main-color-1);
93
92
  @include split-line(left, 4px, $main-color-1);
94
93
  margin-left: -4px;
@@ -140,7 +140,7 @@
140
140
  & > pre {
141
141
  border-radius: 0;
142
142
  display: block;
143
- overflow: visible;
143
+ @include overflow(auto);
144
144
  margin: 0;
145
145
  &.lineno {
146
146
  color: $text-color-l;
@@ -159,17 +159,15 @@
159
159
  margin-bottom: 0;
160
160
  }
161
161
  li {
162
- margin: 0;
163
162
  p {
164
- margin: 0;
163
+ margin: map-get($base, vertical-space);
165
164
  }
166
165
  }
167
166
  }
168
167
  dl {
169
168
  dt, dd {
170
- margin: 0;
171
169
  p {
172
- margin: 0;
170
+ margin: map-get($base, vertical-space);
173
171
  }
174
172
  }
175
173
  dt {
@@ -15,10 +15,10 @@
15
15
  }
16
16
  & > li {
17
17
  &:not(:last-child) {
18
- @include split-line(right, default, $border-color);
18
+ @include split-line(right, default, $text-color-l);
19
19
  line-height: map-get($base, line-height-xs);
20
- padding-right: .6rem;
21
- margin-right: .8rem;
20
+ padding-right: .7rem;
21
+ margin-right: .7rem;
22
22
  }
23
23
  }
24
24
  }
@@ -1,4 +1,4 @@
1
- .follow-me {
1
+ .author-links {
2
2
  & > ul {
3
3
  margin: 0;
4
4
  & > li > {
@@ -33,7 +33,7 @@
33
33
  padding-left: 0;
34
34
  margin-left: 0;
35
35
  }
36
- .follow-me {
36
+ .author-links {
37
37
  float: left;
38
38
  @include media-breakpoint-down(md) {
39
39
  float: none;
@@ -5,28 +5,30 @@
5
5
  .footer {
6
6
  @include flexbox;
7
7
  @include align-items(center);
8
- background-color: $main-color-3;
8
+ background: $footer-background;
9
9
  height: map-get($layout, footer-height);
10
- .follow-me {
10
+ .author-links {
11
11
  padding-top: 1rem;
12
12
  }
13
13
  p {
14
- color: $text-color-3;
14
+ color: $footer-text-color;
15
15
  }
16
16
  a {
17
- @include link-colors ($text-color-3, $main-color-1);
17
+ @include link-colors ($footer-text-color, $main-color-1);
18
18
  }
19
19
  .site-info {
20
+ .menu {
21
+ line-height: map-get($base, line-height-xs);
22
+ & > * {
23
+ &:not(:last-child) {
24
+ @include split-line(right, default, $footer-text-color);
25
+ padding-right: .3rem;
26
+ margin-right: .3rem;
27
+ }
28
+ }
29
+ }
20
30
  text-align: center;
21
31
  font-size: map-get($base, font-size-xs);
22
32
  margin: 1rem auto 0 auto;
23
33
  }
24
- .site-info__rss {
25
- @include split-line(left, default, $text-color-3);
26
- padding-left: .3rem;
27
- margin-left: .1rem;
28
- }
29
- .site-info__copyright, .site-info__rss {
30
- line-height: map-get($base, line-height-xs);
31
- }
32
34
  }
@@ -1,8 +1,9 @@
1
1
  .header {
2
+ background: $header-background;
2
3
  a {
3
4
  font-weight: map-get($base, font-weight);
4
5
  text-decoration: none !important;
5
- @include link-colors($text-color, $main-color-1);
6
+ @include link-colors($header-text-color, $main-color-1);
6
7
  }
7
8
  & > .main > .logo {
8
9
  float: left;
@@ -1,5 +1,6 @@
1
1
  .site-tags {
2
2
  .tag-button {
3
+ @include clickable($text-color-3, $main-color-3, default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
3
4
  & > .tag-button__count {
4
5
  font-size: map-get($base, font-size-xs);
5
6
  display: inline-block;
@@ -18,10 +18,13 @@
18
18
  width: 100%;
19
19
  padding: .2rem 1.8rem;
20
20
  margin: 0;
21
- border: none;
21
+ border: 2px solid $border-color;
22
22
  border-radius: map-get($button, pill-radius);
23
- @include clickable($text-color, $text-background-color);
23
+ background-color: transparent;
24
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
+ }
25
28
  }
26
29
  & > .search-box__icon-search, & > .search-box__icon-clear {
27
30
  position: absolute;
@@ -34,10 +37,10 @@
34
37
  }
35
38
  & > .search-box__icon-clear {
36
39
  display: none;
37
- right: .3rem;
40
+ right: .35rem;
38
41
  }
39
42
  & > .search-box__icon-search {
40
- left: .5rem;
43
+ left: .6rem;
41
44
  }
42
45
  }
43
46
 
@@ -13,7 +13,7 @@
13
13
  }
14
14
  }
15
15
  }
16
- .article__previous-next {
16
+ .article__section-navigator {
17
17
  word-wrap: break-word;
18
18
  margin: map-get($spacers, 4) 0 map-get($spacers, 3) 0;
19
19
  padding-top: map-get($base, vertical-space-lg) / 2;
@@ -0,0 +1,10 @@
1
+ .root {
2
+ height: 100%;
3
+ }
4
+
5
+ .icon {
6
+ display: block;
7
+ >svg {
8
+ display: block;
9
+ }
10
+ }
@@ -59,6 +59,9 @@
59
59
  max-height: 12rem;
60
60
  }
61
61
  }
62
+ .post-list__readmore {
63
+ font-size: map-get($base, font-size-sm);
64
+ }
62
65
  }
63
66
 
64
67
  .pagination {
@@ -15,6 +15,8 @@
15
15
  height: auto !important;
16
16
  height: 100%;
17
17
  min-height: 100%;
18
+ color: $text-color;
19
+ background-color: $background-color;
18
20
 
19
21
  .col-aside {
20
22
  display: none;
@@ -40,6 +42,9 @@
40
42
  header, h1 {
41
43
  display: inline;
42
44
  }
45
+ .split-space {
46
+ @include user-select(none);
47
+ }
43
48
  .edit-on-github {
44
49
  text-decoration: none !important;
45
50
  }
@@ -59,7 +64,6 @@
59
64
 
60
65
  .sidebar-button {
61
66
  @include clickable($text-color-d, rgba($main-color-3, .75));
62
- border: 1px $border-color solid;
63
67
  }
64
68
 
65
69
  .page__sidebar {
@@ -5,17 +5,18 @@
5
5
  ///
6
6
 
7
7
  // main colors
8
- $main-color-1: #c68a45;
9
- $text-color-1: #fff;
8
+ $main-color-1: #563a20;
9
+ $text-color-1: rgba(#fff, .85);
10
10
 
11
- $main-color-2: #6e3e85;
12
- $text-color-2: #fff;
11
+ $main-color-2: #8a2827;
12
+ $text-color-2: rgba(#fff, .85);
13
13
 
14
- $main-color-3: #7f5543;
15
- $text-color-3: #fff;
14
+ $main-color-3: #b49b92;
15
+ $text-color-3: rgba(#fff, .85);
16
+
17
+ // page background
18
+ $background-color: #d2c2bc;
16
19
 
17
- // background colors
18
- $background-color: #efefef;
19
20
  // text colors
20
21
  $text-color-theme-light-d: rgba(#000, .95);
21
22
  $text-color-theme-light: rgba(#000, .85);
@@ -31,19 +32,26 @@ $text-color-l: $text-color-theme-light-l;
31
32
 
32
33
  $text-background-color: rgba(#000, .05);
33
34
 
35
+ // header and footer colors
36
+ $header-text-color: $text-color-3;
37
+ $header-background: $main-color-3;
38
+
39
+ $footer-text-color: $text-color-3;
40
+ $footer-background: $main-color-3;
41
+
34
42
  // border and shadow colors
35
- $border-color: mix(#000, $background-color, 20%);
43
+ $border-color: $main-color-3;
36
44
  $border-color-l: mix(#000, $background-color, 10%);
37
45
  $decorate-color: rgba(#000, .1);
38
46
  $mask-color: rgba(#000, .8);
39
47
  $select-color: rgba($main-color-3, .5);
40
48
 
41
49
  // function colors
42
- $green: #57c22d;
43
- $blue: #2593fc;
44
- $yellow: #f8ac30;
45
- $red: #f22635;
46
- $text-color-function: #fff;
50
+ $green: #5baa34;
51
+ $blue: #1c7cd4;
52
+ $yellow: #c9771f;
53
+ $red: #da3d45;
54
+ $text-color-function: rgba(#fff, .85);
47
55
 
48
56
  // logo colors
49
57
  $mail-color: #0072c5;
@@ -54,3 +62,6 @@ $twitter-color: #1da1f2;
54
62
  $douban-color: #42bd56;
55
63
  $github-color: #000;
56
64
  $linkedin-color: #1074af;
65
+
66
+ // highlight colors
67
+ @import './highlight/tomorrow-night-eighties';
@@ -8,14 +8,15 @@
8
8
  $main-color-1: #FF9500;
9
9
  $text-color-1: rgba(#fff, .8);
10
10
 
11
- $main-color-2: #FF3B30;
11
+ $main-color-2: #ff006a;
12
12
  $text-color-2: rgba(#fff, .8);
13
13
 
14
14
  $main-color-3: #202020;
15
15
  $text-color-3: rgba(#fff, .8);
16
16
 
17
- // background colors
17
+ // page background
18
18
  $background-color: #121212;
19
+
19
20
  // text colors
20
21
  $text-color-theme-light-d: #000;
21
22
  $text-color-theme-light: #222;
@@ -31,19 +32,26 @@ $text-color-l: $text-color-theme-dark-l;
31
32
 
32
33
  $text-background-color: rgba(#fff, .05);
33
34
 
35
+ // header and footer colors
36
+ $header-text-color: $text-color-3;
37
+ $header-background: $main-color-3;
38
+
39
+ $footer-text-color: $text-color-3;
40
+ $footer-background: $main-color-3;
41
+
34
42
  // border and shadow colors
35
43
  $border-color: mix(#fff, $background-color, 20%);
36
44
  $border-color-l: mix(#fff, $background-color, 10%);
37
45
  $decorate-color: rgba(#fff, .1);
38
- $mask-color: rgba(#fff, .8);
46
+ $mask-color: rgba(#000, .8);
39
47
  $select-color: rgba($main-color-1, .5);
40
48
 
41
49
  // function colors
42
- $green: #5c7829;
43
- $blue: #087099;
44
- $yellow: #b7b327;
45
- $red: #cc3333;
46
- $text-color-function: rgba(#fff, .9);
50
+ $green: #5baa34;
51
+ $blue: #1c7cd4;
52
+ $yellow: #c9771f;
53
+ $red: #da3d45;
54
+ $text-color-function: rgba(#fff, .8);
47
55
 
48
56
  // logo colors
49
57
  $mail-color: #0072c5;
@@ -54,3 +62,6 @@ $twitter-color: #1da1f2;
54
62
  $douban-color: #42bd56;
55
63
  $github-color: #000;
56
64
  $linkedin-color: #1074af;
65
+
66
+ // highlight colors
67
+ @import './highlight/tomorrow-night';