jekyll-theme-materialize 0.0.5 → 0.0.6

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: 8a15802e3191e4a96398cd1e7d93d60545ad099f
4
- data.tar.gz: 450b350332a64fa5bdeeab58f39a757a3dc8f8be
3
+ metadata.gz: 4fa6c4ba74b80647ba0ceb8d207e1a5fd04446d9
4
+ data.tar.gz: bd00e20a49e8e54126be9dc94e601f50e6713231
5
5
  SHA512:
6
- metadata.gz: 682df923c2c06d7f255323958f8e807f7b236428e597d01836da8ac5e19d780e9ae8bc1973341ef9cc002db868900ea8cc20f591b87a1b74b17614ea9de9cf47
7
- data.tar.gz: a0bbf6b6a85a7bfab94380b61e4885aaa46ef510602e1abf13cb2ecf2ad27a112edfa54826f0ebc15dd9de2604f81feb09c89ae084799a189bf9c539b7966786
6
+ metadata.gz: e361ef3713a9397982cd8069fb5468a1d6ecb71b03512cfabfc90964bb36415a36ca6ce9cda6482a1a45a77f89470d17a64942d887285669f810252196e06f34
7
+ data.tar.gz: 19a798facaebcfb6fc018688ed6f1a43c8e403825a2e04e9d4c6e7bcd85927f17cdbc2284372c0d92536ed164f403e0e86a42e63b635d86171afcad0981f9126
data/README.md CHANGED
@@ -1,19 +1,34 @@
1
1
  # jekyll-theme-materialize
2
2
 
