jekyll-text-theme 2.2.1 → 2.2.2

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: 74fbab02e8f576ce07b16b9de824b112f09844ac
4
- data.tar.gz: 9b07af90dd375dc0b3258f7dd91ca320c7d22be3
3
+ metadata.gz: 8a289b47d206254efdcf0ec13b4742d243a955fa
4
+ data.tar.gz: 45a185a5d48104725984416c8dc933a1b396874a
5
5
  SHA512:
6
- metadata.gz: 3278366fe5b00e316295aa716374cd7b56c706ccd97391d990f01b616a55bff96c62e95f612417ecad239294363e32be8993fc2f5e64a7dffb280d159a72be24
7
- data.tar.gz: b7a1760da02654e1838fef2fb594e1086f9fa2ed44b8eed3147e5bc715804feb73830a99d31e0c75d1cb68beea385a8d9528188e3d49aa6b5495801cb8ea98a3
6
+ metadata.gz: 6e9f7f16c8755e9764a9fdc09bdcd61d584b6f72a69f3f2b56f2801f74c094d42dfe542cfb2d2b5e81ca95cd53a81bf46a4ee3bcc4841c18e141ef9ae461638f
7
+ data.tar.gz: 93fd25d5153d4d2e4321ccc0e43542943db65d4e68e9de7bbc7a5d870ed05cd59fab02af97f50108d5d3b44478e41e0abd44d10db2e89b7cf0e7aa0d52e254a5
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.2.2 (2018-11-21)
4
+
5
+ ### Enhancements
6
+
7
+ - Add extensions for audios (SoundCloud, Netease Cloud Music), videos (YouTube, TED, bilibili) and slide(SlideShare)
8
+ - Add sharing (AddToAny)
9
+
3
10
  ## 2.2.1 (2018-10-02)
4
11
 
5
12
  ### Enhancements
@@ -7,7 +14,7 @@
7
14
  - Update screenshots
8
15
  - landing Layout `data.sections` item's `image` add `full_width` setting
9
16
  - Remove `header.type` and add `header.background` setting
10
- - page Layout width sidebar use document scroll when viewport width < 1024px, this enhance the user experience on a phone or a pad
17
+ - page layout sidebar use document scroll when viewport width < 1024px, this enhance the user experience on a phone or a pad
11
18
  - Telegram social icon (@WangQiru)
12
19
  - Search panel use dark background
13
20
 
data/README.md CHANGED
@@ -28,6 +28,7 @@ TeXt is a super customizable Jekyll theme for personal site, team site, blog, pr
28
28
  - Flowchart, Sequence diagram, Gantt diagram ([mermaid](https://mermaidjs.github.io/))
29
29
  - Line Chart, Bar Chart, Radar Chart, Pie Chart ([chartjs](http://www.chartjs.org/))
30
30
  - Page views ([LeanCloud](https://leancloud.cn/))
31
+ - Share ([AddToAny](https://www.addtoany.com/))
31
32
  - Comments ([Disqus](https://disqus.com/))
32
33
  - Google Analytics
33
34
 
@@ -69,8 +70,9 @@ TeXt use [Tomorrow](https://github.com/chriskempson/tomorrow-theme) as the highl
69
70
  ### Content
70
71
 
71
72
  - [Writing Posts](https://tianqi.name/jekyll-TeXt-theme/docs/en/writing-posts)
72
- - [Markdown Enhancements](https://tianqi.name/jekyll-TeXt-theme/docs/en/markdown-enhancements)
73
73
  - [Additional styles](https://tianqi.name/jekyll-TeXt-theme/docs/en/additional-styles)
74
+ - [Extensions](https://tianqi.name/jekyll-TeXt-theme/docs/en/extensions)
75
+ - [Markdown Enhancements](https://tianqi.name/jekyll-TeXt-theme/docs/en/markdown-enhancements)
74
76
 
75
77
  ## Demo Pages
76
78
 
@@ -32,6 +32,7 @@ default:
32
32
  show_tags: true
33
33
  show_author_profile: false
34
34
  full_width: false
35
+ sharing: false
35
36
  comment: true
36
37
  license: false
37
38
  pageview: false
@@ -0,0 +1,5 @@
1
+ <div class="extensions extensions--video">
2
+ <iframe src="//player.bilibili.com/player.html?aid={{ include.id }}&page=1"
3
+ frameborder="no" scrolling="no" allowfullscreen="true">
4
+ </iframe>
5
+ </div>
@@ -0,0 +1,4 @@
1
+ <iframe class="extensions extensions--audio" width="330" height="86"
2
+ src="//music.163.com/outchain/player?type=2&id={{ include.id }}&auto=1&height=66"
3
+ frameborder="no" border="0" marginwidth="0" marginheight="0">
4
+ </iframe>
@@ -0,0 +1,6 @@
1
+ <div class="extensions extensions--slide">
2
+ <iframe src="//www.slideshare.net/slideshow/embed_code/key/{{ include.id }}"
3
+ width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"
4
+ style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen>
5
+ </iframe>
6
+ </div>
@@ -0,0 +1,4 @@
1
+ <iframe class="extensions extensions--audio" width="100%" height="166"
2
+ src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/{{ include.id }}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true"
3
+ scrolling="no" frameborder="no" allow="autoplay">
4
+ </iframe>
@@ -0,0 +1,5 @@
1
+ <div class="extensions extensions--video">
2
+ <iframe src="https://embed.ted.com/talks/{{ include.id }}"
3
+ frameborder="0" scrolling="no" allowfullscreen>
4
+ </iframe>
5
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="extensions extensions--video">
2
+ <iframe src="https://www.youtube.com/embed/{{ include.id }}?showinfo=0"
3
+ frameborder="0" scrolling="no" allowfullscreen></iframe>
4
+ </div>
@@ -7,7 +7,7 @@
7
7
  <script>
8
8
  (function() {
9
9
  var TEXT_VARIABLES = {
10
- version: '2.2.1',
10
+ version: '2.2.2',
11
11
  sources: {
12
12
  font_awesome: '{{ _sources.font_awesome }}',
13
13
  jquery: '{{ _sources.jquery }}',
@@ -0,0 +1,10 @@
1
+ <!-- AddToAny BEGIN -->
2
+ <div class="a2a_kit a2a_kit_size_32 a2a_default_style">
3
+ <a class="a2a_dd" href="https://www.addtoany.com/share"></a>
4
+ <a class="a2a_button_facebook"></a>
5
+ <a class="a2a_button_twitter"></a>
6
+ <a class="a2a_button_google_plus"></a>
7
+ <a class="a2a_button_linkedin"></a>
8
+ </div>
9
+ <script async src="https://static.addtoany.com/menu/page.js"></script>
10
+ <!-- AddToAny END -->
@@ -0,0 +1,3 @@
1
+ {%- if site.sharing.provider == 'addtoany' -%}
2
+ {%- include sharing-providers/addtoany.html -%}
3
+ {%- endif -%}
@@ -4,8 +4,9 @@ title: 404
4
4
  show_title: false
5
5
  ---
6
6
  <div class="layout--404">
7
- <div class="main">
7
+ <div class="sign">
8
8
  <h1>404</h1>
9
+ <p>Page not found :(</p>
9
10
  </div>
10
11
  </div>
11
12
 
@@ -3,11 +3,19 @@ layout: page
3
3
  type: article
4
4
  ---
5
5
 
6
- {%- include snippets/assign.html target=site.data.variables.default.page.show_author_profile
6
+ {%- include snippets/assign.html
7
+ target = site.data.variables.default.page.sharing
8
+ source0=layout.sharing source1=page.sharing -%}
9
+ {%- assign _sharing = __return -%}
10
+
11
+
12
+ {%- include snippets/assign.html
13
+ target=site.data.variables.default.page.show_author_profile
7
14
  source0=layout.show_author_profile source1=page.show_author_profile -%}
8
15
  {%- assign _show_author_profile = __return -%}
9
16
 
10
- {%- include snippets/assign.html target=site.data.variables.default.page.license
17
+ {%- include snippets/assign.html
18
+ target=site.data.variables.default.page.license
11
19
  source0=layout.license source1=page.license -%}
12
20
  {%- assign _license = __return -%}
13
21
 
@@ -15,6 +23,10 @@ type: article
15
23
 
16
24
  <div class="article__content" itemprop="articleBody">{{ content }}</div>
17
25
 
26
+ {%- if _sharing != false -%}
27
+ <section class="article__sharing">{%- include sharing.html -%}</section>
28
+ {%- endif -%}
29
+
18
30
  <footer class="article__footer">
19
31
  {%- if page.modify_date -%}
20
32
  {%- include snippets/locale-to-string.html locale=site.data.locale.ARTICLE_DATE_FORMAT -%}
@@ -24,18 +24,19 @@ layout: base
24
24
 
25
25
  {%- if page.sidebar -%}
26
26
  <div class="layout--page layout--page--sidebar clearfix js-page-root">
27
- <div class="page__actions">
28
- <div class="button button--circle button--lg box-shadow-2 sidebar-button js-sidebar-show">
29
- <i class="fas fa-bars icon--show"></i>
30
- </div>
31
- </div>
32
27
  <div class="page__mask js-page-mask js-sidebar-hide"></div>
28
+ <div class="page__viewport">
29
+ <div class="page__actions">
30
+ <div class="button button--circle button--lg box-shadow-2 sidebar-button js-sidebar-show">
31
+ <i class="fas fa-bars icon--show"></i>
32
+ </div>
33
+ </div>
33
34
 
34
- <div class="grid page__grid page__viewport">
35
+ <div class="grid page__grid">
35
36
 
36
- <div class="page__sidebar">
37
- {%- include sidebar/toc.html -%}
38
- </div>
37
+ <div class="page__sidebar">
38
+ {%- include sidebar/toc.html -%}
39
+ </div>
39
40
 
40
41
  {%- else -%}
41
42
  <div class="layout--page js-page-root">
@@ -45,9 +46,9 @@ layout: base
45
46
  {%- if _page_mode == 'immersive' -%}
46
47
  {%- assign _page_main_class = _page_main_class | append: ' page__main--immersive' -%}
47
48
  {%- endif -%}
48
- {%- if page.sidebar != true -%}
49
+ {%- unless page.sidebar -%}
49
50
  {%- assign _page_main_class = _page_main_class | append: ' page__viewport' -%}
50
- {%- endif -%}
51
+ {%- endunless -%}
51
52
  {%- if page.aside -%}
52
53
  {%- assign _page_main_class = _page_main_class | append: ' has-aside' -%}
53
54
  {%- elsif _full_width -%}
@@ -198,7 +199,7 @@ layout: base
198
199
  {%- endif -%}
199
200
 
200
201
  <div class="js-article-content">{{ content }}</div>
201
- {%- if jekyll.environment != "development" and _comment != false -%}
202
+ {%- if _comment != false -%}
202
203
  <section class="page__comments">{%- include comments.html -%}</section>
203
204
  {%- endif -%}
204
205
  </article>
@@ -214,7 +215,8 @@ layout: base
214
215
  </div>
215
216
  </div> {%- comment -%} end page__main {%- endcomment -%}
216
217
  {%- if page.sidebar -%}
217
- </div> {%- comment -%} end grid {%- endcomment -%}
218
+ </div> {%- comment -%} end grid {%- endcomment -%}
219
+ </div> {%- comment -%} end page__viewport {%- endcomment -%}
218
220
  {%- endif -%}
219
221
  {%- if _header != false -%}
220
222
  <div class="page__search-panel">{%- include search.html -%}</div>
@@ -101,7 +101,8 @@ $responsive: (
101
101
  );
102
102
 
103
103
  $animation: (
104
- duration: .6s,
104
+ duration: .4s,
105
+ duration-sm: .2s,
105
106
  timing-function: ease-in-out
106
107
  );
107
108
 
@@ -1,4 +1,4 @@
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) {
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, $ignore-path: default) {
2
2
 
3
3
  @if $theme == default {
4
4
  @if $bg-clr == null and $hover-bg-clr == null {
@@ -16,6 +16,12 @@
16
16
  }
17
17
  }
18
18
 
19
+ @if $ignore-path == default {
20
+ $ignore-path: false;
21
+ } @else {
22
+ $ignore-path: true;
23
+ }
24
+
19
25
  // hover
20
26
  @if $hover-clr == default {
21
27
  @if $hover-bg-clr == null {
@@ -80,8 +86,10 @@
80
86
  @if $bg-clr {
81
87
  background-color: $bg-clr;
82
88
  }
83
- svg path {
84
- fill: $clr;
89
+ @if $ignore-path == false {
90
+ svg path {
91
+ fill: $clr;
92
+ }
85
93
  }
86
94
  }
87
95
  @include hover() {
@@ -89,8 +97,10 @@
89
97
  @if $hover-bg-clr {
90
98
  background-color: $hover-bg-clr;
91
99
  }
92
- svg path {
93
- fill: $hover-clr;
100
+ @if $ignore-path == false {
101
+ svg path {
102
+ fill: $hover-clr;
103
+ }
94
104
  }
95
105
  }
96
106
  @include active() {
@@ -98,8 +108,10 @@
98
108
  @if $active-bg-clr {
99
109
  background-color: $active-bg-clr;
100
110
  }
101
- svg path {
102
- fill: $active-clr;
111
+ @if $ignore-path == false {
112
+ svg path {
113
+ fill: $active-clr;
114
+ }
103
115
  }
104
116
  }
105
117
  @include focus() {
@@ -108,8 +120,10 @@
108
120
  background-color: $focus-bg-clr;
109
121
  box-shadow: 0 0 0 2px rgba($focus-bg-clr, .4);
110
122
  }
111
- svg path {
112
- fill: $focus-clr;
123
+ @if $ignore-path == false {
124
+ svg path {
125
+ fill: $focus-clr;
126
+ }
113
127
  }
114
128
  }
115
129
  }
@@ -1,3 +1,3 @@
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);
1
+ @mixin link-colors($clr, $hover-clr: default, $active-clr: default, $focus-clr: null, $theme: default, $ignore-path: false) {
2
+ @include clickable($clr, null, $hover-clr, null, $active-clr, null, $focus-clr, null, $theme, $ignore-path);
3
3
  }
@@ -2,7 +2,7 @@
2
2
  @if $breakpoints == default {
3
3
  $breakpoints: $responsive;
4
4
  }
5
- @media screen and (max-width: map-get($breakpoints, $name)) {
5
+ @media screen and (max-width: map-get($breakpoints, $name) - 1) {
6
6
  @content;
7
7
  }
8
8
  }
@@ -50,7 +50,7 @@
50
50
  .hero__content {
51
51
  margin: map-get($spacers, 5);
52
52
  @include media-breakpoint-down(lg) {
53
- margin: map-get($spacers, 5) map-get($spacers, 3);
53
+ margin: map-get($spacers, 5) map-get($spacers, 4);
54
54
  }
55
55
  @include media-breakpoint-down(md) {
56
56
  margin: map-get($spacers, 4) map-get($spacers, 3);
@@ -11,19 +11,17 @@
11
11
 
12
12
  .item__image {
13
13
  margin-right: map-get($spacers, 3);
14
- @include media-breakpoint-down(md) {
15
- margin-right: 0;
16
- }
17
- @include media-breakpoint-up(md) {
18
- & + .item__content {
14
+ & + .item__content {
15
+ & > :first-child {
16
+ margin-top: 0;
19
17
  & > :first-child {
20
18
  margin-top: 0;
21
- & > :first-child {
22
- margin-top: 0;
23
- }
24
19
  }
25
20
  }
26
21
  }
22
+ @include media-breakpoint-down(md) {
23
+ margin-right: 0;
24
+ }
27
25
  }
28
26
 
29
27
  .item__content {
@@ -76,7 +74,10 @@ a.item__header, .item__header > a {
76
74
  font-size: map-get($base, font-size-h6-xs);
77
75
  }
78
76
  img {
79
- max-height: 12rem;
77
+ max-height: 32rem;
78
+ @include media-breakpoint-down(md) {
79
+ max-height: 14rem;
80
+ }
80
81
  }
81
82
  }
82
83
  }
@@ -0,0 +1,29 @@
1
+ .extensions {
2
+ margin: map-get($base, vertical-space-lg) 0;
3
+ }
4
+
5
+ .extensions--video, .extensions--slide {
6
+ position: relative;
7
+ width: 100%;
8
+ padding: 0;
9
+ & > iframe {
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100%;
14
+ height: 100%;
15
+ }
16
+ }
17
+
18
+ .extensions--video {
19
+ padding-top: percentage(315 / 560);
20
+ }
21
+
22
+ .extensions--slide {
23
+ padding-top: percentage(487 / 599);
24
+ }
25
+
26
+ .extensions--audio {
27
+ display: block;
28
+ max-width: 100% !important;
29
+ }
@@ -97,6 +97,7 @@
97
97
  list-style-type: none;
98
98
  a {
99
99
  padding: .4rem 1rem;
100
+ @include transition(none);
100
101
  @include clickable($text-color, transparent, $text-color-3, $main-color-3);
101
102
  .search--light & {
102
103
  @include clickable($text-color-theme-light, transparent, $text-color-3, $main-color-3);
@@ -107,8 +108,13 @@
107
108
  }
108
109
  &.active {
109
110
  a {
110
- color: $text-color-3 !important;
111
- background-color: $main-color-3 !important;
111
+ @include plain() {
112
+ color: $text-color-3;
113
+ background-color: $main-color-3;
114
+ }
115
+ @include active() {
116
+ @include transition(map-get($link, transition));
117
+ }
112
118
  }
113
119
  }
114
120
  }
@@ -1,7 +1,14 @@
1
1
  .layout--404 {
2
- @include flexbox;
3
- @include align-items(center);
4
- & > .main > h1 {
5
- font-size: 7rem;
2
+ .sign {
3
+ display: table;
4
+ margin: map-get($base, vertical-space-lg) auto;
5
+ margin-top: map-get($base, vertical-space-lg) * 2;
6
+ h1 {
7
+ font-size: map-get($base, font-size-xl) * 4;
8
+ line-height: 1;
9
+ }
10
+ p {
11
+ font-size: map-get($base, font-size-xl) * 1.2;
12
+ }
6
13
  }
7
14
  }
@@ -1,5 +1,7 @@
1
1
  .layout--article {
2
-
2
+ .article__sharing {
3
+ margin: map-get($base, vertical-space-lg) 0;
4
+ }
3
5
  .article__footer {
4
6
  margin: map-get($base, vertical-space-lg) 0;
5
7
  font-size: map-get($base, font-size-sm);
@@ -1,6 +1,10 @@
1
1
  .layout--page {
2
2
  height: 100%;
3
3
 
4
+ .page__viewport {
5
+ height: 100%;
6
+ }
7
+
4
8
  .page__grid {
5
9
  height: 100%;
6
10
  }
@@ -25,7 +29,7 @@
25
29
  height: 100%;
26
30
  background-color: $background-color;
27
31
  @include split-line(right);
28
- @include transition(transform .4s);
32
+ @include transition(transform map-get($animation, duration));
29
33
  @include overflow(auto);
30
34
  .sidebar-toc {
31
35
  padding: map-get($spacers, 3) map-get($spacers, 3) map-get($spacers, 4) map-get($spacers, 4);
@@ -38,17 +38,19 @@
38
38
  "animate/fade-in-down",
39
39
  "animate/fade-in-up",
40
40
 
41
+ "components/main",
42
+ "components/header",
43
+ "components/footer",
41
44
  "components/article-info",
42
45
  "components/article-header",
43
46
  "components/article-content",
44
47
  "components/article-list",
45
48
  "components/author-links",
46
49
  "components/author-profile",
47
- "components/header",
48
- "components/footer",
49
- "components/main",
50
50
  "components/tags",
51
51
  "components/search",
52
+ "components/extensions",
53
+
52
54
 
53
55
  "additional/alert",
54
56
  "additional/tag",
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.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tian Qi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2018-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -139,6 +139,12 @@ files:
139
139
  - _includes/comments-providers/disqus.html
140
140
  - _includes/comments-providers/gitalk.html
141
141
  - _includes/comments.html
142
+ - _includes/extensions/bilibili.html
143
+ - _includes/extensions/netease-cloud-music.html
144
+ - _includes/extensions/slideshare.html
145
+ - _includes/extensions/soundcloud.html
146
+ - _includes/extensions/ted.html
147
+ - _includes/extensions/youtube.html
142
148
  - _includes/footer.html
143
149
  - _includes/head.html
144
150
  - _includes/header.html
@@ -172,6 +178,8 @@ files:
172
178
  - _includes/scripts/utils.js
173
179
  - _includes/scripts/variables.html
174
180
  - _includes/search.html
181
+ - _includes/sharing-providers/addtoany.html
182
+ - _includes/sharing.html
175
183
  - _includes/sidebar/toc.html
176
184
  - _includes/snippets/assign.html
177
185
  - _includes/snippets/get-article-title.html
@@ -251,6 +259,7 @@ files:
251
259
  - _sass/components/_article-list.scss
252
260
  - _sass/components/_author-links.scss
253
261
  - _sass/components/_author-profile.scss
262
+ - _sass/components/_extensions.scss
254
263
  - _sass/components/_footer.scss
255
264
  - _sass/components/_header.scss
256
265
  - _sass/components/_main.scss