jekyll-text-theme 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d40ef49df1da21ab016b2ab711248fac71b6d12
4
- data.tar.gz: 76b07e568155511b54e0ed869e4bcc6d44c9ed58
3
+ metadata.gz: 32a22a3074ab0f4f8246caba2cc52209b494e056
4
+ data.tar.gz: 97c05e54f41bf0d1dfbeac5b70f60c3297f64f06
5
5
  SHA512:
6
- metadata.gz: 21bf66cb310779454b5054de19d130e75287abe59b5e76b52388d5880708f9853dbe30109392e3435494ccba91f83236c8c4beff7696b5131bdc40c9c1a743d7
7
- data.tar.gz: 987d9ae4fe46c3aee45b995d130e7a564e8f75c0d722d1b22b94194f89a51df7848b110f0ee75668a43ff2bfc9679086d5986c1fc1e823ffde48c2d53c7e56d9
6
+ metadata.gz: f199ddcd6a845ee96893524aa30315da07af55dfebb27bcd2d2cf10bad4e0be7abcc537f24f6af63a1f3f03f8d2bfac06ca01abec34fa06995786b67433b4504
7
+ data.tar.gz: 3256fcf3d4fad70f0a1bfb319169f3df2b776203e09a7fb1103dc22951e482c53b0cabea488911c8044ea8fb260d8d32ac1b032cfcf393b2e1756a7ea20cf0b0
@@ -10,7 +10,7 @@
10
10
  {%- endif -%}
11
11
 
12
12
  {%- assign __target = site.data.variables.default.mathjax -%}
13
- {%- assign __source = site.chart -%}
13
+ {%- assign __source = site.mathjax -%}
14
14
  {%- include snippets/assign.html -%}
15
15
 
16
16
  {%- assign __target = __return -%}
@@ -21,7 +21,7 @@
21
21
  {%- endif -%}
22
22
 
23
23
  {%- assign __target = site.data.variables.default.mermaid -%}
24
- {%- assign __source = site.chart -%}
24
+ {%- assign __source = site.mermaid -%}
25
25
  {%- include snippets/assign.html -%}
26
26
 
27
27
  {%- assign __target = __return -%}
@@ -100,7 +100,7 @@
100
100
  var $root = $('.js-all');
101
101
  var $searchBox = $('.js-search-box');
102
102
  var $searchInput = $searchBox.children('input');
103
- var $searchClear = $searchBox.children('.icon-clear');
103
+ var $searchClear = $searchBox.children('.js-icon-clear');
104
104
  var $tags = $('.js-tags');
105
105
  var $articleTags = $('.js-article-tag');
106
106
  var $tagShowAll = $('.js-tag-show-all');