3
- [![Build Status](https://travis-ci.org/KeJunMao/jekyll-theme-materialize.svg?branch=master)](https://travis-ci.org/KeJunMao/jekyll-theme-materialize)[![Gem Version](https://badge.fury.io/rb/jekyll-theme-materialize.svg)](https://badge.fury.io/rb/jekyll-theme-materialize)
3
+ travis-ci:[![Build Status](https://travis-ci.org/KeJunMao/jekyll-theme-materialize.svg?branch=master)](https://travis-ci.org/KeJunMao/jekyll-theme-materialize)
4
+
5
+ jekyll-theme-materialize:[![jekyll-theme-materialize Version](https://badge.fury.io/rb/jekyll-theme-materialize.svg)](https://badge.fury.io/rb/jekyll-theme-materialize)
6
+
7
+ jekyll-lunr-js-search:[![jekyll-lunr-js-search Version](https://badge.fury.io/rb/jekyll-lunr-js-search.svg)](https://badge.fury.io/rb/jekyll-lunr-js-search)
8
+
9
+ ## 预览
10
+
11
+ [coding page(中国)](http://KeJun.coding.me/jekyll-theme-materialize-site/)
12
+ [github page](https://kejunmao.github.io/jekyll-theme-materialize-site/)
4
13
 
5
14
  ## 安装
6
15
 
7
16
  添加下行到你 Jekyll 的 `Gemfile`文件中:
8
17
 
9
18
  ```ruby
19
+ #安装主题
10
20
  gem "jekyll-theme-materialize"
21
+ #安装搜索依赖
22
+ gem "jekyll-lunr-js-search"
11
23
  ```
12
24
 
13
25
  添加下行到你 Jekyll 的`_config.yml`文件中 :
14
26
 
15
27
  ```yaml
28
+ #启用主题
16
29
  theme: jekyll-theme-materialize
30
+ #启用搜索
31
+ gems: ['jekyll-lunr-js-search']
17
32
  ```
18
33
 
19
34
  然后执行:
@@ -50,7 +65,7 @@ theme-color: {
50
65
 
51
66
  # mobile nav
52
67
  mobile-hp: /images/tx.jpg # 头像
53
- mobile-bg: /images/userbg.png # 背景
68
+ mobile-bg: /images/userbg.png # 背景,若填写theme则使用主题色。
54
69
 
55
70
  # disqus
56
71
  disqus-shortname: blog-kejun-tk #disqus shortname
@@ -103,6 +118,16 @@ layout: default
103
118
  describe: Material Design爱好者
104
119
  ```
105
120
 
121
+ footer的各种站点URL,请按如下格式填写至`_data/myherfs.yml`的url即可,!请勿更改name!:
122
+
123
+ ```yaml
124
+ - name: github
125
+ url: http://gihub.com
126
+ ```
127
+
128
+ 若想要自定义顺序,你可以调整他们的整体顺序。
129
+
130
+
106
131
  ## 注意
107
132
 
108
133
  该主题引用的`gallery.min.opt.js`及`gallery-materialize.min.opt.css`文件并没有经过原开发者同意。若侵权,请告知并删除。
@@ -125,15 +150,7 @@ layout: default
125
150
  * toc # 完成
126
151
  * 图像加载动画 # 完成
127
152
  * 二次元化选项 # 二次元最棒惹~
128
- * 搜索 # 添加搜索插件(仅支持英文),若需自定义,请访问:https://github.com/slashdotdash/jekyll-lunr-js-search
129
-
130
- ## Development
131
-
132
- To set up your environment to develop this theme, run `bundle install`.
133
-
134
- 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.
135
-
136
- When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
153
+ * 搜索 # 完成(仅支持英文),若需自定义,请访问:https://github.com/slashdotdash/jekyll-lunr-js-search
137
154
 
138
155
  ## License
139
156
 
@@ -1,20 +1,51 @@
1
1
  <footer class="page-footer {% 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 %}">
2
-
3
- <div class="container">
4
2
  <div class="row">
5
- <div class="col l6 s12">
6
- <h5 class="white-text">{{ site.title }}</h5>
7
- <ul>
8
- <li></li>
9
- <li><a href="mailto:{{ site.email }}" class="grey-text text-lighten-4">{{ site.email }}</a></li>
10
- </ul>
3
+ <div class="col s12 m4 l4">
4
+ <p class="center p-linkIcon">
5
+ {% for href in site.data.myherfs %}
6
+ {% if href.url!="" %}
7
+ <a href="{{ href.url }}"><img class="linkIcon center" src="{{ "/images/footer/footer_ico-" | prepend: site.baseurl }}{{ href.name }}.png" alt=""></a>
8
+ {% endif %}
9
+ {% endfor %}
10
+ </p>
11
+ </div>
12
+ <div class="col s12 m4 l4">
13
+ <p class="p-date grey-text text-lighten-4 center">Copyright © 2017 {{ site.title }}</p>
14
+ </div>
15
+ <div class="col s12 m4 l4 right">
16
+ <div class="row copyright-row">
17
+ <div class="col s12 center white-text">
18
+ Powered by <a class="white-text" href="https://jekyllrb.com/">Jekyll</a>
19
+ </div>
20
+ <div class="col s12 center white-text">
21
+ Theme by <a class="white-text" href="https://rubygems.org/gems/jekyll-theme-materialize">KeJun</a>
22
+ </div>
23
+ </div>
11
24
  </div>
12
25
  </div>
13
- </div>
14
26
  <div class="footer-copyright">
15
27
  <div class="container">
16
- © 2016-2017 KeJun, Powered by <a class="white-text" href="https://jekyllrb.com/">Jekyll</a>, All rights reserved.
28
+ All rights reserved.
17
29
  <a class="grey-text text-lighten-4 right" href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a>
18
30
  </div>
19
31
  </div>
20
- </footer>
32
+ </footer>
33
+ <style>
34
+ .linkIcon{
35
+ width: 30px;
36
+ opacity: .60;
37
+ margin-right: 20px;
38
+ }
39
+ .p-linkIcon{
40
+ line-height: 0px;
41
+ margin-top: 0px;
42
+ }
43
+ .p-date{
44
+ margin-top: 0px;
45
+ line-height: 42px;
46
+ margin-bottom: 0px;
47
+ }
48
+ .copyright-row{
49
+ margin-bottom: 0px;
50
+ }
51
+ </style>
@@ -25,7 +25,17 @@
25
25
  <a href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a>
26
26
  </li>
27
27
  {% endif %} {% endif %} {% endfor %}
28
+ <li class="nav-search">
29
+ <div class="nav-search-wrapper">
30
+ <input id="nav-search"><i class="search material-icons">search</i>
31
+ <div id="nav-search-results" class="nav-search-results card">
32
+
33
+ </div>
34
+ </div>
35
+ </li>
28
36
  </ul>
37
+ <style>
38
+ </style>
29
39
  <!--页面的标题-->
30
40
  <div class="nav-header de">
31
41
  {% for page in (1..paginator.total_pages) %} {% if page == paginator.page %}
@@ -81,10 +91,12 @@
81
91
  <!--移动端nav-->
82
92
  <ul id="slide-out" class="side-nav">
83
93
  <li>
84
- <div class="userView">
94
+ <div class="userView {% if site.mobile-bg=="theme-color" %} {% 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 %} {% endif %}">
95
+ {% if site.mobile-bg != "theme" %}
85
96
  <div class="background">
86
97
  <img style="width:300px;height:160px;" src="{{ site.mobile-bg | prepend: site.baseurl }}">
87
- </div>
98
+ </div>
99
+ {% endif %}
88
100
  <a href="{{ site.baseurl }}/"><img class="circle" src="{{ site.mobile-hp | prepend: site.baseurl }}"></a>
89
101
  <a href="#!"><span class="white-text name">{{ site.title }}</span></a>
90
102
  <a href="mailto:{{ site.email }}"><span class="white-text email">{{ site.email }}</span></a>
@@ -117,12 +129,16 @@
117
129
  <li>
118
130
  <a class="tooltipped" data-position="right" data-delay="50" data-tooltip="{{#date}}{{pubdate}}{{/date}}" href="{% endraw %}{{ site.baseurl }}{% raw %}{{url}}">{{title}}</a>
119
131
  </li>
120
- <!--{{#date}}<small><time datetime="{{pubdate}}" pubdate>{{displaydate}}</time></small>{{/date}}-->
121
- <!--{{#is_post}}
122
- <ul>
123
- {{#tags}}<li>{{.}} </li>{{/tags}}
124
- </ul>
125
- {{/is_post}}-->
126
132
  {{/entries}}
127
133
  </script>
134
+ <script id="search-results-nav" type="text/mustache">
135
+ <div class="center">
136
+ {{#entries}}
137
+ <ul>
138
+ <li class="post-list"><a class="waves-effect post-list black-text" data-tooltip="{{#date}}{{pubdate}}{{/date}}" href="{% endraw %}{{ site.baseurl }}{% raw %}{{url}}">{{title}}</a></li>
139
+ </ul>
140
+
141
+ {{/entries}}
142
+ </div>
143
+ </script>
128
144
  {% endraw %}
@@ -16,5 +16,12 @@
16
16
  titleMsg : '<li><a class="subheader">Search results</a></li>', // message attached in front of results (can be empty)
17
17
  emptyMsg : '<li><a class="subheader">Nothing found.</a></li>' // shown message if search returns no results
18
18
  });
19
+ $('#nav-search').lunrSearch({
20
+ indexUrl : '{{ "/js/index.json" | prepend: site.baseurl }}', // url for the .json file containing search index data
21
+ results : '#nav-search-results', // selector for containing search results element
22
+ template : '#search-results-nav', // selector for Mustache.js template
23
+ titleMsg : '', // message attached in front of results (can be empty)
24
+ emptyMsg : '<li class="post-list"><a class="subheader black-text center">Nothing found.</a></li>' // shown message if search returns no results
25
+ });
19
26
  });
20
27
  </script>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-materialize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - KeJun