jekyll-theme-mdui 0.3.0 → 0.4.0

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: ab00294c8ea9ce48a3d14edc59e2fb1642136560
4
- data.tar.gz: 973ad6cf99d1a30d767a412a6a0d7aebee648583
3
+ metadata.gz: ac2bd0c0f0ccad2815364e221a107a7dd5f6492d
4
+ data.tar.gz: e1335725c0a2f89f1f9d99c4ac97b8a2f9bf6401
5
5
  SHA512:
6
- metadata.gz: 971edcdd246fdefe090aa15c7500ea8b05d1012622986f51ff90345eb1d7c37d8447baeceecbbc28d6eba86981054d21ab04b4f2e9c36a08ee305e730333a499
7
- data.tar.gz: 95cbb8f7dfaa1423b2df9125f390c840bb28519b79d1e74ca5aeb107293b6c7aee383fec79bb21630b251a35eb57a808f8cb345e0c97b4ca4cb809ee633b00ac
6
+ metadata.gz: bc2aa06531044ccbf899c300d19317a7c976bcab2f9426d70e492478d65d1fe2d6a6f1f56ddbd9a23fed2521ed75375a8a3685025ab9f6def62b42c641a501e2
7
+ data.tar.gz: 5234762aba5713ef7602f96f14bcbedac19e2ed2a8cc09920993c424566bb8dc6c7f02267fe9335f937668c6d2a3f3f0c58a492d73fa7d7a25e2bb3b3ce8202b
data/README.md CHANGED
@@ -4,7 +4,7 @@ A Jekyll theme based on mdui
4
4
 
