jekyll-theme-materialize 0.0.11 → 0.0.12

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: f1db2675b1445e394de77953188b0bbc5319e569
4
- data.tar.gz: a65b8159bdf3a7d1b7e7c0476ea9de7ef0e34419
3
+ metadata.gz: e9ea20f6dcfdae994538ac97ec8b1f084ac3a260
4
+ data.tar.gz: 20830aa350945d348e9e71301e6e12c90bbf799a
5
5
  SHA512:
6
- metadata.gz: 744e58ce9adea25236d9b8e1427cb660189603eb18cac4fac9f48291c484e3b9efc3f7f4b6d5f1fb683ffe2b0c06f25db9c04aca2bccc8bc96bd109650c37249
7
- data.tar.gz: 06b2a803ac065c7426680eea4689628b8d04e74c967a1ef434d9a92ad0a178ba669ed0e5b1c7438db49765ee7d2293343bf8e0df7c40c9986acb1b01d213dc42
6
+ metadata.gz: 147b85a4e1f2e7c66dd9d480e49bf4d15be8efb839e350432e459625dca4fefdfda64523a9a26fac133118e8a664a880a3c56a6302db66892fc18af944536f33
7
+ data.tar.gz: 5db4473f52b423d6812cf37b389b49787382e697e6832f17c286e39748b2f61bf27fbbef5619ca53508791d03f4a7aa72895f036a13bba3380aaac7701c24ac9
data/README.md CHANGED
@@ -81,6 +81,13 @@ disqus-shortname: blog-kejun-tk #disqus shortname
81
81
 
82
82
  # cdn
83
83
  cdnurl: https://cdnurl.com/ #cdn
84
+
85
+ #google_analytics
86
+ google_analytics:
87
+ #多个作者
88
+ defaultAuthor: KeJun #默认作者
89
+ defaultAuthorImage: assets/images/tx.jpg #默认作者头像
90
+ manyAuthors: false
84
91
  ```
85
92
  每一个新的文章均需要添加如下yaml:
86
93
 
@@ -92,6 +99,7 @@ image: # 图像,用于首页,若留空将以NoImage的形式显
92
99
  tags: jekyll ubuntu # 标签,用于tags页面,允许多个
93
100
  toc: * # 确定是否显示toc目录,默认为不显示。
94
101
  comments: true # 是否显示评论
102
+ author: # 作者名,请开启多作者功能,否则将以默认作者显示。
95
103
  ---
96
104
  ```
97
105
 
@@ -212,8 +220,19 @@ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即
212
220
 
213
221
  若想要自定义顺序,你可以调整他们的整体顺序。
214
222
 
223
+ 当启用多作者 `manyAuthors: true` 后,您可以在文章yaml处指定作者,为了避免重复指定头像url,您必须在`_data/authors.yml`按如下格式设置:
224
+
225
+ ```yaml
226
+
227
+ - name: Jekyll
228
+ image: assets/images/links/jianyuyouhun.jpg
229
+
230
+ - name: Other
231
+ image: assets/images/links/halyul.png
215
232
 
216
- ## 注意
233
+ ```
234
+
235
+ ## 注意1
217
236
 
218
237
  该主题引用的`gallery.min.opt.js`及`gallery-materialize.min.opt.css`文件并没有经过原开发者同意。若侵权,请告知并删除。
219
238
 
@@ -229,6 +248,12 @@ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即
229
248
  |defaultColor | Fallback color for when color thief fails. Default: '#444'|
230
249
  |fillScreen | Enable the full width image transition style. Default: false|
231
250
 
251
+ ## 注意2
252
+
253
+ 目前,绝大多数本地url添加了前置`baseurl`,如果造成了无法引入的问题,请提出:
254
+
255
+ <a class="github-button" href="https://github.com/KeJunMao/jekyll-theme-materialize/issues" data-icon="octicon-issue-opened" data-style="mega" data-count-api="/repos/KeJunMao/jekyll-theme-materialize#open_issues_count" data-count-aria-label="# issues on GitHub" aria-label="Issue KeJunMao/jekyll-theme-materialize on GitHub">Issue</a>
256
+
232
257
  ## TODO
233
258
 
234
259
  * disqus # 完成
@@ -237,6 +262,10 @@ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即
237
262
  * 搜索 # 完成
238
263
  * 二次元化选项 # 二次元最棒惹~
