jekyll-theme-mdui 0.4.9.4 → 0.4.9.5

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: 58385e725436d248df4b30e4ecc810942b880ee8
4
- data.tar.gz: 1bdfdd30cf47792bc91f76999e8083be407eac6e
3
+ metadata.gz: 85d4ca6a591bc72ef62e5b5d64dc44ef6f3218bf
4
+ data.tar.gz: 7aecb89bbf1ef28ffe56d3dbeb6f589302726afb
5
5
  SHA512:
6
- metadata.gz: cabfc8979aa338a7f5eeb8da2249591b1eb4a1fe7ee8e8bcb2b48e2204d279bbaeefc47b186fb84e89d54da4b33c8c60f4e14ed3627db75c81e6a3c28af22a18
7
- data.tar.gz: 4f3bfe1d542cbe47f1da504a341bacdab31ca00e53b482030e80332de5cd05efd24a738080282e6cd9187fba479a862fcedaf539737f3fbe34ba13955ea70a26
6
+ metadata.gz: fd8d344244d0a21119fb2e5ee2f937c36e20ba7b455c6a50697d264c94bb94fff238f1d70810242f8cd3c5e15954da8e4e70be02f4bb7c85c9dd8bf7cc2e849d
7
+ data.tar.gz: c84c664c01b0e7d5ae99e54098ed6a7482f96f8aa2529a481c2dcc1ddb8e9132c1df5a88799fb08d1be2435e81e77380e4e0278c4a2eed9d4eaea25084fb139d
@@ -0,0 +1,305 @@
1
+ <style>
2
+ img[data-action="zoom"] {
3
+ cursor: pointer;
4
+ cursor: -webkit-zoom-in;
5
+ cursor: -moz-zoom-in;
6
+ }
7
+ .zoom-img,
8
+ .zoom-img-wrap {
9
+ position: relative;
10
+ z-index: 1001;
11
+ -webkit-transition: all 300ms;
12
+ -o-transition: all 300ms;
13
+ transition: all 300ms;
14
+ }
15
+ img.zoom-img {
16
+ cursor: pointer;
17
+ cursor: -webkit-zoom-out;
18
+ cursor: -moz-zoom-out;
19
+ }
20
+ .zoom-overlay {
21
+ z-index: 1000;
22
+ background: #292929;
23
+ position: fixed;
24
+ top: 0;
25
+ left: 0;
26
+ right: 0;
27
+ bottom: 0;
28
+ pointer-events: none;
29
+ filter: "alpha(opacity=0)";
30
+ opacity: 0;
31
+ -webkit-transition: opacity 300ms;
32
+ -o-transition: opacity 300ms;
33
+ transition: opacity 300ms;
34
+ }
35
+ .zoom-overlay-open .zoom-overlay {
36
+ filter: "alpha(opacity=100)";
37
+ opacity: 1;
38
+ }
39
+
40
+ </style>
41
+
42
+ <script>
43
+ $(function(){
44
+ $('.mdui-typo img').attr('data-action','zoom');
45
+ })
46
+ +function ($) {
47
+ 'use strict';
48
+ function transitionEnd() {
49
+ var el = document.createElement('bootstrap');
50
+
51
+ var transEndEventNames = {
52
+ WebkitTransition : 'webkitTransitionEnd',
53
+ MozTransition : 'transitionend',
54
+ OTransition : 'oTransitionEnd otransitionend',
55
+ transition : 'transitionend'
56
+ };
57
+
58
+ for (var name in transEndEventNames) {
59
+ if (el.style[name] !== undefined) {
60
+ return { end: transEndEventNames[name] }
61
+ }
62
+ };
63
+
64
+ return false
65
+ }
66
+
67
+ $.fn.emulateTransitionEnd = function (duration) {
68
+ var called = false;
69
+ var $el = this;
70
+ $(this).one('bsTransitionEnd', function () { called = true });
71
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) };
72
+ setTimeout(callback, duration);
73
+ return this
74
+ };
75
+
76
+ $(function () {
77
+ $.support.transition = transitionEnd();
78
+
79
+ if (!$.support.transition) return;
80
+
81
+ $.event.special.bsTransitionEnd = {
82
+ bindType: $.support.transition.end,
83
+ delegateType: $.support.transition.end,
84
+ handle: function (e) {
85
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments);
86
+ }
87
+ }
88
+ });
89
+ }(jQuery);
90
+
91
+ +function ($) { "use strict";
92
+
93
+ function ZoomService () {
94
+ this._activeZoom =
95
+ this._initialScrollPosition =
96
+ this._initialTouchPosition =
97
+ this._touchMoveListener = null;
98
+
99
+ this._$document = $(document);
100
+ this._$window = $(window);
101
+ this._$body = $(document.body);
102
+ }
103
+
104
+ ZoomService.prototype.listen = function () {
105
+ if (!imgzoom){
106
+ this._$body.on('click', '[data-action="zoom"]', $.proxy(this._zoom, this))
107
+ }
108
+ imgzoom = true;
109
+ };
110
+
111
+ ZoomService.prototype._zoom = function (e) {
112
+ var target = e.target;
113
+
114
+ if (!target || target.tagName != 'IMG') return;
115
+
116
+ if (e.metaKey) return window.open(e.target.src, '_blank');
117
+
118
+ if (target.width >= (window.innerWidth - Zoom.OFFSET)) return;
119
+
120
+ this._activeZoomClose(true);
121
+
122
+ this._activeZoom = new Zoom(target);
123
+ this._activeZoom.zoomImage();
124
+
125
+ this._$window.on('scroll.zoom', $.proxy(this._scrollHandler, this));
126
+
127
+ this._$document.on('click.zoom', $.proxy(this._clickHandler, this));
128
+ this._$document.on('keyup.zoom', $.proxy(this._keyHandler, this));
129
+ this._$document.on('touchstart.zoom', $.proxy(this._touchStart, this));
130
+
131
+ e.stopPropagation();
132
+ };
133
+
134
+ ZoomService.prototype._activeZoomClose = function (forceDispose) {
135
+ if (!this._activeZoom) return;
136
+
137
+ if (forceDispose) {
138
+ this._activeZoom.dispose();
139
+ } else {
140
+ this._activeZoom.close();
141
+ }
142
+
143
+ this._$window.off('.zoom');
144
+ this._$document.off('.zoom');
145
+
146
+ this._activeZoom = null;
147
+ };
148
+
149
+ ZoomService.prototype._scrollHandler = function (e) {
150
+ if (this._initialScrollPosition === null) this._initialScrollPosition = window.scrollY;
151
+ var deltaY = this._initialScrollPosition - window.scrollY;
152
+ if (Math.abs(deltaY) >= 40) this._activeZoomClose();
153
+ };
154
+
155
+ ZoomService.prototype._keyHandler = function (e) {
156
+ if (e.keyCode == 27) this._activeZoomClose();
157
+ };
158
+
159
+ ZoomService.prototype._clickHandler = function (e) {
160
+ e.stopPropagation();
161
+ e.preventDefault();
162
+ this._activeZoomClose();
163
+ };
164
+
165
+ ZoomService.prototype._touchStart = function (e) {
166
+ this._initialTouchPosition = e.touches[0].pageY;
167
+ $(e.target).on('touchmove.zoom', $.proxy(this._touchMove, this));
168
+ };
169
+
170
+ ZoomService.prototype._touchMove = function (e) {
171
+ if (Math.abs(e.touches[0].pageY - this._initialTouchPosition) > 10) {
172
+ this._activeZoomClose();
173
+ $(e.target).off('touchmove.zoom');
174
+ }
175
+ };
176
+
177
+
178
+ function Zoom (img) {
179
+ this._fullHeight =
180
+ this._fullWidth =
181
+ this._overlay =
182
+ this._targetImageWrap = null;
183
+
184
+ this._targetImage = img;
185
+
186
+ this._$body = $(document.body);
187
+ }
188
+
189
+ Zoom.OFFSET = 80;
190
+ Zoom._MAX_WIDTH = 2560;
191
+ Zoom._MAX_HEIGHT = 4096;
192
+
193
+ Zoom.prototype.zoomImage = function () {
194
+ var img = document.createElement('img');
195
+ img.onload = $.proxy(function () {
196
+ this._fullHeight = Number(img.height);
197
+ this._fullWidth = Number(img.width);
198
+ this._zoomOriginal();
199
+ }, this);
200
+ img.src = this._targetImage.src;
201
+ };
202
+
203
+ Zoom.prototype._zoomOriginal = function () {
204
+ this._targetImageWrap = document.createElement('div');
205
+ this._targetImageWrap.className = 'zoom-img-wrap';
206
+
207
+ this._targetImage.parentNode.insertBefore(this._targetImageWrap, this._targetImage);
208
+ this._targetImageWrap.appendChild(this._targetImage);
209
+
210
+ $(this._targetImage)
211
+ .addClass('zoom-img')
212
+ .attr('data-action', 'zoom-out');
213
+
214
+ $('.k-postcontent').css('overflow','visible');
215
+
216
+ this._overlay = document.createElement('div');
217
+ this._overlay.className = 'zoom-overlay';
218
+
219
+ document.body.appendChild(this._overlay);
220
+
221
+ this._calculateZoom();
222
+ this._triggerAnimation();
223
+ };
224
+
225
+ Zoom.prototype._calculateZoom = function () {
226
+ this._targetImage.offsetWidth ;
227
+
228
+ var originalFullImageWidth = this._fullWidth;
229
+ var originalFullImageHeight = this._fullHeight;
230
+
231
+ var scrollTop = window.scrollY;
232
+
233
+ var maxScaleFactor = originalFullImageWidth / this._targetImage.width;
234
+
235
+ var viewportHeight = (window.innerHeight - Zoom.OFFSET);
236
+ var viewportWidth = (window.innerWidth - Zoom.OFFSET);
237
+
238
+ var imageAspectRatio = originalFullImageWidth / originalFullImageHeight;
239
+ var viewportAspectRatio = viewportWidth / viewportHeight;
240
+
241
+ if (originalFullImageWidth < viewportWidth && originalFullImageHeight < viewportHeight) {
242
+ this._imgScaleFactor = maxScaleFactor;
243
+
244
+ } else if (imageAspectRatio < viewportAspectRatio) {
245
+ this._imgScaleFactor = (viewportHeight / originalFullImageHeight) * maxScaleFactor;
246
+
247
+ } else {
248
+ this._imgScaleFactor = (viewportWidth / originalFullImageWidth) * maxScaleFactor;
249
+ }
250
+ };
251
+
252
+ Zoom.prototype._triggerAnimation = function () {
253
+ this._targetImage.offsetWidth ;
254
+
255
+ var imageOffset = $(this._targetImage).offset();
256
+ var scrollTop = window.scrollY;
257
+
258
+ var viewportY = scrollTop + (window.innerHeight / 2);
259
+ var viewportX = (window.innerWidth / 2);
260
+
261
+ var imageCenterY = imageOffset.top + (this._targetImage.height / 2);
262
+ var imageCenterX = imageOffset.left + (this._targetImage.width / 2);
263
+
264
+ this._translateY = viewportY - imageCenterY;
265
+ this._translateX = viewportX - imageCenterX;
266
+
267
+ $(this._targetImage).css('transform', 'scale(' + this._imgScaleFactor + ')');
268
+ $(this._targetImageWrap).css('transform', 'translate(' + this._translateX + 'px, ' + this._translateY + 'px) translateZ(0)');
269
+
270
+ this._$body.addClass('zoom-overlay-open');
271
+ };
272
+
273
+ Zoom.prototype.close = function () {
274
+ this._$body
275
+ .removeClass('zoom-overlay-open')
276
+ .addClass('zoom-overlay-transitioning');
277
+
278
+ $(this._targetImage).css('transform', '');
279
+ $(this._targetImageWrap).css('transform', '');
280
+
281
+ $(this._targetImage)
282
+ .one($.support.transition.end, $.proxy(this.dispose, this))
283
+ .emulateTransitionEnd(300);
284
+ };
285
+
286
+ Zoom.prototype.dispose = function () {
287
+ if (this._targetImageWrap && this._targetImageWrap.parentNode) {
288
+ $(this._targetImage)
289
+ .removeClass('zoom-img')
290
+ .attr('data-action', 'zoom');
291
+
292
+ $('.k-postcontent').css('overflow','hidden');
293
+
294
+ this._targetImageWrap.parentNode.replaceChild(this._targetImage, this._targetImageWrap);
295
+ this._overlay.parentNode.removeChild(this._overlay);
296
+
297
+ this._$body.removeClass('zoom-overlay-transitioning');
298
+ }
299
+ };
300
+
301
+ new ZoomService().listen();
302
+
303
+ }(jQuery);
304
+
305
+ </script>
@@ -17,7 +17,7 @@
17
17
  <div class="k-posts-list"></div>
18
18
  <div class="mdui-row">
19
19
  <div class="mdui-col-sm-12 k-page-col mdui-col-md-9">
20
- <div class="mdui-card">
20
+ <div class="mdui-card k-postcontent">
21
21
  <div class="mdui-card-media k-post-media" style="background-image: url({{page.img}});">
22
22
  <div class="mdui-card-media-covered mdui-card-media-covered-gradient">
23
23
  <div class="mdui-card-primary">
@@ -17,7 +17,7 @@
17
17
  <div class="k-posts-list"></div>
18
18
  <div class="mdui-row">
19
19
  <div class="mdui-col-sm-12 k-page-col">
20
- <div class="mdui-card">
20
+ <div class="mdui-card k-postcontent">
21
21
  <div class="mdui-card-media k-post-media" style="background-image: url({{page.img}});">
22
22
  <div class="mdui-card-media-covered mdui-card-media-covered-gradient">
23
23
  <div class="mdui-card-primary">
@@ -24,7 +24,8 @@
24
24
  {% include component/nprogress.html %}
25
25
  <script>
26
26
  (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("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}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);
27
- var defaultTitle = document.title;;
27
+ var defaultTitle = document.title;
28
+ var imgzoom = false;
28
29
  jQuery(document).ready(function($) {
29
30
 
30
31
  var siteUrl = 'http://'+(document.location.hostname||document.location.host);
@@ -51,9 +52,6 @@ jQuery(document).ready(function($) {
51
52
  $(".content").css('position','relative');
52
53
  $(".mdui-container").fadeIn();
53
54
  $(".content").animate({top:'0px'});
54
- if ($('#postpage').hasClass('mdui-container')){
55
-
56
- }
57
55
  });
58
56
  });
59
57
  });
@@ -68,7 +68,7 @@
68
68
  <header mdui-headroom class="mdui-appbar mdui-shadow-0 mdui-appbar-fixed">
69
69
  <div class="mdui-toolbar">
70
70
  <a href="javascript:;" class="mdui-btn mdui-btn-icon mdui-hidden-sm-up" mdui-drawer="{target: '#k-menu'}"><i class="mdui-icon material-icons">&#xe5d2;</i></a>
71
- <a href="{{site.url}}" class="mdui-typo-title">{{site.title |upcase }}</a>
71
+ <a href="{{ "/" | prepend: site.baseurl}}" class="mdui-typo-title">{{site.title |upcase }}</a>
72
72
  <div class="mdui-toolbar-spacer"></div>
73
73
  <div class="mdui-hidden-xs-down">
74
74
  <div class="k-header-menus" id="k-menus">
@@ -9,4 +9,5 @@ layout: default
9
9
  {% endfor %}
10
10
  {% endif %}
11
11
  {% endif %}
12
- {% include content/page_content_no_toc.html %}
12
+ {% include content/page_content_no_toc.html %}
13
+ {% include content/component/imgboxed.html %}
@@ -9,4 +9,5 @@ layout: default
9
9
  {% endfor %}
10
10
  {% endif %}
11
11
  {% endif %}
12
- {% include content/page_content.html %}
12
+ {% include content/page_content.html %}
13
+ {% include content/component/imgboxed.html %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-mdui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9.4
4
+ version: 0.4.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - KeJun
@@ -79,6 +79,7 @@ files:
79
79
  - _includes/comment/disqus.html
80
80
  - _includes/component/nprogress.html
81
81
  - _includes/component/sw.html
82
+ - _includes/content/component/imgboxed.html
82
83
  - _includes/content/component/page_tags.html
83
84
  - _includes/content/component/qrcode.html
84
85
  - _includes/content/component/sns_share.html