@@ -4,7 +4,7 @@
4
4
  window.Lazyload.js(SOURCES.jquery, function() {
5
5
  var $window = $(window);
6
6
  var $articleContent = $('.js-article-content');
7
- var $tocRoot = $('.js-toc-root'), $col2 = $('.js-col-2');
7
+ var $tocRoot = $('.js-toc-root'), $col2 = $('.js-col-aside');
8
8
  var toc;
9
9
  var tocDisabled = false;
10
10
  var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
@@ -1,3 +1,7 @@
1
- /*(function () {
2
-
3
- })();*/
1
+ (function () {
2
+ var $root = document.getElementsByClassName('root')[0];
3
+ if (window.hasEvent('touchstart')) {
4
+ $root.dataset.isTouch = true;
5
+ document.addEventListener('touchstart', function(){}, false);
6
+ }
7
+ })();
@@ -8,14 +8,16 @@ titles:
8
8
  show_title: false
9
9
  ---
10
10
 
11
- <div class="layout--all js-all">
11
+ <div class="layout--archive js-all">
12
12
  <div class="search-box js-search-box">
13
- <div class="icon-search"><i class="fas fa-search"></i></div>
13
+ <div class="search-box__icon-search"><i class="fas fa-search"></i></div>
14
14
  <input type="text" />
15
- <div class="button icon-clear"><i class="fas fa-times"></i></div>
15
+ <div class="search-box__icon-clear js-icon-clear">
16
+ <div class="button button--secondary button--circle button--sm"><i class="fas fa-times"></i></div>
17
+ </div>
16
18
  </div>
17
19
  {%- include tags.html -%}
18
- <div class="js-result layout--all__result"></div>
20
+ <div class="js-result layout--archive__result"></div>
19
21
  </div>
20
22
 
21
23
  <script>
@@ -13,15 +13,6 @@ type: article
13
13
 
14
14
  <div class="layout--article">
15
15
 
16
- {%- if _show_author_profile -%}
17
- {%- if page.author -%}
18
- {%- assign __author = site.data.authors[page.author] -%}
19
- {%- else -%}
20
- {%- assign __author = site.author -%}
21
- {%- endif -%}
22
- {%- include author-profile.html -%}
23
- {%- endif -%}
24
-
25
16
  <div class="article__content" itemprop="articleBody">{{ content }}</div>
26
17
 
27
18
  <footer class="article__footer">
@@ -40,6 +31,16 @@ type: article
40
31
  <meta itemprop="dateModified" content="{{ page.date | date_to_xmlschema }}">
41
32
  {%- endif -%}
42
33
  {%- include article-footer/custom.html -%}
34
+
35
+ {%- if _show_author_profile -%}
36
+ {%- if page.author -%}
37
+ {%- assign __author = site.data.authors[page.author] -%}
38
+ {%- else -%}
39
+ {%- assign __author = site.author -%}
40
+ {%- endif -%}
41
+ {%- include article-footer/author-profile.html -%}
42
+ {%- endif -%}
43
+
43
44
  {%- if page.license -%}
44
45
  <div class="article__license">{%- include article-footer/license.html -%}</div>
45
46
  {%- endif -%}
data/_layouts/base.html CHANGED
@@ -10,9 +10,13 @@ layout: none
10
10
  {%- include scripts/utils.js -%}
11
11
  {%- include scripts/lib/throttle.js -%}
12
12
  {%- include scripts/lib/lazyload.js -%}
13
- {%- include scripts/common.js -%}
14
13
  </script>
15
14
  {%- include scripts/variables.html -%}
16
15
  </head>
17
- <body>{{ content }}</body>
16
+ <body>
17
+ <div class="root" data-is-touch="false">
18
+ {{ content }}
19
+ </div>
20
+ <script>{%- include scripts/common.js -%}</script>
21
+ </body>
18
22
  </html>
data/_layouts/home.html CHANGED
@@ -31,7 +31,7 @@ show_title: false
31
31
  {%- endif -%}
32
32
  </div>
33
33
 
34
- <a href="{{ _href }}">{{ _locale_readmore }}</a>
34
+ <p><a href="{{ _href }}">{{ _locale_readmore }}</a></p>
35
35
  {%- include article-info.html -%}
36
36
  </article>
37
37
  {%- endfor -%}
@@ -31,7 +31,7 @@ full_width: true
31
31
  {%- include snippets/get-nav-url.html -%}
32
32
  {%- assign _url = __return -%}
33
33
  {%- assign _type = _action.type | default: 'info' -%}
34
- <li><a class="button button--{{ _type }} button--rounded button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
34
+ <li><a class="button button--{{ _type }} button--pill button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
35
35
  {%- endfor -%}
36
36
  </ul>
37
37
  {%- endif -%}
@@ -62,7 +62,7 @@ full_width: true
62
62
  {%- include snippets/get-nav-url.html -%}
63
63
  {%- assign _url = __return -%}
64
64
  {%- assign _type = _action.type | default: 'outline-info' -%}
65
- <li><a class="button button--{{ _type }} button--rounded button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
65
+ <li><a class="button button--{{ _type }} button--pill button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
66
66
  {%- endfor -%}
67
67
  </ul>
68
68
  {%- endif -%}
@@ -92,7 +92,7 @@ full_width: true
92
92
  {%- include snippets/get-nav-url.html -%}
93
93
  {%- assign _url = __return -%}
94
94
  {%- assign _type = _action.type | default: 'outline-info' -%}
95
- <li><a class="button button--{{ _type }} button--rounded button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
95
+ <li><a class="button button--{{ _type }} button--pill button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
96
96
  {%- endfor -%}
97
97
  </ul>
98
98
  {%- endif -%}
data/_layouts/page.html CHANGED
@@ -73,7 +73,7 @@ layout: base
73
73
  <div class ="main">
74
74
  {%- endif -%}
75
75
 
76
- <div class="col-2 js-col-2">
76
+ <div class="col-aside js-col-aside">
77
77
  {%- if page.aside -%}
78
78
  <aside class="page__aside js-page-aside">
79
79
  {%- include aside/toc.html -%}
@@ -81,7 +81,7 @@ layout: base
81
81
  {%- endif -%}
82
82
  </div>
83
83
 
84
- <div class="col-1">
84
+ <div class="col-main">
85
85
  {%- if _page_type == 'article' -%}
86
86
  <article itemscope itemtype="http://schema.org/Article">
87
87
  {%- elsif _page_type == 'webpage' -%}
@@ -101,9 +101,10 @@ layout: base
101
101
  {%- if site.repository and site.repository_tree -%}
102
102
  {%- assign __locale = site.data.locale.POST_ON_GITHUB -%}
103
103
  {%- include snippets/locale-to-string.html -%}
104
- <a class="edit-on-github-button button button--secondary button--rounded button--sm"
104
+ <a class="edit-on-github ml-3"
105
+ title="{{ __return }}"
105
106
  href="https://github.com/{{ site.repository }}/tree/{{ site.repository_tree }}/{{ page.path }}">
106
- <i class="fab fa-github"></i> {{ __return }}</a>
107
+ <i class="far fa-edit"></i></a>
107
108
  {%- endif -%}
108
109
  {%- endif -%}
109
110
  {%- if _show_title or _show_edit_on_github -%}
@@ -3,6 +3,7 @@
3
3
  @import
4
4
  "common/classes/animation",
5
5
  "common/classes/clearfix",
6
+ "common/classes/clickable",
6
7
  "common/classes/flex",
7
8
  "common/classes/horizontal-rules",
8
9
  "common/classes/pseudo",
@@ -0,0 +1,7 @@
1
+ @function get-color-theme($color) {
2
+ @if lightness($color) < 15% {
3
+ @return 'dark';
4
+ } @else {
5
+ @return 'light';
6
+ }
7
+ }
@@ -54,6 +54,10 @@ body {
54
54
  }
55
55
  }
56
56
 
57
+ .root {
58
+ height: 100%;
59
+ }
60
+
57
61
  input, textarea, select, button {
58
62
  font: map-get($base, font-weight) #{map-get($base, font-size)}/#{map-get($base, line-height)} map-get($base, font-family);
59
63
  color: $text-color;
@@ -126,9 +130,9 @@ a {
126
130
  text-decoration: underline;
127
131
  }
128
132
  @include active() {
129
- text-decoration: underline;
133
+ text-decoration: none;
130
134
  }
131
- @include link-colors($main-color-1, $main-color-1, $main-color-1);
135
+ @include link-colors($main-color-1);
132
136
  @include transition(map-get($link, transition));
133
137
  }
134
138
 
@@ -96,7 +96,7 @@ $link: (
96
96
  );
97
97
 
98
98
  $button: (
99
- padding-y-lg: .5rem,
99
+ padding-y-lg: .3rem,
100
100
  padding-x-lg: 1.2rem,
101
101
 
102
102
  padding-y: .1rem,
@@ -107,9 +107,11 @@ $button: (
107
107
 
108
108
  font-weight: map-get($base, font-weight-bold),
109
109
 
110
- circle-diameter-lg: 3rem,
110
+ pill-radius: 4rem,
111
+
112
+ circle-diameter-lg: 2.8rem,
111
113
  circle-diameter: 2rem,
112
- circle-diameter-sm: 1.2rem,
114
+ circle-diameter-sm: 1.5rem,
113
115
 
114
116
  transition: all .2s ease-in-out
115
117
  );
@@ -0,0 +1,115 @@
1
+ @mixin clickable($clr, $bg-clr, $hover-clr: default, $hover-bg-clr: default, $active-clr: default, $active-bg-clr: default, $focus-clr: default, $focus-bg-clr: default, $theme: default) {
2
+
3
+ @if $theme == default {
4
+ @if $bg-clr == null and $hover-bg-clr == null {
5
+ @if $hover-clr == default {
6
+ $theme: get-color-theme($clr);
7
+ } @else {
8
+ $theme: get-color-theme($hover-clr);
9
+ }
10
+ } @else {
11
+ @if $hover-bg-clr == default {
12
+ $theme: get-color-theme($bg-clr);
13
+ } @else {
14
+ $theme: get-color-theme($hover-bg-clr);
15
+ }
16
+ }
17
+ }
18
+
19
+ // hover
20
+ @if $hover-clr == default {
21
+ @if $hover-bg-clr == null {
22
+ @if $theme == 'light' {
23
+ $hover-clr: darken($clr, 14%);
24
+ }
25
+ @if $theme == 'dark' {
26
+ $hover-clr: lighten($clr, 18%);
27
+ }
28
+ } @else if $hover-bg-clr == default {
29
+ $hover-clr: $clr
30
+ }
31
+ }
32
+
33
+ @if $hover-bg-clr == default {
34
+ @if $theme == 'light' {
35
+ $hover-bg-clr: darken($bg-clr, 14%);
36
+ }
37
+ @if $theme == 'dark' {
38
+ $hover-bg-clr: lighten($bg-clr, 18%);
39
+ }
40
+ }
41
+
42
+ // active
43
+ @if $active-clr == default {
44
+ @if $active-bg-clr == null {
45
+ @if $theme == 'light' {
46
+ $active-clr: darken($hover-clr, 15%);
47
+ }
48
+ @if $theme == 'dark' {
49
+ $active-clr: lighten($hover-clr, 16%);
50
+ }
51
+ } @else if $active-bg-clr == default {
52
+ $active-clr: $hover-clr;
53
+ }
54
+ }
55
+
56
+ @if $active-bg-clr == default {
57
+ @if $theme == 'light' {
58
+ $active-bg-clr: darken($hover-bg-clr, 15%);
59
+ }
60
+ @if $theme == 'dark' {
61
+ $active-bg-clr: lighten($hover-bg-clr, 16%);
62
+ }
63
+ }
64
+
65
+ // focus
66
+ @if $focus-clr == default {
67
+ @if $focus-bg-clr == null {
68
+ $focus-clr: $hover-clr;
69
+ } @else if $hover-bg-clr == default {
70
+ $focus-clr: $hover-clr;
71
+ }
72
+ }
73
+
74
+ @if $focus-bg-clr == default {
75
+ $focus-bg-clr: $hover-bg-clr;
76
+ }
77
+
78
+ @include plain {
79
+ color: $clr;
80
+ @if $bg-clr {
81
+ background-color: $bg-clr;
82
+ }
83
+ svg path {
84
+ fill: $clr;
85
+ }
86
+ }
87
+ @include hover {
88
+ color: $hover-clr;
89
+ @if $hover-bg-clr {
90
+ background-color: $hover-bg-clr;
91
+ }
92
+ svg path {
93
+ fill: $hover-clr;
94
+ }
95
+ }
96
+ @include active {
97
+ color: $active-clr;
98
+ @if $active-bg-clr {
99
+ background-color: $active-bg-clr;
100
+ }
101
+ svg path {
102
+ fill: $active-clr;
103
+ }
104
+ }
105
+ @include focus {
106
+ color: $focus-clr;
107
+ @if $focus-bg-clr{
108
+ box-shadow: 0 0 0 2px rgba($focus-bg-clr, .4);
109
+ background-color: $focus-bg-clr;
110
+ }
111
+ svg path {
112
+ fill: $focus-clr;
113
+ }
114
+ }
115
+ }
@@ -1,34 +1,65 @@
1
- @mixin link-colors($clr, $hover-clr: default, $active-clr: default, $focus-clr: null) {
2
- @if $hover-clr == default {
3
- $hover-clr: $clr;
4
- }
5
- @if $active-clr == default {
6
- $active-clr: $clr;
7
- }
8
- @include plain {
9
- color: $clr;
10
- svg path {
11
- fill: $clr;
12
- }
13
- }
14
- @include hover {
15
- color: $hover-clr;
16
- svg path {
17
- fill: $hover-clr;
18
- }
19
- }
20
- @include active {
21
- color: $active-clr;
22
- svg path {
23
- fill: $active-clr;
24
- }
25
- }
26
- @if $focus-clr {
27
- @include focus {
28
- color: $focus-clr;
29
- svg path {
30
- fill: $focus-clr;
31
- }
32
- }
33
- }
1
+ @mixin link-colors($clr, $hover-clr: default, $active-clr: default, $focus-clr: null, $theme: default) {
2
+ @include clickable($clr, null, $hover-clr, null, $active-clr, null, $focus-clr, null, $theme: default);
3
+
4
+ // @if $theme == default {
5
+ // @if $hover-clr == default {
6
+ // $theme: get-color-theme($clr);
7
+ // } @else {
8
+ // $theme: get-color-theme($hover-clr);
9
+ // }
10
+ // }
11
+
12
+ // @if $hover-clr == default {
13
+ // @if $theme == 'light' {
14
+ // $hover-clr: darken($clr, 14%);
15
+ // }
16
+ // @if $theme == 'dark' {
17
+ // $hover-clr: lighten($clr, 18%);
18
+ // }
19
+ // }
20
+
21
+ // @if $active-clr == default {
22
+ // @if $theme == 'light' {
23
+ // $active-clr: darken($hover-clr, 15%);
24
+ // }
25
+ // @if $theme == 'dark' {
26
+ // $active-clr: lighten($hover-clr, 16%);
27
+ // }
28
+ // }
29
+
30
+ // @if $focus-clr == default {
31
+ // @if $theme == 'light' {
32
+ // $focus-clr: $hover-clr;
33
+ // }
34
+ // @if $theme == 'dark' {
35
+ // $focus-clr: $hover-clr;
36
+ // }
37
+ // }
38
+
39
+ // @include plain {
40
+ // color: $clr;
41
+ // svg path {
42
+ // fill: $clr;
43
+ // }
44
+ // }
45
+ // @include hover {
46
+ // color: $hover-clr;
47
+ // svg path {
48
+ // fill: $hover-clr;
49
+ // }
50
+ // }
51
+ // @include active {
52
+ // color: $active-clr;
53
+ // svg path {
54
+ // fill: $active-clr;
55
+ // }
56
+ // }
57
+ // @if $focus-clr {
58
+ // @include focus {
59
+ // color: $focus-clr;
60
+ // svg path {
61
+ // fill: $focus-clr;
62
+ // }
63
+ // }
64
+ // }
34
65
  }
@@ -7,20 +7,20 @@
7
7
  }
8
8
 
9
9
  @mixin hover() {
10
- &:hover {
10
+ .root[data-is-touch="false"] &:hover {
11
11
  @content;
12
12
  }
13
13
  }
14
14
 
15
15
  @mixin active() {
16
- &.active,
17
- &:active {
16
+ .root[data-is-touch] &.active,
17
+ .root[data-is-touch] &:active {
18
18
  @content;
19
19
  }
20
20
  }
21
21
 
22
22
  @mixin focus() {
23
- &.focus {
23
+ .root[data-is-touch] &.focus {
24
24
  @content;
25
25
  }
26
26
  }
@@ -28,11 +28,23 @@
28
28
  $_dirs: ('top', 'bottom');
29
29
  }
30
30
  @else if ($direction == '') {
31
- $_dirs: ('top', 'bottom', 'left', 'right');
31
+ $_dirs: ('');
32
32
  }
33
33
 
34
34
  @each $dir in $_dirs {
35
- #{$_type}-#{$dir} : map-get($spacers, $spacer);
35
+ @if ($spacer == 'auto') {
36
+ @if ($dir == '') {
37
+ #{$_type}: auto;
38
+ } @else {
39
+ #{$_type}-#{$dir}: auto;
40
+ }
41
+ } @else {
42
+ @if ($dir == '') {
43
+ #{$_type}: map-get($spacers, $spacer);
44
+ } @else {
45
+ #{$_type}-#{$dir}: map-get($spacers, $spacer);
46
+ }
47
+ }
36
48
  }
37
49
  }
38
50
 
@@ -49,4 +61,10 @@ $_spacers: (0, 1, 2, 3, 4, 5);
49
61
  }
50
62
  }
51
63
  }