239
264
  * cdn 支持 # 完成
265
+ * 统计 # 完成
266
+ * 分享
267
+ * 显示作者 #完成
268
+ * 更好的主页
240
269
 
241
270
  ## License
242
271
 
data/_data/authors.yml ADDED
@@ -0,0 +1,6 @@
1
+
2
+ - name: Jekyll
3
+ image: assets/images/links/jianyuyouhun.jpg
4
+
5
+ - name: Other
6
+ image: assets/images/links/halyul.png
@@ -1,7 +1,7 @@
1
1
  <hr>
2
2
  <div class="row">
3
3
  <div class="col s12 disqus center">
4
- <button id="load-disqus" class="btn waves-effect waves-light green" onclick="disqus.load();" data="{{ site.disqus-shortname }}">
4
+ <button id="load-disqus" class="btn waves-effect waves-light {{ site.theme-color.default-color }}" onclick="disqus.load();" data="{{ site.disqus-shortname }}">
5
5
  阅读评论 「请确保 disq.us & disquscdn.com & disqus.com 可以正常加载」
6
6
  </button>
7
7
  <div id="disqus_thread"></div>
data/_includes/head.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="theme-color" content="#4CAF50">
6
6
 
7
7
  <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
8
- {% if site.cdnurl == "" %}
8
+ {% unless site.cdnurl != "" %}
9
9
  <link rel="icon" href="{{ site.icon-32x32 | prepend: site.baseurl }}" sizes="32x32">
10
10
  <link rel="icon" href="{{ site.icon-16x16 | prepend: site.baseurl }}" sizes="16x16">
11
11
 
@@ -35,5 +35,5 @@
35
35
  <link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.cdnurl }}">
36
36
 
37
37
  <link rel="stylesheet" href="{{ "/assets/css/posts.css" | prepend: site.cdnurl }}">
38
- {% endif %}
38
+ {% endunless %}
39
39
  </head>
@@ -1,5 +1,5 @@
1
1
  <script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
2
- {% if site.cdnurl == "" %}
2
+ {% unless site.cdnurl != "" %}
3
3
  <script type="text/javascript" src="{{ "/assets/js/materialize.min.js" | prepend: site.baseurl }}"></script>
4
4
  <script type="text/javascript" src="{{ "/assets/js/jquery.scrollToTop.min.js" | prepend: site.baseurl }}"></script>
5
5
  <script type="text/javascript" src="{{ "/assets/js/gallery.min.opt.js" | prepend: site.baseurl }}"></script>
@@ -16,7 +16,7 @@
16
16
  <script type="text/javascript" src="{{ "/assets/js/toc.js" | prepend: site.cdnurl }}"></script>
17
17
  <script type="text/javascript" src="{{ "/assets/js/main.js" | prepend: site.cdnurl }}"></script>
18
18
  <script type="text/javascript" src="{{ "/assets/js/bootstrap3-typeahead.min.js" | prepend: site.cdnurl }}"></script>
19
- {% endif %}
19
+ {% endunless %}
20
20
 
21
21
 
22
22
  <script>
@@ -13,7 +13,13 @@ layout: default
13
13
  <div class="gallery-curve-wrapper">
14
14
  <div class="gallery-header">
15
15
  <span>{{ post.title }}</span>
16
- <p class="gray-text text-lighten-4" style="margin-bottom: 0px;">{{ post.date | date: "%b %-d, %Y" }}</p>
16
+ <p class="gray-text text-lighten-4" style="margin-bottom: 0px;">
17
+ {% if site.manyAuthors %}
18
+ <img data-position="bottom" data-delay="50" data-tooltip="{% if post.author %}{{ post.author }}{% else %}{{ site.defaultAuthor }}{% endif %}" class="right tooltipped" style="width: 18px;" src="{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%capture a %}{{ author.image }}{% endcapture %}{%endif%}{%endfor%}{% unless a %}{{ site.defaultAuthorImage }}{%endunless%}" alt="">
19
+ {%else%}
20
+ <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
21
+ {% endif %}
22
+ {{ post.date | date: "%b %-d, %Y" }}</p>
17
23
  <hr>
18
24
  <div id="postsContent">{{ post.excerpt }}</div>
19
25
  </div>
@@ -59,7 +65,13 @@ layout: default
59
65
  </a>
60
66
  <div class="gallery-header">
