jekyll-theme-mdui 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/_includes/comment/gitment.html +17 -0
- data/_includes/component/totop.html +14 -0
- data/_includes/content/component/lazyload.html +8 -0
- data/_includes/content/component/page_tags.html +1 -1
- data/_includes/content/page_content.html +25 -1
- data/_includes/content/page_content_no_toc.html +6 -0
- data/_includes/content/paginator_post_list.html +28 -3
- data/_includes/content/tags_list.html +1 -1
- data/_includes/head.html +6 -2
- data/_includes/meng/aplayer.html +9 -1
- data/_includes/meng/console.html +1 -1
- data/_includes/meng/head_card.html +18 -4
- data/_layouts/default.html +2 -1
- data/assets/js/History.js +1 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e5a9dd3979a0763d59902767cda6ebb1c70964d
|
4
|
+
data.tar.gz: 1fa5e1894858be4b12a1e892b32d90e22e725bc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e7a9c4866a559f97b6613f391e4c83c24619f2773abfe006a604471824e49d18e59891e4e10bbd93fbc9a164b55c76388a2c42ce958e8cfb897ad98a3ed239
|
7
|
+
data.tar.gz: 39192275e82859c41357c7c8763e1c6b5fe3217f1e30c656f9c882cac02f30e9827cb58ab312cac3ec82dd4e3292739b38095972d53833c106aa72a6032ada36
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
## General
|
20
20
|
|
21
|
-
[![Version](https://img.shields.io/badge/version-0.5.
|
21
|
+
[![Version](https://img.shields.io/badge/version-0.5.1-green.svg?style=flat-square)]()
|
22
22
|
[![Jekyll](https://img.shields.io/badge/Jekyll-3.5+-green.svg?style=flat-square)](https://jekyllrb.com/)
|
23
23
|
[![Gem](https://img.shields.io/gem/dt/jekyll-theme-mdui.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-mdui/)
|
24
24
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div style="padding:0px 16px;" id="comments"></div>
|
2
|
+
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
|
3
|
+
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
4
|
+
<script>
|
5
|
+
setTimeout(function () {
|
6
|
+
var gitment = new Gitment({
|
7
|
+
id: '',
|
8
|
+
owner: '{{site.data.site.comment.owner}}',
|
9
|
+
repo: '{{site.data.site.comment.repo}}',
|
10
|
+
oauth: {
|
11
|
+
client_id: '{{site.data.site.comment.client_id}}',
|
12
|
+
client_secret: '{{site.data.site.comment.client_secret}}',
|
13
|
+
},
|
14
|
+
});
|
15
|
+
gitment.render('comments');
|
16
|
+
}, 1000)
|
17
|
+
</script>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<style>
|
2
|
+
.k-mdui-headroom-unpinned-top{
|
3
|
+
box-shadow: none!important;
|
4
|
+
-webkit-transform: translate3d(0,150%,0)!important;
|
5
|
+
transform: translate3d(0,150%,0)!important;
|
6
|
+
}
|
7
|
+
</style>
|
8
|
+
<button id="toTop" style="display:none;z-index: 1;" mdui-headroom="{unpinnedClass:'k-mdui-headroom-unpinned-top'}" class="mdui-fab mdui-color-white mdui-fab-fixed mdui-ripple"><i class="mdui-icon material-icons">expand_less</i></button>
|
9
|
+
<script>
|
10
|
+
(function($){$.fn.scrollToTop=function(options){var config={"speed":800};if(options){$.extend(config,{"speed":options})}return this.each(function(){var $this=$(this);$(window).scroll(function(){if($(this).scrollTop()>100){$this.fadeIn()}else{$this.fadeOut()}});$this.click(function(e){e.preventDefault();$("body, html").animate({scrollTop:0},config.speed)})})};$.fn.scrollBodyToTop=function(options){var config={"speed":800};if(options){$.extend(config,{"speed":options})}return this.each(function(){var $this=$(this);$(".placeholder").scroll(function(){if($(this).scrollTop()>100){$this.fadeIn()}else{$this.fadeOut()}});$this.click(function(e){e.preventDefault();$(".placeholder").animate({scrollTop:0},config.speed)})})}})(jQuery);
|
11
|
+
</script>
|
12
|
+
<script>
|
13
|
+
$("#toTop").scrollToTop();
|
14
|
+
</script>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<ul class="mdui-menu" id="k-page-tag">
|
13
13
|
{% for t in page.tags %}
|
14
14
|
<li class="mdui-menu-item">
|
15
|
-
|
15
|
+
<a id="tag_{{t}}" class="mdui-text-center" href="{{tag | prepend: site.baseurl }}" class="mdui-ripple">{{t}}</a>
|
16
16
|
</li>
|
17
17
|
{% endfor %}
|
18
18
|
</ul>
|
@@ -7,17 +7,40 @@
|
|
7
7
|
min-height: 245px;
|
8
8
|
background-position: 50% 50%;
|
9
9
|
background-size: cover;
|
10
|
-
background-color:
|
10
|
+
background-color: #303033;
|
11
11
|
}
|
12
12
|
.k-post-media .mdui-card-primary-title a {
|
13
13
|
text-decoration: none;
|
14
14
|
}
|
15
|
+
.k-noimg{
|
16
|
+
padding-left: 16px;
|
17
|
+
}
|
18
|
+
.k-noimg h1::before{
|
19
|
+
content: "“";
|
20
|
+
}
|
21
|
+
.k-noimg h1::after{
|
22
|
+
content: "”";
|
23
|
+
}
|
24
|
+
.k-noimg h1:before,.k-noimg h1:after{
|
25
|
+
display: block;
|
26
|
+
font-size: 80px;
|
27
|
+
margin-top: 40px;
|
28
|
+
}
|
29
|
+
.k-noimg a,.k-noimg h1{
|
30
|
+
text-decoration: none;
|
31
|
+
color: white;
|
32
|
+
}
|
15
33
|
</style>
|
16
34
|
<div id="postpage" class="mdui-container">
|
17
35
|
<div class="k-posts-list"></div>
|
18
36
|
<div class="mdui-row">
|
19
37
|
<div class="mdui-col-sm-12 k-page-col mdui-col-md-9">
|
20
38
|
<div class="mdui-card k-postcontent">
|
39
|
+
{% if page.img == "" or page.img == null %}
|
40
|
+
<div class="mdui-card-media mdui-ripple k-post-media mdui-valign k-noimg">
|
41
|
+
<h1><a>{{page.title}}</a></h3>
|
42
|
+
</div>
|
43
|
+
{% else %}
|
21
44
|
<div class="mdui-card-media k-post-media" style="background-image: url({{page.img}});">
|
22
45
|
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
23
46
|
<div class="mdui-card-primary">
|
@@ -25,6 +48,7 @@
|
|
25
48
|
</div>
|
26
49
|
</div>
|
27
50
|
</div>
|
51
|
+
{% endif %}
|
28
52
|
<div class="mdui-card-header">
|
29
53
|
<div class="mdui-card-menu">
|
30
54
|
{% include content/component/qrcode.html %}
|
@@ -17,6 +17,11 @@
|
|
17
17
|
<div class="mdui-row">
|
18
18
|
<div class="mdui-col-sm-12 k-page-col">
|
19
19
|
<div class="mdui-card k-postcontent">
|
20
|
+
{% if page.img == "" or page.img == null %}
|
21
|
+
<div class="mdui-card-media mdui-ripple k-post-media mdui-valign k-noimg">
|
22
|
+
<h1><a>{{page.title}}</a></h3>
|
23
|
+
</div>
|
24
|
+
{% else %}
|
20
25
|
<div class="mdui-card-media k-post-media" style="background-image: url({{page.img}});">
|
21
26
|
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
22
27
|
<div class="mdui-card-primary">
|
@@ -24,6 +29,7 @@
|
|
24
29
|
</div>
|
25
30
|
</div>
|
26
31
|
</div>
|
32
|
+
{% endif %}
|
27
33
|
<div class="mdui-card-header">
|
28
34
|
<div class="mdui-card-menu">
|
29
35
|
{% include content/component/qrcode.html %}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
min-height: 245px;
|
15
15
|
background-position: 50% 50%;
|
16
16
|
background-size: cover;
|
17
|
-
background-color:
|
17
|
+
background-color: #303033;
|
18
18
|
}
|
19
19
|
.k-post-media .mdui-card-primary-title a {
|
20
20
|
text-decoration: none;
|
@@ -22,16 +22,40 @@
|
|
22
22
|
.k-post-categories {
|
23
23
|
line-height: 40px;
|
24
24
|
}
|
25
|
+
.k-noimg{
|
26
|
+
padding-left: 16px;
|
27
|
+
}
|
28
|
+
.k-noimg h1::before{
|
29
|
+
content: "“";
|
30
|
+
}
|
31
|
+
.k-noimg h1::after{
|
32
|
+
content: "”";
|
33
|
+
}
|
34
|
+
.k-noimg h1:before,.k-noimg h1:after{
|
35
|
+
display: block;
|
36
|
+
font-size: 80px;
|
37
|
+
margin-top: 40px;
|
38
|
+
}
|
39
|
+
.k-noimg a,.k-noimg h1{
|
40
|
+
text-decoration: none;
|
41
|
+
color: white;
|
42
|
+
}
|
25
43
|
</style>
|
26
44
|
{% for post in paginator.posts %}
|
27
45
|
<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 %}">
|
28
|
-
|
46
|
+
{% if post.img == "" or post.img == null %}
|
47
|
+
<div class="mdui-card-media mdui-ripple k-post-media mdui-valign k-noimg">
|
48
|
+
<h1><a href="{{post.url| prepend: site.baseurl}}">{{post.title}}</a></h3>
|
49
|
+
</div>
|
50
|
+
{% else %}
|
51
|
+
<div class="mdui-card-media mdui-ripple k-post-media lazy" data-original="{{post.img}}" style="background-image:url()">
|
29
52
|
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
30
53
|
<div class="mdui-card-primary">
|
31
|
-
<div class="mdui-card-primary-title"><a class="mdui-text-color-white-text" href="{{post.url| prepend: site.baseurl}}
|
54
|
+
<div class="mdui-card-primary-title"><a class="mdui-text-color-white-text" href="{{post.url| prepend: site.baseurl}}">{{post.title}}</a></div>
|
32
55
|
</div>
|
33
56
|
</div>
|
34
57
|
</div>
|
58
|
+
{% endif %}
|
35
59
|
<div class="mdui-card-content mdui-text-color-black-secondary mdui-typo">
|
36
60
|
{{ post.excerpt | strip_html}} <a href="{{post.url | prepend: site.baseurl}}">{{lang.post.continue}}</a>
|
37
61
|
</div>
|
@@ -62,6 +86,7 @@
|
|
62
86
|
</div>
|
63
87
|
</div>
|
64
88
|
{% endfor %}
|
89
|
+
{% include content/component/lazyload.html %}
|
65
90
|
<script>
|
66
91
|
Array.prototype.forEach.call(document.querySelectorAll(".mdui-card-media"), function(a) {
|
67
92
|
var b = a.querySelector("a");
|
@@ -84,7 +84,6 @@ function getTagList(id){
|
|
84
84
|
}
|
85
85
|
})
|
86
86
|
}
|
87
|
-
var tagid;
|
88
87
|
var urltag = getUrlParam("tag");
|
89
88
|
if(urltag!=null){
|
90
89
|
getTagList(urltag);
|
@@ -96,5 +95,6 @@ $(".k-tagcloud").on("click",function(e){
|
|
96
95
|
getTagList(tagid);
|
97
96
|
}
|
98
97
|
});
|
98
|
+
getTagList(tagid)
|
99
99
|
})
|
100
100
|
</script>
|
data/_includes/head.html
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
|
21
21
|
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
22
22
|
<script src="https://cdn.bootcss.com/mdui/0.2.1/js/mdui.min.js"></script>
|
23
|
+
<script src="{{ "/assets/js/History.js" | prepend: site.baseurl }}"></script>
|
23
24
|
|
24
25
|
<link rel="preload" href="https://cdn.bootcss.com/mdui/0.2.1/css/mdui.min.css" as="style" onload="this.rel='stylesheet'">
|
25
26
|
<link rel="preload" href="{{ "/assets/css/global.css" | prepend: site.baseurl }}" as="style" onload="this.rel='stylesheet'">
|
@@ -28,16 +29,19 @@
|
|
28
29
|
|
29
30
|
{% include component/nprogress.html %}
|
30
31
|
<script>
|
31
|
-
(function(e,t){"use strict";var n=e.History=e.History||{},r=e.jQuery;if(typeof n.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(e,t,n){r(e).bind(t,n)},trigger:function(e,t,n){r(e).trigger(t,n)},extractEventData:function(e,n,r){var i=n&&n.originalEvent&&n.originalEvent[e]||r&&r[e]||t;return i},onDomLoad:function(e){r(e)}},typeof n.init!="undefined"&&n.init()})(window),function(e,t){"use strict";var n=e.console||t,r=e.document,i=e.navigator,s=!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;try{s=e.sessionStorage,s.setItem("TEST","1"),s.removeItem("TEST")}catch(d){s=!1}l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(e){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(d){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;s.length&&(s.removeItem("History.store"),s.setItem("History.store",n))}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window);
|
32
32
|
var defaultTitle = document.title;
|
33
33
|
var imgzoom = false;
|
34
|
+
var tagid;
|
34
35
|
jQuery(document).ready(function($) {
|
35
36
|
|
36
37
|
var siteUrl = 'http://'+(document.location.hostname||document.location.host);
|
37
38
|
var disqusstatus = {
|
38
39
|
flag: false,
|
39
40
|
};
|
40
|
-
$(document).delegate('a[href^="/"],a[href^="'+siteUrl+'"]', "click", function(e) {
|
41
|
+
$(document).delegate('a[href^="/"][target!="_blank"],a[href^="'+siteUrl+'"]', "click", function(e) {
|
42
|
+
if(e.currentTarget.id.indexOf('tag_')===0){
|
43
|
+
tagid = e.currentTarget.id.replace(/tag_/,"");
|
44
|
+
}
|
41
45
|
e.preventDefault();
|
42
46
|
History.pushState({}, "", this.pathname);
|
43
47
|
NProgress.start();
|
data/_includes/meng/aplayer.html
CHANGED
@@ -79,5 +79,13 @@ $('.k-music-btn').click(function(){
|
|
79
79
|
$('.k-music-card').css('transform','translateX(0px)');
|
80
80
|
flag = false;
|
81
81
|
}
|
82
|
-
})
|
82
|
+
});
|
83
|
+
document.addEventListener("visibilitychange", function() {
|
84
|
+
if(document.visibilityState == "hidden" ){
|
85
|
+
ap.pause();
|
86
|
+
}
|
87
|
+
if(document.visibilityState == "visible"){
|
88
|
+
ap.play();
|
89
|
+
}
|
90
|
+
}, false);
|
83
91
|
</script>
|
data/_includes/meng/console.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{% if site.data.meng.console.switch == true %}
|
2
2
|
{% if site.data.meng.console.theme_info == true %}
|
3
3
|
<script>
|
4
|
-
console.info("\n %c © Jekyll Theme MDUI | Version: 0.5.
|
4
|
+
console.info("\n %c © Jekyll Theme MDUI | Version: 0.5.1 | https://github.com/KeJunMao/jekyll-theme-mdui \n\n", "color: {{site.data.meng.console.color}}; background:{{site.data.meng.console.background}}; padding:5px 0; border-radius: 5px 5px 5px 5px;");
|
5
5
|
</script>
|
6
6
|
{% endif %}
|
7
7
|
<script>
|
@@ -1,4 +1,9 @@
|
|
1
1
|
{% assign head_card = site.data.meng.head_card %}
|
2
|
+
{% if site.data.site.lang == 'zh-CN' %}
|
3
|
+
{% assign lang = site.data.lang[site.data.site.lang].meng.head_card %}
|
4
|
+
{% else %}
|
5
|
+
{% assign lang = site.data.lang.en-US %}
|
6
|
+
{% endif %}
|
2
7
|
<style>
|
3
8
|
.k-head-card-media{
|
4
9
|
display: block cursor: pointer;
|
@@ -26,7 +31,7 @@
|
|
26
31
|
<div class="mdui-row">
|
27
32
|
<div class="mdui-col-sm-8">
|
28
33
|
<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 %}">
|
29
|
-
<div class="mdui-card-media
|
34
|
+
<div class="mdui-card-media k-head-card-media" style="background-image:url('{{head_card.left_img}}')">
|
30
35
|
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
31
36
|
<div class="mdui-card-primary">
|
32
37
|
<div class="mdui-card-primary-title"><a class="mdui-text-color-white-text">{{head_card.left_text}}</a></div>
|
@@ -41,13 +46,22 @@
|
|
41
46
|
</div>
|
42
47
|
</div>
|
43
48
|
<div class="mdui-col-sm-4">
|
44
|
-
<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 %}">
|
45
|
-
<div class="mdui-card-media
|
49
|
+
<div style="overflow: visible;" 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 %}">
|
50
|
+
<div class="mdui-card-media k-head-card-media mdui-valign">
|
46
51
|
<img class="k-head-card-img" src="{{head_card.right_img}}" alt="">
|
47
52
|
</div>
|
48
53
|
<div class="mdui-divider"></div>
|
49
54
|
<div class="mdui-card-header k-head-card-content">
|
50
|
-
<div class="mdui-card-header-title">{{site.title}}</div>
|
55
|
+
<div class="mdui-card-header-title mdui-float-left">{{site.title}}</div>
|
56
|
+
<button mdui-menu="{target: '#k-homemenu'}" class="mdui-btn mdui-btn-icon mdui-float-right"><i class="mdui-icon material-icons"></i></button>
|
57
|
+
<ul class="mdui-menu" id="k-homemenu">
|
58
|
+
<li class="mdui-menu-item">
|
59
|
+
<a target="_blank" href="{{ "/feed.xml" | prepend: site.baseurl }}" class="mdui-ripple">{{lang.rss}}</a>
|
60
|
+
</li>
|
61
|
+
<li class="mdui-menu-item">
|
62
|
+
<a target="_blank" href="{{ "/sitemap.xml" | prepend: site.baseurl }}" class="mdui-ripple">{{lang.sitemap}}</a>
|
63
|
+
</li>
|
64
|
+
</ul>
|
51
65
|
</div>
|
52
66
|
</div>
|
53
67
|
</div>
|
data/_layouts/default.html
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
layout: compress
|
3
3
|
---
|
4
4
|
<!DOCTYPE html>
|
5
|
-
<html lang="
|
5
|
+
<html lang="{{site.data.site.lang}}">
|
6
6
|
{% include head.html %}
|
7
7
|
<body>
|
8
|
+
{% include component/totop.html %}
|
8
9
|
{% include header/header.html %}
|
9
10
|
<div class="mdui-container container">
|
10
11
|
<section class="content">
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(e,t){"use strict";var n=e.History=e.History||{},r=e.jQuery;if(typeof n.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(e,t,n){r(e).bind(t,n)},trigger:function(e,t,n){r(e).trigger(t,n)},extractEventData:function(e,n,r){var i=n&&n.originalEvent&&n.originalEvent[e]||r&&r[e]||t;return i},onDomLoad:function(e){r(e)}},typeof n.init!="undefined"&&n.init()})(window),function(e,t){"use strict";var n=e.console||t,r=e.document,i=e.navigator,s=!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;try{s=e.sessionStorage,s.setItem("TEST","1"),s.removeItem("TEST")}catch(d){s=!1}l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(e){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(d){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;s.length&&(s.removeItem("History.store"),s.setItem("History.store",n))}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window);
|
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.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KeJun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -78,12 +78,15 @@ files:
|
|
78
78
|
- _includes/analytics/google.html
|
79
79
|
- _includes/comment/comment.html
|
80
80
|
- _includes/comment/disqus.html
|
81
|
+
- _includes/comment/gitment.html
|
81
82
|
- _includes/comment/livere.html
|
82
83
|
- _includes/component/nprogress.html
|
83
84
|
- _includes/component/sw.html
|
85
|
+
- _includes/component/totop.html
|
84
86
|
- _includes/content/component/highlight.html
|
85
87
|
- _includes/content/component/imgboxed.html
|
86
88
|
- _includes/content/component/lastupdate.html
|
89
|
+
- _includes/content/component/lazyload.html
|
87
90
|
- _includes/content/component/page_tags.html
|
88
91
|
- _includes/content/component/qrcode.html
|
89
92
|
- _includes/content/component/readtime.html
|
@@ -116,6 +119,7 @@ files:
|
|
116
119
|
- _layouts/post.html
|
117
120
|
- _layouts/tags.html
|
118
121
|
- assets/css/global.css
|
122
|
+
- assets/js/History.js
|
119
123
|
homepage: https://github.com/KeJunMao/jekyll-theme-mdui.git
|
120
124
|
licenses:
|
121
125
|
- MIT
|