jekyll-theme-mdui 0.2.5 → 0.3.0
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 +4 -4
- data/README.md +33 -55
- data/_includes/analytics.html +1 -1
- data/_includes/disqus.html +4 -4
- data/_includes/head.html +6 -1
- data/_includes/script.html +129 -107
- data/_layouts/default.html +2 -5
- data/_layouts/home.html +2 -2
- data/_layouts/page.html +1 -1
- data/_layouts/post.html +1 -1
- data/assets/css/main.css +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab00294c8ea9ce48a3d14edc59e2fb1642136560
|
|
4
|
+
data.tar.gz: 973ad6cf99d1a30d767a412a6a0d7aebee648583
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 971edcdd246fdefe090aa15c7500ea8b05d1012622986f51ff90345eb1d7c37d8447baeceecbbc28d6eba86981054d21ab04b4f2e9c36a08ee305e730333a499
|
|
7
|
+
data.tar.gz: 95cbb8f7dfaa1423b2df9125f390c840bb28519b79d1e74ca5aeb107293b6c7aee383fec79bb21630b251a35eb57a808f8cb345e0c97b4ca4cb809ee633b00ac
|
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
|
-
[]()
|
|
8
8
|
[](https://jekyllrb.com/)
|
|
9
9
|
[](https://rubygems.org/gems/jekyll-theme-mdui/)
|
|
10
10
|
|
|
@@ -67,23 +67,15 @@ jekyll s -w
|
|
|
67
67
|
### _config
|
|
68
68
|
|
|
69
69
|
```yml
|
|
70
|
-
title: "
|
|
71
|
-
description: "
|
|
70
|
+
title: "Jekyll-Theme-MDUI" # Your site title
|
|
71
|
+
description: "A Jekyll theme based on MDUI" # Your site description
|
|
72
72
|
url: # Your site url
|
|
73
73
|
baseurl: # baseurl
|
|
74
|
-
author: "
|
|
75
|
-
|
|
76
|
-
lang: "zh-CN" # lang
|
|
74
|
+
author: "KeJun" # Your name
|
|
75
|
+
|
|
77
76
|
paginate: 5 # paginate
|
|
78
77
|
paginate_path: "/blog/page:num/" # paginate path
|
|
79
78
|
|
|
80
|
-
disqus_shortname: "" # Your disqus
|
|
81
|
-
disqus_proxy: false # disqus proxy(Do not use)
|
|
82
|
-
disqus_proxy_url: "" # (Do not use)
|
|
83
|
-
disqus_api_key: "" # (Do not use)
|
|
84
|
-
|
|
85
|
-
google_analytics: "" # Your google analytics ID
|
|
86
|
-
|
|
87
79
|
gems: # paginate gem
|
|
88
80
|
- jekyll-paginate
|
|
89
81
|
```
|
|
@@ -111,57 +103,43 @@ Default does not display the editor.If you want the editor to appear in the menu
|
|
|
111
103
|
```
|
|
112
104
|
* sns.yml
|
|
113
105
|
```yml
|
|
114
|
-
- name: bilibili # name
|
|
106
|
+
- name: bilibili # name
|
|
115
107
|
url: # url , if it is empty, it is not enabled
|
|
116
108
|
```
|
|
109
|
+
Supported:bilibili,facebook,github,gplus,instagram,linkedin,telegram,tumblr,twitter,weibo,zhihu
|
|
117
110
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
111
|
+
* site.yml
|
|
112
|
+
```yml
|
|
113
|
+
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" # 页面关键字
|
|
118
|
+
uiux:
|
|
119
|
+
android_chrome_color: "#607D8B" # 安卓 Chrome 浏览器的地址栏颜色。
|
|
120
|
+
nprogress_color: "#29d" # 页面加载时顶部加载进度条的颜色。
|
|
121
|
+
nprogress_buffer: 200 # 页面加载时顶部加载进度条的缓冲时间。
|
|
122
|
+
background:
|
|
123
|
+
purecolor: "#eeeeee" # 背景颜色
|
|
124
|
+
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 # 悬浮时加深阴影
|
|
129
|
+
disqus:
|
|
130
|
+
disqus_shortname: "kejun" # Your disqus
|
|
131
|
+
disqus_proxy: false
|
|
132
|
+
disqus_proxy_url: "" # disqus proxy(Do not use)
|
|
133
|
+
disqus_api_key: "" # (Do not use)
|
|
134
|
+
google_analytics: "" # (Do not use)
|
|
135
|
+
lang: "zh-CN" # lang
|
|
132
136
|
```
|
|
133
137
|
|
|
134
|
-
### tags.json
|
|
135
|
-
```json
|
|
136
|
-
---
|
|
137
|
-
---
|
|
138
|
-
{% capture tags %}
|
|
139
|
-
{% for tag in site.tags %}
|
|
140
|
-
{{ tag[0] }}
|
|
141
|
-
{% endfor %}
|
|
142
|
-
{% endcapture %}
|
|
143
|
-
{% assign sortedtags = tags | split:' ' | sort %}
|
|
144
|
-
[
|
|
145
|
-
{% for tag in sortedtags %}
|
|
146
|
-
{
|
|
147
|
-
"id" : "{{ tag | escape}}",
|
|
148
|
-
"post": [
|
|
149
|
-
{% for post in site.tags[tag] %}
|
|
150
|
-
{
|
|
151
|
-
"title": "{{ post.title | escape }}",
|
|
152
|
-
"excerpt": "{{ post.excerpt | strip_html | escape | strip_newlines}}",
|
|
153
|
-
"url": "{{ site.baseurl }}{{ post.url }}"
|
|
154
|
-
} {% unless forloop.last %},{% endunless %}
|
|
155
|
-
{% endfor %}]
|
|
156
|
-
} {% unless forloop.last %},{% endunless %}
|
|
157
|
-
{% endfor %}
|
|
158
|
-
]
|
|
159
|
-
```
|
|
160
138
|
### manifest.json
|
|
161
139
|
```json
|
|
162
140
|
{
|
|
163
141
|
"name": "KeJun BLOG",
|
|
164
|
-
"short_name": "KeJun",
|
|
142
|
+
"short_name": "KeJun",
|
|
165
143
|
"icons": [{
|
|
166
144
|
"src": "assets/images/touch/icon-128x128.png",
|
|
167
145
|
"sizes": "128x128",
|
data/_includes/analytics.html
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
4
4
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
5
5
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
6
|
-
ga('create', '{{ site.google_analytics }}', 'auto');
|
|
6
|
+
ga('create', '{{ site.data.site.google_analytics }}', 'auto');
|
|
7
7
|
ga('send', 'pageview');
|
|
8
8
|
</script>
|
data/_includes/disqus.html
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{% if site.disqus_shortname != "" %}
|
|
1
|
+
{% if site.data.site.disqus.disqus_shortname != "" %}
|
|
2
2
|
<div class="mdui-divider"></div>
|
|
3
|
-
{% if site.disqus_proxy == false %}
|
|
4
|
-
<button id="load-disqus" class="mdui-btn mdui-btn-block mdui-center" onclick="disqus.load();" data="{{ site.disqus_shortname }}">阅读评论 「请确保 Disqus 可以正常加载」</button>
|
|
3
|
+
{% 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>
|
|
5
5
|
<div id="disqus_thread"></div>
|
|
6
6
|
{% endif %}
|
|
7
|
-
{% if site.disqus_proxy %}
|
|
7
|
+
{% if site.data.site.disqus.disqus_proxy %}
|
|
8
8
|
<div class="mdui-divider"></div>
|
|
9
9
|
<div id="disqusreadonly" style="padding-top: 16px;">
|
|
10
10
|
</div>
|
data/_includes/head.html
CHANGED
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
5
|
<meta name="author" content="{{site.author}}">
|
|
6
|
+
<meta name="theme-color" content="{{ site.data.site.uiux.android_chrome_color }}">
|
|
6
7
|
{% if page.layout =="post" %}
|
|
7
8
|
<meta name="keywords" content="{% for pagetag in page.tags %}{{pagetag}} {% endfor %}">
|
|
9
|
+
{% else %}
|
|
10
|
+
<meta name="keywords" content="{{ site.data.site.head.keywords }}">
|
|
8
11
|
{% endif %}
|
|
9
|
-
<link href="{{ site.
|
|
12
|
+
<link rel="shortcut icon" href="{{ site.data.site.head.favicon }}">
|
|
13
|
+
<link rel="icon" sizes="192x192" href="{{ site.data.site.head.high_res_favicon }}">
|
|
14
|
+
<link rel="apple-touch-icon" href="{{ site.data.site.head.apple_touch_icon }}">
|
|
10
15
|
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
|
11
16
|
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
|
12
17
|
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
data/_includes/script.html
CHANGED
|
@@ -1,10 +1,135 @@
|
|
|
1
|
+
<!--/* global-script-start */-->
|
|
1
2
|
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
|
2
3
|
<script src="https://cdn.bootcss.com/mdui/0.2.1/js/mdui.min.js"></script>
|
|
3
4
|
<script src="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>
|
|
4
5
|
<script src="{{ "/assets/js/jquery.scrollToTop.js" | prepend: site.baseurl }}"></script>
|
|
6
|
+
<script type="text/javascript">
|
|
7
|
+
/* NProgress */
|
|
8
|
+
NProgress.configure({
|
|
9
|
+
showSpinner: true
|
|
10
|
+
});
|
|
11
|
+
NProgress.start();
|
|
12
|
+
$('#nprogress .bar').css({
|
|
13
|
+
'background': '{{site.data.site.uiux.nprogress_color}}'
|
|
14
|
+
});
|
|
15
|
+
$('#nprogress .peg').css({
|
|
16
|
+
'box-shadow': '0 0 10px {{site.data.site.uiux.nprogress_color}}, 0 0 15px {{site.data.site.uiux.nprogress_color}}'
|
|
17
|
+
});
|
|
18
|
+
$('#nprogress .spinner-icon').css({
|
|
19
|
+
'border-top-color': '{{site.data.site.uiux.nprogress_color}}',
|
|
20
|
+
'border-left-color': '{{site.data.site.uiux.nprogress_color}}'
|
|
21
|
+
});
|
|
22
|
+
setTimeout(function() {
|
|
23
|
+
NProgress.done();
|
|
24
|
+
},{{site.data.site.uiux.nprogress_buffer}});
|
|
25
|
+
/* serviceWorker */
|
|
26
|
+
$(function(){
|
|
27
|
+
if ('serviceWorker' in navigator) {
|
|
28
|
+
navigator.serviceWorker.register("{{ "/sw.js" | relative_url }}").then(function() {
|
|
29
|
+
console.log("Service Worker Registered");
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
Array.prototype.forEach.call(document.querySelectorAll(".mdui-card-media"), function(a) {
|
|
33
|
+
var b = a.querySelector("a");
|
|
34
|
+
if (!b) {
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
var c = b.getAttribute("href");
|
|
38
|
+
if (!c) {
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
a.addEventListener("click", function() {
|
|
42
|
+
location.href = c
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
$("#toTop").scrollToTop();
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
<!--/* global-script-end */-->
|
|
49
|
+
<!--/* search-script-start */-->
|
|
5
50
|
{% if page.layout =='search' %}
|
|
6
51
|
<script src="{{ "/assets/js/jquery.typeahead.min.js" | prepend: site.baseurl }}"></script>
|
|
52
|
+
<script>
|
|
53
|
+
var names = new Array();
|
|
54
|
+
var urls = new Array();
|
|
55
|
+
$.getJSON("{{ "/search.json" | relative_url }}").done(function(data){
|
|
56
|
+
for (var index in data){
|
|
57
|
+
var item = data[index];
|
|
58
|
+
names[index] = item.title;
|
|
59
|
+
urls[names[index]] = item.url
|
|
60
|
+
}
|
|
61
|
+
$.typeahead({
|
|
62
|
+
input: '.js-typeahead-country_v1',
|
|
63
|
+
order: "desc",
|
|
64
|
+
source: {
|
|
65
|
+
data: names
|
|
66
|
+
},
|
|
67
|
+
selector: {
|
|
68
|
+
container: "typeahead__container",
|
|
69
|
+
result: " mdui-card k-search-card",
|
|
70
|
+
list: "mdui-list",
|
|
71
|
+
item: "mdui-list-item"
|
|
72
|
+
},
|
|
73
|
+
callback: {
|
|
74
|
+
onClick: function (node,a,item,event){
|
|
75
|
+
window.location.href = urls[item.display];
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
</script>
|
|
81
|
+
{% endif %}
|
|
82
|
+
<!--/* search-script-end */-->
|
|
83
|
+
<!--/* post-script-start */-->
|
|
84
|
+
{% if page.layout == "post" or page.layout == "page"%}
|
|
85
|
+
|
|
86
|
+
<script>
|
|
87
|
+
/* Disqus */
|
|
88
|
+
var disqus = {
|
|
89
|
+
load : function disqus(){
|
|
90
|
+
var disqus_shortname = $("#load-disqus").attr("data");
|
|
91
|
+
if(typeof DISQUS !== 'object') {
|
|
92
|
+
(function () {
|
|
93
|
+
var s = document.createElement('script'); s.async = true;
|
|
94
|
+
s.type = 'text/javascript';
|
|
95
|
+
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
|
96
|
+
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
|
97
|
+
}());
|
|
98
|
+
$('#load-disqus').remove();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
</script>
|
|
103
|
+
{% endif %}
|
|
104
|
+
|
|
105
|
+
{% if page.layout == "post" %}
|
|
106
|
+
<script src="https://cdn.bootcss.com/highlight.js/9.11.0/highlight.min.js"></script>
|
|
107
|
+
<script src="{{ "/assets/js/toc.min.js" | prepend: site.baseurl }}"></script>
|
|
108
|
+
<script src="{{ "/assets/js/pushpin.js" | prepend: site.baseurl }}"></script>
|
|
109
|
+
<script>
|
|
110
|
+
$(function(){
|
|
111
|
+
$('.mdui-card-content').find('a').attr('target','_blank');
|
|
112
|
+
$("div.k-page-col").css('margin',0);
|
|
113
|
+
hljs.initHighlightingOnLoad();
|
|
114
|
+
$('#toc').toc({
|
|
115
|
+
'selectors': 'h2',
|
|
116
|
+
'prefix': 'toc',
|
|
117
|
+
'highlightOffset': 64
|
|
118
|
+
});
|
|
119
|
+
$("#toc").find("ul").fadeIn(1000);
|
|
120
|
+
var tocBottom = $('.mdui-card-content').offset().top + $('.mdui-card-content').height() - $('#toc-card').height();
|
|
121
|
+
var tocOffset = $('.k-post-media').offset().top;
|
|
122
|
+
var tocTop = $('.mdui-card-header').offset().top;
|
|
123
|
+
$('#toc-card').pushpin({
|
|
124
|
+
top: tocTop,
|
|
125
|
+
bottom: 99999,
|
|
126
|
+
offset: tocOffset
|
|
127
|
+
});
|
|
128
|
+
})
|
|
129
|
+
</script>
|
|
7
130
|
{% endif %}
|
|
131
|
+
<!--/* post-script-end */-->
|
|
132
|
+
<!--/* editor-script-start */-->
|
|
8
133
|
{% if page.layout =='editor' %}
|
|
9
134
|
<script src="{{ "/assets/js/pickerdata.js" | prepend: site.baseurl }}"></script>
|
|
10
135
|
<script src="{{ "/assets/js/chips.js" | prepend: site.baseurl }}"></script>
|
|
@@ -117,86 +242,10 @@ $(function(){
|
|
|
117
242
|
});
|
|
118
243
|
</script>
|
|
119
244
|
{% endif %}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
showSpinner: true
|
|
123
|
-
});
|
|
124
|
-
NProgress.start();
|
|
125
|
-
setTimeout(function() {
|
|
126
|
-
NProgress.done();
|
|
127
|
-
},200);
|
|
128
|
-
var disqus = {
|
|
129
|
-
load : function disqus(){
|
|
130
|
-
var disqus_shortname = $("#load-disqus").attr("data");
|
|
131
|
-
if(typeof DISQUS !== 'object') {
|
|
132
|
-
(function () {
|
|
133
|
-
var s = document.createElement('script'); s.async = true;
|
|
134
|
-
s.type = 'text/javascript';
|
|
135
|
-
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
|
136
|
-
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
|
137
|
-
}());
|
|
138
|
-
$('#load-disqus').remove();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
</script>
|
|
143
|
-
<script>
|
|
144
|
-
$(function(){
|
|
145
|
-
if ('serviceWorker' in navigator) {
|
|
146
|
-
navigator.serviceWorker.register("{{ "/sw.js" | relative_url }}").then(function() {
|
|
147
|
-
console.log("Service Worker Registered");
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
Array.prototype.forEach.call(document.querySelectorAll(".mdui-card-media"), function(a) {
|
|
151
|
-
var b = a.querySelector("a");
|
|
152
|
-
if (!b) {
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
|
-
var c = b.getAttribute("href");
|
|
156
|
-
if (!c) {
|
|
157
|
-
return
|
|
158
|
-
}
|
|
159
|
-
a.addEventListener("click", function() {
|
|
160
|
-
location.href = c
|
|
161
|
-
})
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
$("#toTop").scrollToTop();
|
|
165
|
-
{% if page.layout =='search' %}
|
|
166
|
-
var names = new Array();
|
|
167
|
-
var urls = new Array();
|
|
168
|
-
$.getJSON("{{ "/search.json" | relative_url }}").done(function(data){
|
|
169
|
-
for (var index in data){
|
|
170
|
-
var item = data[index];
|
|
171
|
-
names[index] = item.title;
|
|
172
|
-
urls[names[index]] = item.url
|
|
173
|
-
}
|
|
174
|
-
$.typeahead({
|
|
175
|
-
input: '.js-typeahead-country_v1',
|
|
176
|
-
order: "desc",
|
|
177
|
-
source: {
|
|
178
|
-
data: names
|
|
179
|
-
},
|
|
180
|
-
selector: {
|
|
181
|
-
container: "typeahead__container",
|
|
182
|
-
result: " mdui-card k-search-card",
|
|
183
|
-
list: "mdui-list",
|
|
184
|
-
item: "mdui-list-item"
|
|
185
|
-
},
|
|
186
|
-
callback: {
|
|
187
|
-
onClick: function (node,a,item,event){
|
|
188
|
-
window.location.href = urls[item.display];
|
|
189
|
-
},
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
{% endif %}
|
|
194
|
-
});
|
|
195
|
-
</script>
|
|
196
|
-
|
|
245
|
+
<!--/* editor-script-end */-->
|
|
246
|
+
<!--/* tags-script-start */-->
|
|
197
247
|
{% if page.layout == "tags" %}
|
|
198
248
|
<script>
|
|
199
|
-
|
|
200
249
|
$(function(){
|
|
201
250
|
var tagid;
|
|
202
251
|
$(".k-tagcloud").on("click",function(e){
|
|
@@ -223,35 +272,8 @@ $(function(){
|
|
|
223
272
|
}
|
|
224
273
|
})
|
|
225
274
|
}
|
|
226
|
-
|
|
227
|
-
|
|
275
|
+
});
|
|
228
276
|
})
|
|
229
277
|
</script>
|
|
230
278
|
{% endif %}
|
|
231
|
-
|
|
232
|
-
{% if page.layout == "post" %}
|
|
233
|
-
<script src="https://cdn.bootcss.com/highlight.js/9.11.0/highlight.min.js"></script>
|
|
234
|
-
<script src="{{ "/assets/js/toc.min.js" | prepend: site.baseurl }}"></script>
|
|
235
|
-
<script src="{{ "/assets/js/pushpin.js" | prepend: site.baseurl }}"></script>
|
|
236
|
-
<script>
|
|
237
|
-
$(function(){
|
|
238
|
-
$('.mdui-card-content').find('a').attr('target','_blank');
|
|
239
|
-
$("div.k-page-col").css('margin',0);
|
|
240
|
-
hljs.initHighlightingOnLoad();
|
|
241
|
-
$('#toc').toc({
|
|
242
|
-
'selectors': 'h2',
|
|
243
|
-
'prefix': 'toc',
|
|
244
|
-
'highlightOffset': 64
|
|
245
|
-
});
|
|
246
|
-
$("#toc").find("ul").fadeIn(1000);
|
|
247
|
-
var tocBottom = $('.mdui-card-content').offset().top + $('.mdui-card-content').height() - $('#toc-card').height();
|
|
248
|
-
var tocOffset = $('.k-post-media').offset().top;
|
|
249
|
-
var tocTop = $('.mdui-card-header').offset().top;
|
|
250
|
-
$('#toc-card').pushpin({
|
|
251
|
-
top: tocTop,
|
|
252
|
-
bottom: 99999,
|
|
253
|
-
offset: tocOffset
|
|
254
|
-
});
|
|
255
|
-
})
|
|
256
|
-
</script>
|
|
257
|
-
{% endif %}
|
|
279
|
+
<!--/* tags-script-end */-->
|
data/_layouts/default.html
CHANGED
|
@@ -2,18 +2,15 @@
|
|
|
2
2
|
layout: compress
|
|
3
3
|
---
|
|
4
4
|
<!DOCTYPE html>
|
|
5
|
-
<html lang="{{site.lang}}">
|
|
5
|
+
<html lang="{{site.data.site.lang}}">
|
|
6
6
|
{% include head.html %}
|
|
7
7
|
<body class="mdui-appbar-with-toolbar mdui-theme-primary-white mdui-theme-accent-blue" style="opacity: 0;">
|
|
8
8
|
{% include header.html %}
|
|
9
9
|
{% include main.html %}
|
|
10
10
|
{% include footer.html %}
|
|
11
11
|
{% include script.html %}
|
|
12
|
-
{% if site.google_analytics != "" %}
|
|
12
|
+
{% if site.data.site.google_analytics != "" %}
|
|
13
13
|
{% include analytics.html %}
|
|
14
14
|
{% endif %}
|
|
15
|
-
{% if site.disqus_proxy %}
|
|
16
|
-
{% include test.html %}
|
|
17
|
-
{% endif %}
|
|
18
15
|
</body>
|
|
19
16
|
</html>
|
data/_layouts/home.html
CHANGED
|
@@ -4,7 +4,7 @@ layout: default
|
|
|
4
4
|
<div class="k-container">
|
|
5
5
|
<div class="k-posts-list">
|
|
6
6
|
{% for post in paginator.posts %}
|
|
7
|
-
<div class="mdui-card k-list-card mdui-shadow-
|
|
7
|
+
<div class="mdui-card k-list-card mdui-shadow-{{site.data.site.card.card_shadow}} {% if site.data.site.card.card_hoverable == true%}mdui-hoverable{% endif %}">
|
|
8
8
|
<div class="mdui-card-media k-post-media" style="background-image: url({{post.img}});">
|
|
9
9
|
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
|
10
10
|
<div class="mdui-card-primary">
|
|
@@ -17,7 +17,7 @@ layout: default
|
|
|
17
17
|
</div>
|
|
18
18
|
<div class="mdui-divider"></div>
|
|
19
19
|
<div class="mdui-card-header">
|
|
20
|
-
<img class="mdui-card-header-avatar" src="{{site.avatar}}" />
|
|
20
|
+
<img class="mdui-card-header-avatar" src="{{site.data.site.img.avatar}}" />
|
|
21
21
|
<div class="mdui-card-header-title">{{site.author}}</div>
|
|
22
22
|
<div class="mdui-card-header-subtitle">{{ post.date | date: "%b %-d, %Y" }}</div>
|
|
23
23
|
</div>
|
data/_layouts/page.html
CHANGED
|
@@ -14,7 +14,7 @@ layout: default
|
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="mdui-card-header">
|
|
17
|
-
<img class="mdui-card-header-avatar" src="{{site.avatar}}" />
|
|
17
|
+
<img class="mdui-card-header-avatar" src="{{site.data.site.img.avatar}}" />
|
|
18
18
|
<div class="mdui-card-header-title">{{site.author}}</div>
|
|
19
19
|
<div class="mdui-card-header-subtitle">{{ page.date | date: "%b %-d, %Y" }}</div>
|
|
20
20
|
</div>
|
data/_layouts/post.html
CHANGED
|
@@ -14,7 +14,7 @@ layout: default
|
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="mdui-card-header">
|
|
17
|
-
<img class="mdui-card-header-avatar" src="{{site.avatar}}" />
|
|
17
|
+
<img class="mdui-card-header-avatar" src="{{site.data.site.img.avatar}}" />
|
|
18
18
|
<div class="mdui-card-header-title">{{site.author}}</div>
|
|
19
19
|
<div class="mdui-card-header-subtitle">{{ page.date | date: "%b %-d, %Y" }}</div>
|
|
20
20
|
</div>
|
data/assets/css/main.css
CHANGED
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.
|
|
4
|
+
version: 0.3.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-
|
|
11
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -38,20 +38,6 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '1.1'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: jekyll-feed
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0.6'
|
|
48
|
-
type: :runtime
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0.6'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
42
|
name: bundler
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|