61
67
  <span>{{post.title}}</span>
62
- <p class="post-data datagray-text text-lighten-4" style="margin-bottom: 0px;">{{ post.date | date: "%b %-d, %Y" }}</p>
68
+ <p class="post-data datagray-text text-lighten-4" style="margin-bottom: 0px;">
69
+ {% if site.manyAuthors %}
70
+ <img data-position="bottom" data-delay="50" data-tooltip="{% if post.author %}{{ post.author }}{% else %}{{ site.defaultAuthor }}{% endif %}" class="right tooltipped" style="width: 18px;" src="{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%capture a %}{{ author.image }}{% endcapture %}{%endif%}{%endfor%}{% unless a %}{{ site.defaultAuthorImage }}{%endunless%}" alt="">
71
+ {%else%}
72
+ <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
73
+ {% endif %}
74
+ {{ post.date | date: "%b %-d, %Y" }}</p>
63
75
  </div>
64
76
  <div class="gallery-body">
65
77
  <div id="postsContent" class="title-wrapper">
@@ -21,6 +21,17 @@
21
21
 
22
22
  {% include script.html %}
23
23
 
24
+ {% if site.google_analytics %}
25
+ <script type="text/javascript">
26
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
27
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
28
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
29
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
30
+ ga('create', '{{ site.google_analytics }}', 'auto');
31
+ ga('send', 'pageview');
32
+ </script>
33
+ {% endif %}
34
+
24
35
  </body>
25
36
 
26
37
  </html>
data/_layouts/home.html CHANGED
@@ -11,7 +11,15 @@ layout: default
11
11
  <div class="gallery-curve-wrapper">
12
12
  <div class="gallery-header">
13
13
  <span>{{ post.title }}</span>
14
- <p class="gray-text text-lighten-4" style="margin-bottom: 0px;">{{ post.date | date: "%b %-d, %Y" }}</p>
14
+
15
+ <p class="gray-text text-lighten-4" style="margin-bottom: 0px;">
16
+ {% if site.manyAuthors %}
17
+ <img data-position="bottom" data-delay="50" data-tooltip="{% if post.author %}{{ post.author }}{% else %}{{ site.defaultAuthor }}{% endif %}" class="right tooltipped" style="width: 18px;" src="{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%capture a %}{{ author.image }}{% endcapture %}{%endif%}{%endfor%}{% unless a %}{{ site.defaultAuthorImage }}{%endunless%}" alt="">
18
+ {%else%}
19
+ <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
20
+ {% endif %}
21
+ {{ post.date | date: "%b %-d, %Y" }}
22
+ </p>
15
23
  <hr>
16
24
  <div id="postsContent">
17
25
  {{ post.excerpt }}
@@ -55,7 +63,13 @@ layout: default
55
63
  </a>
56
64
  <div class="gallery-header">
57
65
  <span>{{post.title}}</span>
58
- <p class="post-data datagray-text text-lighten-4" style="margin-bottom: 0px;">{{ post.date | date: "%b %-d, %Y" }}</p>
66
+ <p class="post-data datagray-text text-lighten-4" style="margin-bottom: 0px;">
67
+ {% if site.manyAuthors %}
68
+ <img data-position="bottom" data-delay="50" data-tooltip="{% if post.author %}{{ post.author }}{% else %}{{ site.defaultAuthor }}{% endif %}" class="right tooltipped" style="width: 18px;" src="{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%capture a %}{{ author.image }}{% endcapture %}{%endif%}{%endfor%}{% unless a %}{{ site.defaultAuthorImage }}{%endunless%}" alt="">
69
+ {%else%}
70
+ <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
71
+ {% endif %}
72
+ {{ post.date | date: "%b %-d, %Y" }}</p>
59
73
  </div>
60
74
  <div class="gallery-body">
61
75
  <div id="postsContent" class="title-wrapper">
data/assets/css/main.css CHANGED
@@ -114,4 +114,7 @@
114
114
  }
115
115
  .input-field div.card{
116
116
  width: 100%;
117
+ }
118
+ div.gallery-header {
119
+ padding-bottom: 10px!important;
117
120
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-materialize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - KeJun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - LICENSE
63
63
  - README.md
64
+ - _data/authors.yml
64
65
  - _data/links.yml
65
66
  - _data/myherfs.yml
66
67
  - _includes/disqus.html