64
+ }
65
+
66
+ @each $j in $_directions {
67
+ .m#{$j}-auto {
68
+ @include make-spacing('m', $j, 'auto');
69
+ }
52
70
  }
@@ -1,73 +1,3 @@
1
- @mixin button-colors($clr, $bg-clr, $hover-clr: default, $hover-bg-clr: default, $active-clr: default, $active-bg-clr: default, $focus-clr: default, $focus-bg-clr: default, $theme: default) {
2
- @if $theme == default {
3
- $theme: light;
4
- }
5
- @if $hover-clr == default {
6
- $hover-clr: $clr
7
- }
8
- @if $hover-bg-clr == default {
9
- @if $theme == 'light' {
10
- $hover-bg-clr: darken($bg-clr, 13%);
11
- }
12
- @if $theme == 'dark' {
13
- $hover-bg-clr: lighten($bg-clr, 23%);
14
- }
15
- }
16
-
17
- @if $active-clr == default {
18
- $active-clr: $clr
19
- }
20
- @if $active-bg-clr == default {
21
- @if $theme == 'light' {
22
- $active-bg-clr: darken($bg-clr, 13%);
23
- }
24
- @if $theme == 'dark' {
25
- $active-bg-clr: lighten($bg-clr, 23%);
26
- }
27
- }
28
-
29
- @if $focus-clr == default {
30
- $focus-clr: $clr
31
- }
32
- @if $focus-bg-clr == default {
33
- @if $theme == 'light' {
34
- $focus-bg-clr: darken($bg-clr, 13%);
35
- }
36
- @if $theme == 'dark' {
37
- $focus-bg-clr: lighten($bg-clr, 23%);
38
- }
39
- }
40
- @include plain {
41
- color: $clr;
42
- background-color: $bg-clr;
43
- svg path {
44
- fill: $clr;
45
- }
46
- }
47
- @include hover {
48
- color: $hover-clr;
49
- background-color: $hover-bg-clr;
50
- svg path {
51
- fill: $hover-clr;
52
- }
53
- }
54
- @include active {
55
- color: $active-clr;
56
- background-color: $active-bg-clr;
57
- svg path {
58
- fill: $active-clr;
59
- }
60
- }
61
- @include focus {
62
- color: $focus-clr;
63
- @include box-shadow(2, $focus-bg-clr);
64
- background-color: $focus-bg-clr;
65
- svg path {
66
- fill: $focus-clr;
67
- }
68
- }
69
- }
70
-
71
1
  @mixin button() {
72
2
  font-weight: map-get($button, font-weight);
73
3
  line-height: map-get($base, line-height);
@@ -75,6 +5,7 @@
75
5
  display: inline-block;
76
6
  cursor: pointer;
77
7
  text-decoration: none !important;
8
+ @include user-select(none);
78
9
  @include transition(map-get($button, transition));
79
10
  svg {
80
11
  width: 1rem;
@@ -99,67 +30,67 @@
99
30
  }
100
31
 
101
32
  .button--primary {
102
- @include button-colors($text-color-1, $main-color-1);
33
+ @include clickable($text-color-1, $main-color-1);
103
34
  }
104
35
 
105
36
  .button--secondary {
106
- @include button-colors($text-color-3, $main-color-3);
37
+ @include clickable($text-color-3, $main-color-3);
107
38
  }
108
39
 
109
40
  .button--success {
110
- @include button-colors($text-color-function, $green);
41
+ @include clickable($text-color-function, $green);
111
42
  }
112
43
 
113
44
  .button--info {
114
- @include button-colors($text-color-function, $blue);
45
+ @include clickable($text-color-function, $blue);
115
46
  }
116
47
 
117
48
  .button--warning {
118
- @include button-colors($text-color-function, $yellow);
49
+ @include clickable($text-color-function, $yellow);
119
50
  }
120
51
 
121
52
  .button--error {
122
- @include button-colors($text-color-function, $red);
53
+ @include clickable($text-color-function, $red);
123
54
  }
124
55
 
125
56
  .button--outline-primary {
126
57
  color: $main-color-1;
127
58
  border: 1px solid $main-color-1;
128
- @include button-colors($main-color-1, transparent, $text-color-1, $main-color-1, $text-color-1, $main-color-1, $text-color-1, $main-color-1);
59
+ @include clickable($main-color-1, transparent, $text-color-1, $main-color-1);
129
60
  }
130
61
 
131
62
  .button--outline-secondary {
132
63
  color: $main-color-3;
133
64
  border: 1px solid $main-color-3;
134
- @include button-colors($main-color-3, transparent, $text-color-3, $main-color-3, $text-color-3, $main-color-3, $text-color-3, $main-color-3);
65
+ @include clickable($main-color-3, transparent, $text-color-3, $main-color-3);
135
66
  }
136
67
 
137
68
  .button--outline-success {
138
69
  color: $green;
139
70
  border: 1px solid $green;
140
- @include button-colors($green, transparent, $text-color-function, $green, $text-color-function, $green, $text-color-function, $green);
71
+ @include clickable($green, transparent, $text-color-function, $green);
141
72
  }
142
73
 
143
74
  .button--outline-info {
144
75
  color: $blue;
145
76
  border: 1px solid $blue;
146
- @include button-colors($blue, transparent, $text-color-function, $blue, $text-color-function, $blue, $text-color-function, $blue);
77
+ @include clickable($blue, transparent, $text-color-function, $blue);
147
78
  }
148
79
 
149
80
  .button--outline-warning {
150
81
  color: $yellow;
151
82
  border: 1px solid $yellow;
152
- @include button-colors($yellow, transparent, $text-color-function, $yellow, $text-color-function, $yellow, $text-color-function, $yellow);
83
+ @include clickable($yellow, transparent, $text-color-function, $yellow);
153
84
  }
154
85
 
155
86
  .button--outline-error {
156
87
  color: $red;
157
88
  border: 1px solid $red;
158
- @include button-colors($red, transparent, $text-color-function, $red, $text-color-function, $red, $text-color-function, $red);
89
+ @include clickable($red, transparent, $text-color-function, $red);
159
90
  }
160
91
 
161
92
  .button--pill {
162
- border-radius: 2rem;
93
+ border-radius: map-get($button, pill-radius);
163
94
  @extend .button--md;
164
95
  }
165
96
 
@@ -16,20 +16,10 @@ ul.toc {
16
16
  display: inline-block;
17
17
  padding: .2rem .8rem .2rem .8rem;
18
18
  border-radius: map-get($base, border-radius);
19
+ text-decoration: none !important;
19
20
  @include link-colors($text-color);
20
- @include plain() {
21
- text-decoration: none;
22
- }
23
21
  @include hover() {
24
- color: $text-color-3;
25
22
  background-color: $main-color-3;
26
- text-decoration: none;
27
- }
28
- @include active() {
29
- text-decoration: none;
30
- }
31
- @include focus() {
32
- text-decoration: none;
33
23
  }
34
24
  }
35
25
 
@@ -38,7 +28,7 @@ ul.toc {
38
28
  padding: .8rem 0 .3rem 0;
39
29
  margin-bottom: .6rem;
40
30
  &, a {
41
- color: $text-color-d;
31
+ @include link-colors($text-color-d);
42
32
  }
43
33
  }
44
34
  .toc-h1,
@@ -58,7 +48,7 @@ ul.toc {
58
48
  .toc-h5,
59
49
  .toc-h6 {
60
50
  &, a {
61
- color: $text-color-l;
51
+ @include link-colors($text-color-l);
62
52
  }
63
53
  }
64
54
  .toc-h3 {
@@ -110,7 +100,7 @@ ul.toc--navigator {
110
100
  .toc-h3,
111
101
  .toc-h4 {
112
102
  &, a {
113
- @include link-colors($text-color-l, $main-color-1, $main-color-1);
103
+ @include link-colors($text-color-l);
114
104
  }
115
105
  }
116
106
 
@@ -8,7 +8,7 @@
8
8
  position: relative;
9
9
  margin-top: map-get($base, vertical-space-lg) * 1.5;
10
10
  & > .anchor {
11
- @include link-colors($border-color, $main-color-1, $main-color-1);
11
+ @include link-colors($border-color, $main-color-1);
12
12
  margin-left: .2rem;
13
13
  visibility: hidden;
14
14
  text-decoration: none;
@@ -17,7 +17,7 @@
17
17
  font-size: map-get($base, font-size-sm);
18
18
  }
19
19
  }
20
- &:hover {
20
+ @include hover() {
21
21
  & > .anchor {
22
22
  visibility: visible;
23
23
  opacity: 1;
@@ -15,7 +15,7 @@
15
15
  font-size: map-get($base, font-size-lg);
16
16
  font-weight: map-get($base, font-weight-bold);
17
17
  a {
18
- @include link-colors($text-color, $text-color, $text-color);
18
+ @include link-colors($text-color, $main-color-1);
19
19
  }
20
20
  }
21
21
  .left-col {
@@ -3,28 +3,28 @@
3
3
  margin: 0;
4
4
  & > li > {
5
5
  .mail-button {
6
- @include button-colors($text-color-1, $mail-color);
6
+ @include clickable($text-color-1, $mail-color);
7
7
  }
8
8
  .weibo-button {
9
- @include button-colors($text-color-1, $weibo-color);
9
+ @include clickable($text-color-1, $weibo-color);
10
10
  }
11
11
  .facebook-button {
12
- @include button-colors($text-color-1, $facebook-color);
12
+ @include clickable($text-color-1, $facebook-color);
13
13
  }
14
14
  .twitter-button {
15
- @include button-colors($text-color-1, $twitter-color);
15
+ @include clickable($text-color-1, $twitter-color);
16
16
  }
17
17
  .googlepluse-button {
18
- @include button-colors($text-color-1, $google-plus-color);
18
+ @include clickable($text-color-1, $google-plus-color);
19
19
  }
20
20
  .github-button {
21
- @include button-colors($text-color-1, $github-color, default, default, default, default, default, default, 'dark');
21
+ @include clickable($text-color-1, $github-color);
22
22
  }
23
23
  .linkedin-button {
24
- @include button-colors($text-color-1, $linkedin-color);
24
+ @include clickable($text-color-1, $linkedin-color);
25
25
  }
26
26
  .douban-button {
27
- @include button-colors($text-color-1, $douban-color);
27
+ @include clickable($text-color-1, $douban-color);
28
28
  }
29
29
  }
30
30
  }
@@ -14,7 +14,7 @@
14
14
  color: $text-color-3;
15
15
  }
16
16
  a {
17
- @include link-colors ($text-color-3, $main-color-1, $main-color-1);
17
+ @include link-colors ($text-color-3, $main-color-1);
18
18
  }
19
19
  .site-info {
20
20
  text-align: center;
@@ -1,8 +1,8 @@
1
1
  .header {
2
2
  a {
3
3
  font-weight: map-get($base, font-weight);
4
- text-decoration: none;
5
- @include link-colors($text-color, $main-color-1, $main-color-1);
4
+ text-decoration: none !important;
5
+ @include link-colors($text-color, $main-color-1);
6
6
  }
7
7
  & > .main > .logo {
8
8
  float: left;
@@ -50,7 +50,7 @@
50
50
  &.active {
51
51
  @include split-line(bottom, 4px, $main-color-1);
52
52
  a {
53
- @include link-colors($main-color-1, $main-color-1, $main-color-1);
53
+ @include link-colors($main-color-1, $main-color-1);
54
54
  }
55
55
  }
56
56
  }
@@ -9,15 +9,15 @@
9
9
  }
10
10
  }
11
11
  .tag-button-1 {
12
- @include button-colors($text-color-1, rgba($main-color-1, .4), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
12
+ @include clickable($text-color-1, rgba($main-color-1, .4), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
13
13
  }
14
14
  .tag-button-2 {
15
- @include button-colors($text-color-1, rgba($main-color-1, .55), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
15
+ @include clickable($text-color-1, rgba($main-color-1, .55), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
16
16
  }
17
17
  .tag-button-3 {
18
- @include button-colors($text-color-1, rgba($main-color-1, .7), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
18
+ @include clickable($text-color-1, rgba($main-color-1, .7), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
19
19
  }
20
20
  .tag-button-4 {
21
- @include button-colors($text-color-1, rgba($main-color-1, .9), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
21
+ @include clickable($text-color-1, rgba($main-color-1, .9), default, default, $text-color-2,$main-color-2, $text-color-2,$main-color-2);
22
22
  }
23
23
  }
@@ -1,4 +1,4 @@
1
- .layout--all {
1
+ .layout--archive {
2
2
  .site-tags {
3
3
  margin-bottom: map-get($base, vertical-space-lg) * 2;
4
4
  display: block;
@@ -13,41 +13,35 @@
13
13
  width: 100%;
14
14
  }
15
15
  & > input {
16
- border-radius: 2rem;
17
- padding: .2rem 1.8rem;
18
- @include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
19
16
  -webkit-appearance: none; /* fix iOS don't display box-shadow properly */
20
- width: 100%;
21
17
  display: inline-block;
22
- border: none;
18
+ width: 100%;
19
+ padding: .2rem 1.8rem;
23
20
  margin: 0;
24
- background-color: $text-background-color;
25
- @include focus() {
26
- @include box-shadow();
27
- }
21
+ border: none;
22
+ border-radius: map-get($button, pill-radius);
23
+ @include clickable($text-color, $text-background-color);
24
+ @include transition(box-shadow map-get($animation, duration) map-get($animation, timing-function));
28
25
  }
29
- & > .icon-search, & > .icon-clear {
26
+ & > .search-box__icon-search, & > .search-box__icon-clear {
30
27
  position: absolute;
28
+ vertical-align: middle;
31
29
  top: 50%;
32
30
  @include transform(translateY(-50%));
33
- display: inline-block;
34
- vertical-align: middle;
35
- font-size: map-get($base , font-size-sm);
36
31
  }
37
- &.not-empty > .icon-clear {
32
+ &.not-empty > .search-box__icon-clear {
38
33
  display: block;
39
34
  }
40
- & > .icon-clear {
35
+ & > .search-box__icon-clear {
41
36
  display: none;
42
- right: .8rem;
43
- @include link-colors($text-color-l, $text-color-d);
37
+ right: .3rem;
44
38
  }
45
- & > .icon-search {
39
+ & > .search-box__icon-search {
46
40
  left: .5rem;
47
41
  }
48
42
  }
49
43
 
50
- & > .layout--all__result {
44
+ & > .layout--archive__result {
51
45
  margin: map-get($base, vertical-space-lg) 0;
52
46
  section {
53
47
  &:not(:last-child) {
@@ -68,7 +62,7 @@
68
62
  }
69
63
  .link {
70
64
  font-size: 1rem;
71
- @include link-colors($text-color-d, $main-color-1, $main-color-1);
65
+ @include link-colors($text-color-d, $main-color-1);
72
66
  }
73
67
  }
74
68
  }
@@ -77,7 +71,7 @@
77
71
  & > .site-tags {
78
72
  display: none;
79
73
  }
80
- & > .layout--all__result {
74
+ & > .layout--archive__result {
81
75
  section {
82
76
  ul > li {
83
77
  .date {
@@ -5,13 +5,11 @@
5
5
  font-size: map-get($base, font-size-sm);
6
6
  color: $text-color-l;
7
7
  .article__license {
8
- position: relative;
9
8
  img {
10
- height: map-get($base, font-size-sm) * 1.5;
11
- vertical-align: text-bottom;
9
+ height: map-get($base, font-size) * 1.6;
12
10
  }
13
11
  a {
14
- @include link-colors($text-color, $main-color-1, $main-color-1);
12
+ @include link-colors($text-color, $main-color-1);
15
13
  }
16
14
  }
17
15
  }
@@ -28,7 +26,7 @@
28
26
  }
29
27
  & > a {
30
28
  display: block;
31
- @include link-colors($text-color, $main-color-1, $main-color-1);
29
+ @include link-colors($text-color, $main-color-1);
32
30
  }
33
31
  }
34
32
  & > .previous {
@@ -4,7 +4,7 @@
4
4
  & > h1, h2 {
5
5
  font-size: map-get($base, font-size-h3);
6
6
  & > a {
7
- @include link-colors($text-color-d, $main-color-1, $main-color-1);
7
+ @include link-colors($text-color-d, $main-color-1);
8
8
  }
9
9
  }
10
10
  & > a {
@@ -16,7 +16,7 @@
16
16
  height: 100%;
17
17
  min-height: 100%;
18
18
 
19
- .col-2 {
19
+ .col-aside {
20
20
  display: none;
21
21
  float: right;
22
22
  & > aside {
@@ -40,12 +40,8 @@
40
40
  header, h1 {
41
41
  display: inline;
42
42
  }
43
- .edit-on-github-button {
44
- vertical-align: text-bottom;
45
- margin-left: map-get($spacers, 3);
46
- @include media-breakpoint-down(md) {
47
- display: none;
48
- }
43
+ .edit-on-github {
44
+ text-decoration: none !important;
49
45
  }
50
46
  }
51
47
 
@@ -62,7 +58,7 @@
62
58
  }
63
59
 
64
60
  .sidebar-button {
65
- @include button-colors($text-color-d, rgba($main-color-3, .75));
61
+ @include clickable($text-color-d, rgba($main-color-3, .75));
66
62
  border: 1px $border-color solid;
67
63
  }
68
64
 
@@ -98,7 +94,6 @@
98
94
  .toc-aside {
99
95
  padding: 1rem 0 1rem 3rem;
100
96
  }
101
-
102
97
  }
103
98
 
104
99
  .page__footer {
@@ -109,13 +104,13 @@
109
104
 
110
105
  .has-aside {
111
106
  .page__main-inner{
112
- .col-1 {
107
+ .col-main {
113
108
  margin-right: map-get($layout, aside-width);
114
109
  @include media-breakpoint-down(lg) {
115
110
  margin-right: 0;
116
111
  }
117
112
  }
118
- .col-2 {
113
+ .col-aside {
119
114
  width: map-get($layout, aside-width);
120
115
  position: relative;
121
116
  display: block;
data/assets/css/main.scss CHANGED
@@ -14,6 +14,7 @@
14
14
 
15
15
  "common/variables",
16
16
  "common/highlighting",
17
+ "common/function",
17
18
  "common/classes",
18
19
  "common/reset",
19
20
  "common/components/button",
@@ -31,7 +32,6 @@
31
32
  "components/article.content",
32
33
  "components/tags",
33
34
  "components/follow-me",
34
- "components/license",
35
35
  "components/footer",
36
36
 
37
37
  "additional/alert",
@@ -39,7 +39,7 @@
39
39
 
40
40
  "layout/page",
41
41
  "layout/home",
42
- "layout/all",
42
+ "layout/archive",
43
43
  "layout/article",
44
44
  "layout/landing",
45
45
  "layout/404"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-text-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kitian616
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-01 00:00:00.000000000 Z
11
+ date: 2018-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -125,11 +125,11 @@ files:
125
125
  - _includes/analytics-providers/custom.html
126
126
  - _includes/analytics-providers/google.html
127
127
  - _includes/analytics.html
128
+ - _includes/article-footer/author-profile.html
128
129
  - _includes/article-footer/custom.html
129
130
  - _includes/article-footer/license.html
130
131
  - _includes/article-info.html
131
132
  - _includes/aside/toc.html
132
- - _includes/author-profile.html
133
133
  - _includes/comments-providers/custom.html
134
134
  - _includes/comments-providers/disqus.html
135
135
  - _includes/comments-providers/gitalk.html
@@ -204,11 +204,13 @@ files:
204
204
  - _sass/animate/_fade-in-down.scss
205
205
  - _sass/animate/_fade-in.scss
206
206
  - _sass/common/_classes.scss
207
+ - _sass/common/_function.scss
207
208
  - _sass/common/_highlighting.scss
208
209
  - _sass/common/_reset.scss
209
210
  - _sass/common/_variables.scss
210
211
  - _sass/common/classes/_animation.scss
211
212
  - _sass/common/classes/_clearfix.scss
213
+ - _sass/common/classes/_clickable.scss
212
214
  - _sass/common/classes/_flex.scss
213
215
  - _sass/common/classes/_grid.scss
214
216
  - _sass/common/classes/_horizontal-rules.scss
@@ -232,11 +234,10 @@ files:
232
234
  - _sass/components/_follow-me.scss
233
235
  - _sass/components/_footer.scss
234
236
  - _sass/components/_header.scss
235
- - _sass/components/_license.scss
236
237
  - _sass/components/_main.scss
237
238
  - _sass/components/_tags.scss
238
239
  - _sass/layout/_404.scss
239
- - _sass/layout/_all.scss
240
+ - _sass/layout/_archive.scss
240
241
  - _sass/layout/_article.scss
241
242
  - _sass/layout/_home.scss
242
243
  - _sass/layout/_landing.scss
@@ -1,2 +0,0 @@
1
- .license {
2
- }