5
5
  [demo](https://blog.kejun.space)
6
6
 
7
- [![Version](https://img.shields.io/badge/version-0.3.0-green.svg?style=flat-square)]()
7
+ [![Version](https://img.shields.io/badge/version-0.4.0-green.svg?style=flat-square)]()
8
8
  [![Jekyll](https://img.shields.io/badge/Jekyll-3.4+-green.svg?style=flat-square)](https://jekyllrb.com/)
9
9
  [![Gem](https://img.shields.io/gem/dt/jekyll-theme-mdui.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-mdui/)
10
10
 
@@ -16,6 +16,8 @@ A Jekyll theme based on mdui
16
16
 
17
17
  ## Installation
18
18
 
19
+ **Now,we have `build` branch ,you can clone this branch to install.**
20
+
19
21
  We have two ways to install themes.
20
22
 
21
23
  But,**We recommend you use the second ways.**
@@ -108,31 +110,48 @@ Default does not display the editor.If you want the editor to appear in the menu
108
110
  ```
109
111
  Supported:bilibili,facebook,github,gplus,instagram,linkedin,telegram,tumblr,twitter,weibo,zhihu
110
112
 
111
- * site.yml
113
+ * **site.yml**
112
114
  ```yml
113
115
  head:
114
- favicon: "https://ooo.0o0.ooo/2017/05/27/59294212bc16e.png" # 网站的favicon
115
- high_res_favicon: "https://ooo.0o0.ooo/2017/06/08/5939484dc618e.png" # 高清favicon
116
- apple_touch_icon: "https://ooo.0o0.ooo/2017/06/08/5939484dc618e.png" # ios主屏按钮图标
117
- keywords: "blog jekyll mdui theme" # 页面关键字
116
+ favicon: "https://ooo.0o0.ooo/2017/05/27/59294212bc16e.png" # the favicon
117
+ high_res_favicon: "https://ooo.0o0.ooo/2017/06/08/5939484dc618e.png" # the favicon using high quality format
118
+ apple_touch_icon: "https://ooo.0o0.ooo/2017/06/08/5939484dc618e.png" # the iOS Home button icon
119
+ keywords: "blog jekyll mdui theme" # the site keywords
120
+
118
121
  uiux:
119
- android_chrome_color: "#607D8B" # 安卓 Chrome 浏览器的地址栏颜色。
120
- nprogress_color: "#29d" # 页面加载时顶部加载进度条的颜色。
121
- nprogress_buffer: 200 # 页面加载时顶部加载进度条的缓冲时间。
122
+ android_chrome_color: "#eeeeee" # the color of the Chrome address bar
123
+ nprogress_color: "#29d" # the color of the top loading progress bar
124
+ nprogress_buffer: 200 # the top loading progress bar buffers
125
+
122
126
  background:
123
- purecolor: "#eeeeee" # 背景颜色
127
+ purecolor: "#eeeeee" # the background color
128
+
124
129
  img:
125
- avatar: "https://ooo.0o0.ooo/2017/05/26/5928368d409dd.png" # 你的头像设置。
126
- card: # 首页卡片
127
- card_shadow: 1 # 卡片阴影 0-24,0为不显示
128
- card_hoverable: false # 悬浮时加深阴影
130
+ avatar: "https://ooo.0o0.ooo/2017/05/26/5928368d409dd.png" # your avatar
131
+
132
+ card:
133
+ card_shadow: 1 # card shadow (0-24), 0 is not displayed
134
+ card_hoverable: false # When the hover to deepen the shadow
135
+
136
+ sns_share: # SNS Share Switch
137
+ twitter: true
138
+ facebook: false
139
+ googleplus: false
140
+ weibo: true
141
+ linkedin: false
142
+ qq: true
143
+ telegram: true
144
+
129
145
  disqus:
130
- disqus_shortname: "kejun" # Your disqus
131
- disqus_proxy: false
132
- disqus_proxy_url: "" # disqus proxy(Do not use)
146
+ disqus_shortname: "" # Your disqus
147
+ disqus_button: true # disqus load button
148
+ disqus_proxy: false # # disqus proxy(Do not use)
149
+ disqus_proxy_url: "" # (Do not use)
133
150
  disqus_api_key: "" # (Do not use)
134
- google_analytics: "" # (Do not use)
135
- lang: "zh-CN" # lang
151
+
152
+ google_analytics: "" # google analytics code
153
+
154
+ lang: "en-US" # lang
136
155
  ```
137
156
 
138
157
  ### manifest.json
@@ -186,15 +205,17 @@ Add the following format to your posts:
186
205
  ### file
187
206
  If you use the first ways to install, you need to download the following files to your jekyll website root directory Or create a new file,And replace it with your own information:
188
207
 
189
- * mainifest.json
190
- * sw.js
191
- * search.json
192
- * tags.json
193
- * _data/friends.yml
194
- * _data/menus.yml
195
- * _data/sns.yml
196
- * assets/images/touch/*
197
- * pages/*
208
+ |files|Required or Optional|Description|
209
+ |--- |--- |--- |
210
+ |mainifest.json|Optional |Is the only file that every WebExtension must contain.See [here](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json).|
211
+ |sw.js|Optional |Service Workers.See [here](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers).|
212
+ |search.json|Optional|If you use the search page, it is required.|
213
+ |tags.json|Optional|If you use the tags page, it is required.|
214
+ |_data/friends.yml|Optional|If you use the friends page, it is required.|
215
+ |_data/sns.yml|Optional|It is footer sns,if you want userd, it is required.|
216
+ |_data/site.yml|Required|It is theme config.|
217
+ |_data/lang.yml|Required|It is language config.|
218
+ |_data/menus.yml|Required|It is site menus config.|
198
219
 
199
220
  How to use? See Usage.
200
221
 
@@ -203,9 +224,10 @@ How to use? See Usage.
203
224
  If you use the first ways to install, You will not be able to use service workers!!!!
204
225
 
205
226
  Why? See `sw.js` content.
227
+
206
228
  ## Contributing
207
229
 
208
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
230
+ Bug reports and pull requests are welcome on GitHub at https://github.com/KeJunMao/jekyll-theme-mdui. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
209
231
 
210
232
  ## Development
211
233
 
@@ -213,7 +235,7 @@ To set up your environment to develop this theme, run `bundle install`.
213
235
 
214
236
  Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
215
237
 
216
- When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
238
+ When your theme is released, only the files in `_layouts`, `_includes`, and `assets` tracked with Git will be released.
217
239
 
218
240
  ## License
219
241
 
@@ -1,9 +1,18 @@
1
+ {% if site.data.site.lang == 'zh-CN' %}
2
+ {% assign lang = site.data.lang[site.data.site.lang] %}
3
+ {% else %}
4
+ {% assign lang = site.data.lang.en-US %}
5
+ {% endif %}
1
6
  {% if site.data.site.disqus.disqus_shortname != "" %}
2
7
  <div class="mdui-divider"></div>
3
8
  {% if site.data.site.disqus.disqus_proxy == false %}
4
- <button id="load-disqus" class="mdui-btn mdui-btn-block mdui-center" onclick="disqus.load();" data="{{ site.data.site.disqus.disqus_shortname }}">阅读评论 「请确保 Disqus 可以正常加载」</button>
9
+ {% if site.data.site.disqus.disqus_button == true %}
10
+ <button id="load-disqus" class="mdui-btn mdui-btn-block mdui-center" onclick="disqus.load();" data="{{ site.data.site.disqus.disqus_shortname }}">{{lang.post.comments_load_button}}</button>
11
+ <div id="disqus_thread"></div>
12
+ {% else %}
5
13
  <div id="disqus_thread"></div>
6
14
  {% endif %}
15
+ {% endif %}
7
16
  {% if site.data.site.disqus.disqus_proxy %}
8
17
  <div class="mdui-divider"></div>
9
18
  <div id="disqusreadonly" style="padding-top: 16px;">
@@ -0,0 +1,20 @@
1
+ {% if site.data.site.lang == 'zh-CN' %}
2
+ {% assign lang = site.data.lang[site.data.site.lang] %}
3
+ {% else %}
4
+ {% assign lang = site.data.lang.en-US %}
5
+ {% endif %}
6
+ <button class="mdui-btn mdui-btn-icon" mdui-tooltip="{content: '{{lang.post.qrcode }}', delay: 100}" mdui-menu="{target: '#k-qrcode',align:'right',covered:false}"><i class="mdui-icon material-icons">devices other</i></button>
7
+ <ul class="mdui-menu mdui-menu-cascade" id="k-qrcode">
8
+ <li class="mdui-menu-item">
9
+ <a class="mdui-text-center" href="javascript:;" class="mdui-ripple">{{lang.post.qrcodeContent}}</a>
10
+ </li>
11
+ {% if site.data.site.lang == 'zh-CN' %}
12
+ <li class="mdui-menu-item">
13
+ <img class="mdui-center" src="https://pan.baidu.com/share/qrcode?w=200&h=200&url={{page.url | absolute_url |url_encode}}" alt="">
14
+ </li>
15
+ {% else %}
16
+ <li class="mdui-menu-item">
17
+ <img class="mdui-center" src="https://chart.googleapis.com/chart?chs=210x210&cht=qr&chl={{page.url | absolute_url |url_encode}}" alt="">
18
+ </li>
19
+ {% endif %}
20
+ </ul>
@@ -82,7 +82,7 @@ $(function(){
82
82
  <!--/* search-script-end */-->
83
83
  <!--/* post-script-start */-->
84
84
  {% if page.layout == "post" or page.layout == "page"%}
85
-
85
+ {% if site.data.site.disqus.disqus_button == true %}
86
86
  <script>
87
87
  /* Disqus */
88
88
  var disqus = {
@@ -100,6 +100,22 @@ var disqus = {
100
100
  }
101
101
  };
102
102
  </script>
103
+ {% else %}
104
+ <script>
105
+ function disqus(){
106
+ var disqus_shortname = '{{ site.data.site.disqus.disqus_shortname }}';
107
+ if(typeof DISQUS !== 'object') {
108
+ (function () {
109
+ var s = document.createElement('script'); s.async = true;
110
+ s.type = 'text/javascript';
111
+ s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
112
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
113
+ }());
114
+ }
115
+ }
116
+ disqus();
117
+ </script>
118
+ {% endif %}
103
119
  {% endif %}
104
120
 
105
121
  {% if page.layout == "post" %}
@@ -0,0 +1,43 @@
1
+ {% if site.data.site.lang == 'zh-CN' %}
2
+ {% assign lang = site.data.lang[site.data.site.lang] %}
3
+ {% else %}
4
+ {% assign lang = site.data.lang.en-US %}
5
+ {% endif %}
6
+ <button class="mdui-btn mdui-btn-icon" mdui-tooltip="{content: '{{lang.share.share }}', delay: 100}" mdui-menu="{target: '#k-sns_share',align:'right',covered:false}"><i class="mdui-icon material-icons">&#xe80d;</i></button>
7
+ <ul class="mdui-menu" id="k-sns_share">
8
+ {% if site.data.site.sns_share.weibo == true %}
9
+ <li class="mdui-menu-item">
10
+ <a href="http://service.weibo.com/share/share.php?appkey=&title={{page.title}}&url={{page.url | absolute_url }}&pic=&searchPic=false&style=simple" target="_blank" class="mdui-ripple">{{lang.share.toWeibo }}</a>
11
+ </li>
12
+ {% endif %}
13
+ {% if site.data.site.sns_share.twitter == true %}
14
+ <li class="mdui-menu-item">
15
+ <a href="https://twitter.com/intent/tweet?text={{page.title}}&url={{page.url | absolute_url }}&via={{site.author}}" target="_blank" class="mdui-ripple">{{lang.share.toTwitter }}</a>
16
+ </li>
17
+ {% endif %}
18
+ {% if site.data.site.sns_share.facebook == true %}
19
+ <li class="mdui-menu-item">
20
+ <a href="https://www.facebook.com/sharer/sharer.php?u={{page.url | absolute_url }}" target="_blank" class="mdui-ripple">{{lang.share.toFacebook }}</a>
21
+ </li>
22
+ {% endif %}
23
+ {% if site.data.site.sns_share.googleplus == true %}
24
+ <li class="mdui-menu-item">
25
+ <a href="https://plus.google.com/share?url={{page.url | absolute_url }}" target="_blank" class="mdui-ripple">{{lang.share.toGoogleplus }}</a>
26
+ </li>
27
+ {% endif %}
28
+ {% if site.data.site.sns_share.linkedin == true %}
29
+ <li class="mdui-menu-item">
30
+ <a href="https://www.linkedin.com/shareArticle?mini=true&url={{page.url | absolute_url }}&title={{page.title}}" target="_blank" class="mdui-ripple">{{lang.share.toLinkedin }}</a>
31
+ </li>
32
+ {% endif %}
33
+ {% if site.data.site.sns_share.qq == true %}
34
+ <li class="mdui-menu-item">
35
+ <a href="http://connect.qq.com/widget/shareqq/index.html?site={{site.title}}&title={{page.title}}&summary={{ page.excerpt | strip_html}}&pics={{site.data.site.head.favicon | absolute_url }}&url={{page.url | absolute_url }}" target="_blank" class="mdui-ripple">{{lang.share.toQq }}</a>
36
+ </li>
37
+ {% endif %}
38
+ {% if site.data.site.sns_share.telegram == true %}
39
+ <li class="mdui-menu-item">
40
+ <a href="javascript:;" target="_blank" class="mdui-ripple">{{lang.share.toTelegram }}</a>
41
+ </li>
42
+ {% endif %}
43
+ </ul>
data/_layouts/home.html CHANGED
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+ {% if site.data.site.lang == 'zh-CN' %}
5
+ {% assign lang = site.data.lang[site.data.site.lang] %}
6
+ {% else %}
7
+ {% assign lang = site.data.lang.en-US %}
8
+ {% endif %}
4
9
  <div class="k-container">
5
10
  <div class="k-posts-list">
6
11
  {% for post in paginator.posts %}
@@ -12,8 +17,8 @@ layout: default
12
17
  </div>
13
18
  </div>
14
19
  </div>
15
- <div class="mdui-card-content mdui-text-color-black-secondary">
16
- {{ post.excerpt | strip_html}} <a class="mdui-typo" href="{{post.url | prepend: site.baseurl}}">阅读更多</a>
20
+ <div class="mdui-card-content mdui-text-color-black-secondary mdui-typo">
21
+ {{ post.excerpt | strip_html}} <a href="{{post.url | prepend: site.baseurl}}">{{lang.post.continue}}</a>
17
22
  </div>
18
23
  <div class="mdui-divider"></div>
19
24
  <div class="mdui-card-header">
data/_layouts/post.html CHANGED
@@ -14,6 +14,10 @@ layout: default
14
14
  </div>
15
15
  </div>
16
16
  <div class="mdui-card-header">
17
+ <div class="mdui-card-menu">
18
+ {% include qrcode.html %}
19
+ {% include sns_share.html %}
20
+ </div>
17
21
  <img class="mdui-card-header-avatar" src="{{site.data.site.img.avatar}}" />
18
22
  <div class="mdui-card-header-title">{{site.author}}</div>
19
23
  <div class="mdui-card-header-subtitle">{{ page.date | date: "%b %-d, %Y" }}</div>
data/assets/css/main.css CHANGED
@@ -2,6 +2,11 @@
2
2
  layout: compress
3
3
  ---
4
4
 
5
+ #k-qrcode{
6
+ padding-bottom: 0px;
7
+ width: 215px;
8
+ }
9
+
5
10
  body{
6
11
  transition: opacity .2s;
7
12
  opacity: 1!important;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-mdui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - KeJun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-09 00:00:00.000000000 Z
11
+ date: 2017-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -82,7 +82,9 @@ files:
82
82
  - _includes/header.html
83
83
  - _includes/main.html
84
84
  - _includes/note.html
85
+ - _includes/qrcode.html
85
86
  - _includes/script.html
87
+ - _includes/sns_share.html
86
88
  - _includes/test.html
87
89
  - _includes/tips.html
88
90
  - _includes/toc.html