jekyll-theme-materialize 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9ea20f6dcfdae994538ac97ec8b1f084ac3a260
4
- data.tar.gz: 20830aa350945d348e9e71301e6e12c90bbf799a
3
+ metadata.gz: c27a1e610df4b015b6c5ac17ed40afe6e5e51e0c
4
+ data.tar.gz: 576901cb743e7c51f768c97e6da43d292af94c08
5
5
  SHA512:
6
- metadata.gz: 147b85a4e1f2e7c66dd9d480e49bf4d15be8efb839e350432e459625dca4fefdfda64523a9a26fac133118e8a664a880a3c56a6302db66892fc18af944536f33
7
- data.tar.gz: 5db4473f52b423d6812cf37b389b49787382e697e6832f17c286e39748b2f61bf27fbbef5619ca53508791d03f4a7aa72895f036a13bba3380aaac7701c24ac9
6
+ metadata.gz: d565237b6a0a909c2db8bfc722c0ffd018c47f6c70d15f807baaac74a4e730b455f180f94a2bb17c4fd149f079944dbfd9ec59120995480078b7d1b5577245bd
7
+ data.tar.gz: 8bc37726d1603d205993979d8f38cc3c69d414199ca4a751cb288c5308c2f08a9cfb7ee9407d7f4602491827bba859f649e46c7a61b22faca684524790423573
data/README.md CHANGED
@@ -1,5 +1,26 @@
1
+ - jekyll-theme-materialize
2
+ - [预览](#user-content-预览)
3
+ - [安装](#user-content-安装)
4
+ - [使用gem](#user-content-使用gem)
5
+ - [使用git](#user-content-使用git)
6
+ - [更新](#user-content-更新)
7
+ - [用法](#user-content-用法)
8
+ - [config](#user-content-config)
9
+ - [post](#user-content-post)
10
+ - [otherPage](#user-content-otherPage)
11
+ - [addPage](#user-content-addPage)
12
+ - [友情链接](#user-content-友情链接)
13
+ - [myherfs](#user-content-myherfs)
14
+ - [manyAuthors](#user-content-manyAuthors)
15
+ - [注意1](#user-content-注意1)
16
+ - [注意2](#user-content-注意2)
17
+ - [TODO](#user-content-todo)
18
+ - [License](#user-content-license)
19
+
1
20
  # jekyll-theme-materialize
2
21
 
22
+ ![](https://ooo.0o0.ooo/2017/03/15/58c9345cdcfdf.png)
23
+
3
24
  [![Build Status](https://travis-ci.org/KeJunMao/jekyll-theme-materialize.svg?branch=master)](https://travis-ci.org/KeJunMao/jekyll-theme-materialize)
4
25
 
5
26
  [![jekyll-theme-materialize Version](https://badge.fury.io/rb/jekyll-theme-materialize.svg)](https://badge.fury.io/rb/jekyll-theme-materialize)
@@ -48,8 +69,16 @@ $ cd jekyll-theme-materialize
48
69
  $ bundle install
49
70
  $ bundle exec jekyll s -w
50
71
  ```
72
+ ## 更新
73
+
74
+ $ bundle
75
+
51
76
  ## 用法
52
77
 
78
+ 下面的内容能极大的帮助你使用本主题,请务必仔细阅读。
79
+
80
+ ### config
81
+
53
82
  将如下内容添加到你Jekyll 的`_config.yml`文件中,请注意替换为你自己的信息:
54
83
 
55
84
  ```yaml
@@ -76,6 +105,9 @@ theme-color: {
76
105
  mobile-hp: /images/tx.jpg # 头像
77
106
  mobile-bg: /images/userbg.png # 背景,若填写theme则使用主题色。
78
107
 
108
+ # header 背景图片
109
+ header-bg: /assets/images/bg.png
110
+
79
111
  # disqus
80
112
  disqus-shortname: blog-kejun-tk #disqus shortname
81
113
 
@@ -89,19 +121,23 @@ defaultAuthor: KeJun #默认作者
89
121
  defaultAuthorImage: assets/images/tx.jpg #默认作者头像
90
122
  manyAuthors: false
91
123
  ```
124
+
125
+ ### post
126
+
92
127
  每一个新的文章均需要添加如下yaml:
93
128
 
94
129
  ```yaml
95
130
  ---
96
131
  layout: post # 指定模板
97
132
  categories: NoImage # 分类,首页显示,该项经常用于检测是否为post。请注意,每个文章仅支持一个分类。
98
- image: # 图像,用于首页,若留空将以NoImage的形式显示
133
+ image: # 图像,用于首页,若留空将以NoImage的形式显示, 暂不支持跨域图像。
99
134
  tags: jekyll ubuntu # 标签,用于tags页面,允许多个
100
135
  toc: * # 确定是否显示toc目录,默认为不显示。
101
136
  comments: true # 是否显示评论
102
- author: # 作者名,请开启多作者功能,否则将以默认作者显示。
137
+ author: # 若指定作者名,请开启多作者功能,否则将以默认作者显示。
103
138
  ---
104
139
  ```
140
+ ### otherPage
105
141
 
106
142
  请注意jekyll根目录下的`.md`文件的`layout`与`_layout`文件下的文件对应.如:
107
143
 
@@ -145,6 +181,8 @@ layout: archive
145
181
  ---
146
182
  ```
147
183
 
184
+ ### addPage
185
+
148
186
  如需新增page,建议按:
149
187
 
150
188
  * 根目录新建 `pageName.md`,并在头信息中键入如下:
@@ -171,6 +209,8 @@ layout: default
171
209
 
172
210
  > 你新增的页面将以`_config.yml`文件中的 `default-color` 作为主题色。如果你知道你在干什么,你也可以编辑`header`和`footer`。
173
211
 
212
+ ### 友情链接
213
+
174
214
  友情链接在`_data/links.yml`中,要删除或新增,请遵循如下格式:
175
215
 
176
216
  ```yaml
@@ -180,6 +220,8 @@ layout: default
180
220
  describe: Material Design爱好者
181
221
  ```
182
222
 
223
+ ### myherfs
224
+
183
225
  footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即可,!请勿更改name!:
184
226
 
185
227
  ```yaml
@@ -220,6 +262,8 @@ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即
220
262
 
221
263
  若想要自定义顺序,你可以调整他们的整体顺序。
222
264
 
265
+ ### manyAuthors
266
+
223
267
  当启用多作者 `manyAuthors: true` 后,您可以在文章yaml处指定作者,为了避免重复指定头像url,您必须在`_data/authors.yml`按如下格式设置:
224
268
 
225
269
  ```yaml
@@ -250,9 +294,7 @@ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即
250
294
 
251
295
  ## 注意2
252
296
 
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>
297
+ 目前,绝大多数本地url添加了前置`baseurl`,如果造成了无法引入的问题,请提出:<a class="github-button" href="https://github.com/KeJunMao/jekyll-theme-materialize/issues">Issue</a>
256
298
 
257
299
  ## TODO
258
300
 
@@ -260,12 +302,16 @@ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即
260
302
  * toc # 完成
261
303
  * 图像加载动画 # 完成
262
304
  * 搜索 # 完成
263
- * 二次元化选项 # 二次元最棒惹~
305
+ * 二次元化选项
264
306
  * cdn 支持 # 完成
265
307
  * 统计 # 完成
266
308
  * 分享
267
309
  * 显示作者 #完成
268
- * 更好的主页
310
+ * post layout images点击放大出现的位置错误
311
+ * home 和 archive 文章图片使用图床时的跨域问题(因为使用javascript优化了加载)
312
+ * 不依赖ruby gems的i18n
313
+ * homepage,请看[demo](https://kejun.space/)
314
+ * 配合homepage ,传入友链和links,当博客更新时,homepage也可以更新。请看[demo](https://kejun.space/#other)
269
315
 
270
316
  ## License
271
317
 
data/_data/authors.yml CHANGED
@@ -2,5 +2,5 @@
2
2
  - name: Jekyll
3
3
  image: assets/images/links/jianyuyouhun.jpg
4
4
 
5
- - name: Other
5
+ - name: halyul
6
6
  image: assets/images/links/halyul.png
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
- {% unless site.cdnurl != "" %}
8
+ {% unless site.cdn %}
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
 
@@ -36,4 +36,4 @@
36
36
 
37
37
  <link rel="stylesheet" href="{{ "/assets/css/posts.css" | prepend: site.cdnurl }}">
38
38
  {% endunless %}
39
- </head>
39
+ </head>
@@ -1,7 +1,7 @@
1
1
  <!-- 菜单和header -->
2
2
  <nav class="nav-extended {% case page.url %}{% when '/' %}{{ site.theme-color.home-color }}{% when '/about.html' %}{{ site.theme-color.about-color }}{% when '/archive.html' %}{{ site.theme-color.archive-color }}{% when '/links.html' %}{{ site.theme-color.links-color }}{% when '/tags.html' %}{{ site.theme-color.tags-color }}{% else %}{{ site.theme-color.default-color }}{% endcase %}">
3
3
  <div class="nav-background">
4
- <div class="ea k" style="background-image: url('{{ "/assets/images/bg.png" | prepend: site.baseurl }}');"></div>
4
+ <div class="ea k" style="background-image: url('{{ site.header-bg | prepend: site.baseurl }}');"></div>
5
5
  </div>
6
6
  <div class="nav-wrapper db">
7
7
  <!--移动端菜单按钮-->
@@ -95,6 +95,8 @@
95
95
  <div class="background">
96
96
  <img style="width:300px;height:160px;" src="{{ site.mobile-bg | prepend: site.baseurl }}">
97
97
  </div>
98
+ {% else %}
99
+ <div class="background {{ site.theme-color.default-color }}"></div>
98
100
  {% endif %}
99
101
  <a href="{{ site.baseurl }}/"><img class="circle" src="{{ site.mobile-hp | prepend: site.baseurl }}"></a>
100
102
  <a href="#!"><span class="white-text name">{{ site.title }}</span></a>
@@ -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
- {% unless site.cdnurl != "" %}
2
+ {% unless site.cdn %}
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>
@@ -15,7 +15,7 @@ layout: default
15
15
  <span>{{ post.title }}</span>
16
16
  <p class="gray-text text-lighten-4" style="margin-bottom: 0px;">
17
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="">
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="{% if post.author %}{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%endif%}{%endfor%}{% else %}{{ site.defaultAuthorImage }}{% endif %}" alt="">
19
19
  {%else%}
20
20
  <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
21
21
  {% endif %}
@@ -67,7 +67,7 @@ layout: default
67
67
  <span>{{post.title}}</span>
68
68
  <p class="post-data datagray-text text-lighten-4" style="margin-bottom: 0px;">
69
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="">
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="{% if post.author %}{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%endif%}{%endfor%}{% else %}{{ site.defaultAuthorImage }}{% endif %}" alt="">
71
71
  {%else%}
72
72
  <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
73
73
  {% endif %}
data/_layouts/home.html CHANGED
@@ -14,7 +14,7 @@ layout: default
14
14
 
15
15
  <p class="gray-text text-lighten-4" style="margin-bottom: 0px;">
16
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="">
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="{% if post.author %}{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%endif%}{%endfor%}{% else %}{{ site.defaultAuthorImage }}{% endif %}" alt="">
18
18
  {%else%}
19
19
  <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
20
20
  {% endif %}
@@ -65,7 +65,7 @@ layout: default
65
65
  <span>{{post.title}}</span>
66
66
  <p class="post-data datagray-text text-lighten-4" style="margin-bottom: 0px;">
67
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="">
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="{% if post.author %}{% for author in site.data.authors %}{% if author.name == post.author%}{{ author.image }}{%endif%}{%endfor%}{% else %}{{ site.defaultAuthorImage }}{% endif %}" alt="">
69
69
  {%else%}
70
70
  <img data-position="bottom" data-delay="50" data-tooltip="{{ site.defaultAuthor }}" class="right tooltipped" style="width: 18px;" src="{{ site.defaultAuthorImage }}" alt="">
71
71
  {% endif %}
Binary file
Binary file
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.12
4
+ version: 0.0.13
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-11 00:00:00.000000000 Z
11
+ date: 2017-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll