Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zzo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzossig <zzossig@gmail.com>2020-10-12 08:08:21 +0300
committerzzossig <zzossig@gmail.com>2020-10-12 08:08:21 +0300
commit0decc1bce43e5243648d6b4acd3a0a9f1c6095d8 (patch)
treec11c922b0f94a170e3fc975e0d04a33eb2d38e50
parent4f3acae64031126e382af7381efa93fa7fe7bc6e (diff)
js asset libraries version update, i18n options for theme-name, new header option
hideHomeHeaderWhenMobile option added
-rw-r--r--README.ko.md1
-rw-r--r--README.md1
-rw-r--r--assets/js/fuse.min.js14
-rw-r--r--assets/js/lazysizes.min.js5
-rw-r--r--assets/js/swipe.js821
-rw-r--r--assets/js/swipehome.js831
-rw-r--r--assets/sass/base/_helpers.scss5
-rw-r--r--exampleSite/config/_default/params.toml1
-rw-r--r--i18n/en.toml17
-rw-r--r--i18n/eo.toml15
-rw-r--r--i18n/fa.toml15
-rw-r--r--i18n/fr.toml15
-rw-r--r--i18n/ko.toml17
-rw-r--r--i18n/zh.toml17
-rw-r--r--layouts/partials/head/scripts.html11
-rw-r--r--layouts/partials/header/site-header.html2
-rw-r--r--layouts/partials/navbar/select-theme.html2
17 files changed, 120 insertions, 1670 deletions
diff --git a/README.ko.md b/README.ko.md
index cbe5238..5477c53 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -256,6 +256,7 @@ minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide, typewriter
+hideHomeHeaderWhenMobile = false
# menu
showMobileMenuTerms = ["tags", "categories", "series"]
diff --git a/README.md b/README.md
index c1637d3..8fbf282 100644
--- a/README.md
+++ b/README.md
@@ -268,6 +268,7 @@ minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide, typewriter
+hideHomeHeaderWhenMobile = false
# menu
showMobileMenuTerms = ["tags", "categories", "series"]
diff --git a/assets/js/fuse.min.js b/assets/js/fuse.min.js
index 44eec85..02ab1f2 100644
--- a/assets/js/fuse.min.js
+++ b/assets/js/fuse.min.js
@@ -1,13 +1,9 @@
/**
- * Skipped minification because the original files appears to be already minified.
- * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
- */
-/*!
- * Fuse.js v3.4.6 - Lightweight fuzzy-search (http://fusejs.io)
- *
- * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
+ * Fuse.js v6.4.1 - Lightweight fuzzy-search (http://fusejs.io)
+ *
+ * Copyright (c) 2020 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*/
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Fuse",[],t):"object"==typeof exports?exports.Fuse=t():e.Fuse=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(2),a=n(8),s=n(0),c=function(){function e(t,n){var r=n.location,o=void 0===r?0:r,i=n.distance,s=void 0===i?100:i,c=n.threshold,h=void 0===c?.6:c,l=n.maxPatternLength,u=void 0===l?32:l,f=n.caseSensitive,d=void 0!==f&&f,v=n.tokenSeparator,p=void 0===v?/ +/g:v,g=n.findAllMatches,y=void 0!==g&&g,m=n.minMatchCharLength,k=void 0===m?1:m,S=n.id,x=void 0===S?null:S,b=n.keys,M=void 0===b?[]:b,_=n.shouldSort,L=void 0===_||_,w=n.getFn,A=void 0===w?a:w,C=n.sortFn,I=void 0===C?function(e,t){return e.score-t.score}:C,O=n.tokenize,j=void 0!==O&&O,P=n.matchAllTokens,F=void 0!==P&&P,T=n.includeMatches,z=void 0!==T&&T,E=n.includeScore,K=void 0!==E&&E,$=n.verbose,J=void 0!==$&&$;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:o,distance:s,threshold:h,maxPatternLength:u,isCaseSensitive:d,tokenSeparator:p,findAllMatches:y,minMatchCharLength:k,id:x,keys:M,includeMatches:z,includeScore:K,shouldSort:L,getFn:A,sortFn:I,verbose:J,tokenize:j,matchAllTokens:F},this.setCollection(t)}var t,n,c;return t=e,(n=[{key:"setCollection",value:function(e){return this.list=e,e}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\nSearch pattern: "'.concat(e,'"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,o=n.fullSearcher,i=this._search(r,o),a=i.weights,s=i.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&"number"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:"_prepareSearchers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r<o;r+=1)t.push(new i(n[r],this.options));return{tokenSearchers:t,fullSearcher:new i(e,this.options)}}},{key:"_search",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},o=[];if("string"==typeof n[0]){for(var i=0,a=n.length;i<a;i+=1)this._analyze({key:"",value:n[i],record:i,index:i},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t});return{weights:null,results:o}}for(var s={},c=0,h=n.length;c<h;c+=1)for(var l=n[c],u=0,f=this.options.keys.length;u<f;u+=1){var d=this.options.keys[u];if("string"!=typeof d){if(s[d.name]={weight:1-d.weight||1},d.weight<=0||d.weight>1)throw new Error("Key weight has to be > 0 and <= 1");d=d.name}else s[d]={weight:1};this._analyze({key:d,value:this.options.getFn(l,d),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:o}}},{key:"_analyze",value:function(e,t){var n=e.key,r=e.arrayIndex,o=void 0===r?-1:r,i=e.value,a=e.record,c=e.index,h=t.tokenSearchers,l=void 0===h?[]:h,u=t.fullSearcher,f=void 0===u?[]:u,d=t.resultMap,v=void 0===d?{}:d,p=t.results,g=void 0===p?[]:p;if(null!=i){var y=!1,m=-1,k=0;if("string"==typeof i){this._log("\nKey: ".concat(""===n?"-":n));var S=f.search(i);if(this._log('Full text: "'.concat(i,'", score: ').concat(S.score)),this.options.tokenize){for(var x=i.split(this.options.tokenSeparator),b=[],M=0;M<l.length;M+=1){var _=l[M];this._log('\nPattern: "'.concat(_.pattern,'"'));for(var L=!1,w=0;w<x.length;w+=1){var A=x[w],C=_.search(A),I={};C.isMatch?(I[A]=C.score,y=!0,L=!0,b.push(C.score)):(I[A]=1,this.options.matchAllTokens||b.push(1)),this._log('Token: "'.concat(A,'", score: ').concat(I[A]))}L&&(k+=1)}m=b[0];for(var O=b.length,j=1;j<O;j+=1)m+=b[j];m/=O,this._log("Token score average:",m)}var P=S.score;m>-1&&(P=(P+m)/2),this._log("Score average:",P);var F=!this.options.tokenize||!this.options.matchAllTokens||k>=l.length;if(this._log("\nCheck Matches: ".concat(F)),(y||S.isMatch)&&F){var T=v[c];T?T.output.push({key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}):(v[c]={item:a,output:[{key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}]},g.push(v[c]))}}else if(s(i))for(var z=0,E=i.length;z<E;z+=1)this._analyze({key:n,arrayIndex:z,value:i[z],record:a,index:c},{resultMap:v,results:g,tokenSearchers:l,fullSearcher:f})}}},{key:"_computeScore",value:function(e,t){this._log("\n\nComputing score:\n");for(var n=0,r=t.length;n<r;n+=1){for(var o=t[n].output,i=o.length,a=1,s=1,c=0;c<i;c+=1){var h=e?e[o[c].key].weight:1,l=(1===h?o[c].score:o[c].score||.001)*h;1!==h?s=Math.min(s,l):(o[c].nScore=l,a*=l)}t[n].score=1===s?a:s,this._log(t[n])}}},{key:"_sort",value:function(e){this._log("\n\nSorting...."),e.sort(this.options.sortFn)}},{key:"_format",value:function(e){var t=[];if(this.options.verbose){var n=[];this._log("\n\nOutput:\n\n",JSON.stringify(e,function(e,t){if("object"===r(t)&&null!==t){if(-1!==n.indexOf(t))return;n.push(t)}return t})),n=null}var o=[];this.options.includeMatches&&o.push(function(e,t){var n=e.output;t.matches=[];for(var r=0,o=n.length;r<o;r+=1){var i=n[r];if(0!==i.matchedIndices.length){var a={indices:i.matchedIndices,value:i.value};i.key&&(a.key=i.key),i.hasOwnProperty("arrayIndex")&&i.arrayIndex>-1&&(a.arrayIndex=i.arrayIndex),t.matches.push(a)}}}),this.options.includeScore&&o.push(function(e,t){t.score=e.score});for(var i=0,a=e.length;i<a;i+=1){var s=e[i];if(this.options.id&&(s.item=this.options.getFn(s.item,this.options.id)[0]),o.length){for(var c={item:s.item},h=0,l=o.length;h<l;h+=1)o[h](s,c);t.push(c)}else t.push(s.item)}return t}},{key:"_log",value:function(){var e;this.options.verbose&&(e=console).log.apply(e,arguments)}}])&&o(t.prototype,n),c&&o(t,c),e}();e.exports=c},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(3),i=n(4),a=n(7),s=function(){function e(t,n){var r=n.location,o=void 0===r?0:r,i=n.distance,s=void 0===i?100:i,c=n.threshold,h=void 0===c?.6:c,l=n.maxPatternLength,u=void 0===l?32:l,f=n.isCaseSensitive,d=void 0!==f&&f,v=n.tokenSeparator,p=void 0===v?/ +/g:v,g=n.findAllMatches,y=void 0!==g&&g,m=n.minMatchCharLength,k=void 0===m?1:m;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:o,distance:s,threshold:h,maxPatternLength:u,isCaseSensitive:d,tokenSeparator:p,findAllMatches:y,minMatchCharLength:k},this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.pattern.length<=u&&(this.patternAlphabet=a(this.pattern))}var t,n,s;return t=e,(n=[{key:"search",value:function(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};var t=this.options,n=t.maxPatternLength,r=t.tokenSeparator;if(this.pattern.length>n)return o(e,this.pattern,r);var a=this.options,s=a.location,c=a.distance,h=a.threshold,l=a.findAllMatches,u=a.minMatchCharLength;return i(e,this.pattern,this.patternAlphabet,{location:s,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s},function(e,t){var n=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,"\\$&").replace(r,"|")),i=e.match(o),a=!!i,s=[];if(a)for(var c=0,h=i.length;c<h;c+=1){var l=i[c];s.push([e.indexOf(l),l.length-1])}return{score:a?.5:1,isMatch:a,matchedIndices:s}}},function(e,t,n){var r=n(5),o=n(6);e.exports=function(e,t,n,i){for(var a=i.location,s=void 0===a?0:a,c=i.distance,h=void 0===c?100:c,l=i.threshold,u=void 0===l?.6:l,f=i.findAllMatches,d=void 0!==f&&f,v=i.minMatchCharLength,p=void 0===v?1:v,g=s,y=e.length,m=u,k=e.indexOf(t,g),S=t.length,x=[],b=0;b<y;b+=1)x[b]=0;if(-1!==k){var M=r(t,{errors:0,currentLocation:k,expectedLocation:g,distance:h});if(m=Math.min(M,m),-1!==(k=e.lastIndexOf(t,g+S))){var _=r(t,{errors:0,currentLocation:k,expectedLocation:g,distance:h});m=Math.min(_,m)}}k=-1;for(var L=[],w=1,A=S+y,C=1<<(S<=31?S-1:30),I=0;I<S;I+=1){for(var O=0,j=A;O<j;){r(t,{errors:I,currentLocation:g+j,expectedLocation:g,distance:h})<=m?O=j:A=j,j=Math.floor((A-O)/2+O)}A=j;var P=Math.max(1,g-j+1),F=d?y:Math.min(g+j,y)+S,T=Array(F+2);T[F+1]=(1<<I)-1;for(var z=F;z>=P;z-=1){var E=z-1,K=n[e.charAt(E)];if(K&&(x[E]=1),T[z]=(T[z+1]<<1|1)&K,0!==I&&(T[z]|=(L[z+1]|L[z])<<1|1|L[z+1]),T[z]&C&&(w=r(t,{errors:I,currentLocation:E,expectedLocation:g,distance:h}))<=m){if(m=w,(k=E)<=g)break;P=Math.max(1,2*g-k)}}if(r(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:h})>m)break;L=T}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(x,p)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,a=t.expectedLocation,s=void 0===a?0:a,c=t.distance,h=void 0===c?100:c,l=r/e.length,u=Math.abs(s-i);return h?l+u/h:u?1:l}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,a=e.length;i<a;i+=1){var s=e[i];s&&-1===r?r=i:s||-1===r||((o=i-1)-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var o=0;o<n;o+=1)t[e.charAt(o)]|=1<<n-o-1;return t}},function(e,t,n){var r=n(0);e.exports=function(e,t){return function e(t,n,o){if(n){var i=n.indexOf("."),a=n,s=null;-1!==i&&(a=n.slice(0,i),s=n.slice(i+1));var c=t[a];if(null!=c)if(s||"string"!=typeof c&&"number"!=typeof c)if(r(c))for(var h=0,l=c.length;h<l;h+=1)e(c[h],s,o);else s&&e(c,s,o);else o.push(c.toString())}else o.push(t);return o}(e,t,[])}}])}); \ No newline at end of file
+var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){return Array.isArray?Array.isArray(e):"[object Array]"===x(e)}function g(e){return"string"==typeof e}function y(e){return"number"==typeof e}function p(e){return!0===e||!1===e||function(e){return m(e)&&null!==e}(e)&&"[object Boolean]"==x(e)}function m(t){return"object"===e(t)}function k(e){return null!=e}function M(e){return!e.trim().length}function x(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var b=function(e){return"Invalid value for key ".concat(e)},S=function(e){return"Pattern length exceeds max of ".concat(e,".")},_=Object.prototype.hasOwnProperty,w=function(){function e(n){var r=this;t(this,e),this._keys=[],this._keyMap={};var i=0;n.forEach((function(e){var t=L(e);i+=t.weight,r._keys.push(t),r._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return r(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function L(e){var t=null,n=null,r=null,i=1;if(g(e)||v(e))r=e,t=O(e),n=j(e);else{if(!_.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));var o=e.name;if(r=o,_.call(e,"weight")&&(i=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(o));t=O(o),n=j(o)}return{path:t,id:n,weight:i,src:r}}function O(e){return v(e)?e:e.split(".")}function j(e){return v(e)?e.join("."):e}var A=c({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,o){if(i[o]){var c=t[i[o]];if(!k(c))return;if(o===i.length-1&&(g(c)||y(c)||p(c)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(c));else if(v(c)){r=!0;for(var a=0,s=c.length;a<s;a+=1)e(c[a],i,o+1)}else i.length&&e(c,i,o+1)}else n.push(t)}(e,g(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),I=/[^ ]+/g;function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map;return{get:function(n){var r=n.match(I).length;if(t.has(r))return t.get(r);var i=parseFloat((1/Math.sqrt(r)).toFixed(e));return t.set(r,i),i},clear:function(){t.clear()}}}var E=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?A.getFn:r;t(this,e),this.norm=C(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(k(e)&&!M(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t.path);if(k(o))if(v(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var c=t.pop(),a=c.nestedArrIndex,s=c.value;if(k(s))if(g(s)&&!M(s)){var u={v:s,i:a,n:n.norm.get(s)};e.push(u)}else v(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!M(o)){var c={v:o,n:n.norm.get(o)};r.$[i]=c}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?A.getFn:r,o=new E({getFn:i});return o.setKeys(e.map(L)),o.setSources(t),o.create(),o}function R(e,t){var n=e.matches;t.matches=[],k(n)&&n.forEach((function(e){if(k(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function F(e,t){t.score=e.score}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?A.distance:s,h=t.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r/e.length;if(f)return l;var d=Math.abs(a-o);return u?l+d/u:d?1:l}function N(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function D(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var z=function(){function e(n){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?A.location:o,a=i.threshold,s=void 0===a?A.threshold:a,u=i.distance,h=void 0===u?A.distance:u,f=i.includeMatches,l=void 0===f?A.includeMatches:f,d=i.findAllMatches,v=void 0===d?A.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?A.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?A.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?A.ignoreLocation:k;if(t(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:l,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var x=function(e,t){r.chunks.push({pattern:e,alphabet:D(e),startIndex:t})},b=this.pattern.length;if(b>32){for(var S=0,_=b%32,w=b-_;S<w;)x(this.pattern.substr(S,32),S),S+=32;if(_){var L=b-32;x(this.pattern.substr(L),L)}}else x(this.pattern,0)}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,a=o.distance,s=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=o.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach((function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?A.location:i,c=r.distance,a=void 0===c?A.distance:c,s=r.threshold,u=void 0===s?A.threshold:s,h=r.findAllMatches,f=void 0===h?A.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?A.minMatchCharLength:l,v=r.includeMatches,g=void 0===v?A.includeMatches:v,y=r.ignoreLocation,p=void 0===y?A.ignoreLocation:y;if(t.length>32)throw new Error(S(32));for(var m,k=t.length,M=e.length,x=Math.max(0,Math.min(o,M)),b=u,_=x,w=d>1||g,L=w?Array(M):[];(m=e.indexOf(t,_))>-1;){var O=P(t,{currentLocation:m,expectedLocation:x,distance:a,ignoreLocation:p});if(b=Math.min(O,b),_=m+k,w)for(var j=0;j<k;)L[m+j]=1,j+=1}_=-1;for(var I=[],C=1,E=k+M,$=1<<k-1,R=0;R<k;R+=1){for(var F=0,D=E;F<D;){var z=P(t,{errors:R,currentLocation:x+D,expectedLocation:x,distance:a,ignoreLocation:p});z<=b?F=D:E=D,D=Math.floor((E-F)/2+F)}E=D;var K=Math.max(1,x-D+1),q=f?M:Math.min(x+D,M)+k,W=Array(q+2);W[q+1]=(1<<R)-1;for(var J=q;J>=K;J-=1){var T=J-1,U=n[e.charAt(T)];if(w&&(L[T]=+!!U),W[J]=(W[J+1]<<1|1)&U,R&&(W[J]|=(I[J+1]|I[J])<<1|1|I[J+1]),W[J]&$&&(C=P(t,{errors:R,currentLocation:T,expectedLocation:x,distance:a,ignoreLocation:p}))<=b){if(b=C,(_=T)<=x)break;K=Math.max(1,2*x-_)}}var V=P(t,{errors:R+1,currentLocation:x,expectedLocation:x,distance:a,ignoreLocation:p});if(V>b)break;I=W}var B={isMatch:_>=0,score:Math.max(.001,C)};if(w){var G=N(L,d);G.length?g&&(B.indices=G):B.isMatch=!1}return B}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(l(d),l(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),K=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return q(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return q(e,this.singleRegex)}}]),e}();function q(e,t){var n=e.match(t);return n?n[1]:null}var W=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),i}(K),J=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}(K),T=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}(K),U=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}(K),V=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}(K),B=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}(K),G=function(e){a(i,e);var n=f(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?A.location:c,s=o.threshold,u=void 0===s?A.threshold:s,h=o.distance,f=void 0===h?A.distance:h,l=o.includeMatches,d=void 0===l?A.includeMatches:l,v=o.findAllMatches,g=void 0===v?A.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?A.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?A.isCaseSensitive:m;return t(this,i),(r=n.call(this,e))._bitapSearch=new z(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k}),r}return r(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}(K),H=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?1:0,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(K),Q=[W,H,T,U,B,V,J,G],X=Q.length,Y=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Y).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<X;){var u=Q[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<X;){var f=Q[s],l=f.isSingleMatch(c);if(l){r.push(new f(l,t));break}}}return r}))}var ee=new Set([G.type,H.type]),te=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?A.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?A.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?A.minMatchCharLength:s,h=r.findAllMatches,f=void 0===h?A.findAllMatches:h,l=r.location,d=void 0===l?A.location:l,v=r.threshold,g=void 0===v?A.threshold:v,y=r.distance,p=void 0===y?A.distance:y;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:f,location:d,threshold:g,distance:p},this.pattern=o?n:n.toLowerCase(),this.query=Z(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a<s;a+=1){var u=t[a];o.length=0,i=0;for(var h=0,f=u.length;h<f;h+=1){var d=u[h],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=d.constructor.type;ee.has(m)?o=[].concat(l(o),l(y)):o.push(y)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),ne=[];function re(e,t){for(var n=0,r=ne.length;n<r;n+=1){var i=ne[n];if(i.condition(e,t))return new i(e,t)}return new z(e,t)}var ie="$and",oe="$or",ce="$path",ae="$val",se=function(e){return!(!e[ie]&&!e[oe])},ue=function(e){return!!e[ce]},he=function(e){return!v(e)&&m(e)&&!se(e)},fe=function(e){return i({},ie,Object.keys(e).map((function(t){return i({},t,e[t])})))},le=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},A,{},r),this.options.useExtendedSearch,this._keyStore=new w(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof E))throw new Error("Incorrect 'index' type");this._myIndex=t||$(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){k(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return de(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),ve(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=re(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(k(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n),o=ue(n);if(!o&&r.length>1&&!se(n))return e(fe(n));if(he(n)){var c=o?n[ce]:r[0],a=o?n[ae]:n[c];if(!g(a))throw new Error(b(c));var s={keyId:j(c),pattern:a};return i&&(s.searcher=re(a,t)),s}var u={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return se(e)||(e=fe(e)),o(e)}(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach((function(e){var r=e.$,c=e.i;if(k(r)){var a=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}switch(n.operator){case ie:for(var s=[],u=0,h=n.children.length;u<h;u+=1){var f=e(n.children[u],r,i);if(!f.length)return[];s.push.apply(s,l(f))}return s;case oe:for(var d=[],v=0,g=n.children.length;v<g;v+=1){var y=e(n.children[v],r,i);if(y.length){d.push.apply(d,l(y));break}}return d}}(n,r,c);a.length&&(i[c]||(i[c]={idx:c,item:r,matches:[]},o.push(i[c])),a.forEach((function(e){var t,n=e.matches;(t=i[c].matches).push.apply(t,l(n))})))}})),o}},{key:"_searchObjectList",value:function(e){var t=this,n=re(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach((function(e){var r=e.$,o=e.i;if(k(r)){var a=[];i.forEach((function(e,i){a.push.apply(a,l(t._findMatches({key:e,value:r[i],searcher:n})))})),a.length&&c.push({idx:o,item:r,matches:a})}})),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!k(n))return[];var i=[];if(v(n))n.forEach((function(e){var n=e.v,o=e.i,c=e.n;if(k(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}}));else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();function de(e,t){var n=t.ignoreFieldNorm,r=void 0===n?A.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,o=e.score,c=n?n.weight:null;t*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*(r?1:i))})),e.score=t}))}function ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?A.includeMatches:r,o=n.includeScore,c=void 0===o?A.includeScore:o,a=[];return i&&a.push(R),c&&a.push(F),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}return le.version="6.4.1",le.createIndex=$,le.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?A.getFn:n,i=e.keys,o=e.records,c=new E({getFn:r});return c.setKeys(i),c.setIndexRecords(o),c},le.config=A,function(){ne.push.apply(ne,arguments)}(te),le},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(); \ No newline at end of file
diff --git a/assets/js/lazysizes.min.js b/assets/js/lazysizes.min.js
index 0b08698..ca34f12 100644
--- a/assets/js/lazysizes.min.js
+++ b/assets/js/lazysizes.min.js
@@ -1,2 +1,3 @@
-/*! lazysizes - v5.1.2 */
-!function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}("undefined"!=typeof window?window:{},function(a,b){"use strict";var c,d;if(function(){var b,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};d=a.lazySizesConfig||a.lazysizesConfig||{};for(b in c)b in d||(d[b]=c[b])}(),!b||!b.getElementsByClassName)return{init:function(){},cfg:d,noSupport:!0};var e=b.documentElement,f=a.Date,g=a.HTMLPictureElement,h="addEventListener",i="getAttribute",j=a[h],k=a.setTimeout,l=a.requestAnimationFrame||k,m=a.requestIdleCallback,n=/^picture$/i,o=["load","error","lazyincluded","_lazyloaded"],p={},q=Array.prototype.forEach,r=function(a,b){return p[b]||(p[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),p[b].test(a[i]("class")||"")&&p[b]},s=function(a,b){r(a,b)||a.setAttribute("class",(a[i]("class")||"").trim()+" "+b)},t=function(a,b){var c;(c=r(a,b))&&a.setAttribute("class",(a[i]("class")||"").replace(c," "))},u=function(a,b,c){var d=c?h:"removeEventListener";c&&u(a,b),o.forEach(function(c){a[d](c,b)})},v=function(a,d,e,f,g){var h=b.createEvent("Event");return e||(e={}),e.instance=c,h.initEvent(d,!f,!g),h.detail=e,a.dispatchEvent(h),h},w=function(b,c){var e;!g&&(e=a.picturefill||d.pf)?(c&&c.src&&!b[i]("srcset")&&b.setAttribute("srcset",c.src),e({reevaluate:!0,elements:[b]})):c&&c.src&&(b.src=c.src)},x=function(a,b){return(getComputedStyle(a,null)||{})[b]},y=function(a,b,c){for(c=c||a.offsetWidth;c<d.minSize&&b&&!a._lazysizesWidth;)c=b.offsetWidth,b=b.parentNode;return c},z=function(){var a,c,d=[],e=[],f=d,g=function(){var b=f;for(f=d.length?e:d,a=!0,c=!1;b.length;)b.shift()();a=!1},h=function(d,e){a&&!e?d.apply(this,arguments):(f.push(d),c||(c=!0,(b.hidden?k:l)(g)))};return h._lsFlush=g,h}(),A=function(a,b){return b?function(){z(a)}:function(){var b=this,c=arguments;z(function(){a.apply(b,c)})}},B=function(a){var b,c=0,e=d.throttleDelay,g=d.ricTimeout,h=function(){b=!1,c=f.now(),a()},i=m&&g>49?function(){m(h,{timeout:g}),g!==d.ricTimeout&&(g=d.ricTimeout)}:A(function(){k(h)},!0);return function(a){var d;(a=!0===a)&&(g=33),b||(b=!0,d=e-(f.now()-c),d<0&&(d=0),a||d<9?i():k(i,d))}},C=function(a){var b,c,d=99,e=function(){b=null,a()},g=function(){var a=f.now()-c;a<d?k(g,d-a):(m||e)(e)};return function(){c=f.now(),b||(b=k(g,d))}},D=function(){var g,l,m,o,p,y,D,F,G,H,I,J,K=/^img$/i,L=/^iframe$/i,M="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),N=0,O=0,P=0,Q=-1,R=function(a){P--,(!a||P<0||!a.target)&&(P=0)},S=function(a){return null==J&&(J="hidden"==x(b.body,"visibility")),J||!("hidden"==x(a.parentNode,"visibility")&&"hidden"==x(a,"visibility"))},T=function(a,c){var d,f=a,g=S(a);for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=e;)(g=(x(f,"opacity")||1)>0)&&"visible"!=x(f,"overflow")&&(d=f.getBoundingClientRect(),g=H>d.left&&G<d.right&&I>d.top-1&&F<d.bottom+1);return g},U=function(){var a,f,h,j,k,m,n,p,q,r,s,t,u=c.elements;if((o=d.loadMode)&&P<8&&(a=u.length)){for(f=0,Q++;f<a;f++)if(u[f]&&!u[f]._lazyRace)if(!M||c.prematureUnveil&&c.prematureUnveil(u[f]))aa(u[f]);else if((p=u[f][i]("data-expand"))&&(m=1*p)||(m=O),r||(r=!d.expand||d.expand<1?e.clientHeight>500&&e.clientWidth>500?500:370:d.expand,c._defEx=r,s=r*d.expFactor,t=d.hFac,J=null,O<s&&P<1&&Q>2&&o>2&&!b.hidden?(O=s,Q=0):O=o>1&&Q>1&&P<6?r:N),q!==m&&(y=innerWidth+m*t,D=innerHeight+m,n=-1*m,q=m),h=u[f].getBoundingClientRect(),(I=h.bottom)>=n&&(F=h.top)<=D&&(H=h.right)>=n*t&&(G=h.left)<=y&&(I||H||G||F)&&(d.loadHidden||S(u[f]))&&(l&&P<3&&!p&&(o<3||Q<4)||T(u[f],m))){if(aa(u[f]),k=!0,P>9)break}else!k&&l&&!j&&P<4&&Q<4&&o>2&&(g[0]||d.preloadAfterLoad)&&(g[0]||!p&&(I||H||G||F||"auto"!=u[f][i](d.sizesAttr)))&&(j=g[0]||u[f]);j&&!k&&aa(j)}},V=B(U),W=function(a){var b=a.target;if(b._lazyCache)return void delete b._lazyCache;R(a),s(b,d.loadedClass),t(b,d.loadingClass),u(b,Y),v(b,"lazyloaded")},X=A(W),Y=function(a){X({target:a.target})},Z=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},$=function(a){var b,c=a[i](d.srcsetAttr);(b=d.customMedia[a[i]("data-media")||a[i]("media")])&&a.setAttribute("media",b),c&&a.setAttribute("srcset",c)},_=A(function(a,b,c,e,f){var g,h,j,l,o,p;(o=v(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(c?s(a,d.autosizesClass):a.setAttribute("sizes",e)),h=a[i](d.srcsetAttr),g=a[i](d.srcAttr),f&&(j=a.parentNode,l=j&&n.test(j.nodeName||"")),p=b.firesLoad||"src"in a&&(h||g||l),o={target:a},s(a,d.loadingClass),p&&(clearTimeout(m),m=k(R,2500),u(a,Y,!0)),l&&q.call(j.getElementsByTagName("source"),$),h?a.setAttribute("srcset",h):g&&!l&&(L.test(a.nodeName)?Z(a,g):a.src=g),f&&(h||l)&&w(a,{src:g})),a._lazyRace&&delete a._lazyRace,t(a,d.lazyClass),z(function(){var b=a.complete&&a.naturalWidth>1;p&&!b||(b&&s(a,"ls-is-cached"),W(o),a._lazyCache=!0,k(function(){"_lazyCache"in a&&delete a._lazyCache},9)),"lazy"==a.loading&&P--},!0)}),aa=function(a){if(!a._lazyRace){var b,c=K.test(a.nodeName),e=c&&(a[i](d.sizesAttr)||a[i]("sizes")),f="auto"==e;(!f&&l||!c||!a[i]("src")&&!a.srcset||a.complete||r(a,d.errorClass)||!r(a,d.lazyClass))&&(b=v(a,"lazyunveilread").detail,f&&E.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,P++,_(a,b,f,e,c))}},ba=C(function(){d.loadMode=3,V()}),ca=function(){3==d.loadMode&&(d.loadMode=2),ba()},da=function(){if(!l){if(f.now()-p<999)return void k(da,999);l=!0,d.loadMode=3,V(),j("scroll",ca,!0)}};return{_:function(){p=f.now(),c.elements=b.getElementsByClassName(d.lazyClass),g=b.getElementsByClassName(d.lazyClass+" "+d.preloadClass),j("scroll",V,!0),j("resize",V,!0),a.MutationObserver?new MutationObserver(V).observe(e,{childList:!0,subtree:!0,attributes:!0}):(e[h]("DOMNodeInserted",V,!0),e[h]("DOMAttrModified",V,!0),setInterval(V,999)),j("hashchange",V,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(a){b[h](a,V,!0)}),/d$|^c/.test(b.readyState)?da():(j("load",da),b[h]("DOMContentLoaded",V),k(da,2e4)),c.elements.length?(U(),z._lsFlush()):V()},checkElems:V,unveil:aa,_aLSL:ca}}(),E=function(){var a,c=A(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),n.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;f<g;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||w(a,c.detail)}),e=function(a,b,d){var e,f=a.parentNode;f&&(d=y(a,f,d),e=v(a,"lazybeforesizes",{width:d,dataAttr:!!b}),e.defaultPrevented||(d=e.detail.width)&&d!==a._lazysizesWidth&&c(a,f,e,d))},f=function(){var b,c=a.length;if(c)for(b=0;b<c;b++)e(a[b])},g=C(f);return{_:function(){a=b.getElementsByClassName(d.autosizesClass),j("resize",g)},checkElems:g,updateElem:e}}(),F=function(){!F.i&&b.getElementsByClassName&&(F.i=!0,E._(),D._())};return k(function(){d.init&&F()}),c={cfg:d,autoSizer:E,loader:D,init:F,uP:w,aC:s,rC:t,hC:r,fire:v,gW:y,rAF:z}}); \ No newline at end of file
+/*! lazysizes - v5.2.2 */
+
+!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return i[t].test(e[$]("class")||"")&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(i," "))}},V=function(t,i,e){var a=e?P:"removeEventListener";if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent("Event");if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i<H.minSize&&t&&!e._lazysizesWidth){i=t.offsetWidth;t=t.parentNode}return i},ee=function(){var i,a;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;i=true;a=false;while(e.length){e.shift()()}i=false};var e=function(e,t){if(i&&!t){e.apply(this,arguments)}else{n.push(e);if(!a){a=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(i,e){return e?function(){ee(i)}:function(){var e=this;var t=arguments;ee(function(){i.apply(e,t)})}},ie=function(e){var i;var a=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){i=false;a=f.now();e()};var s=l&&n>49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e<a){I(n,a-e)}else{(l||r)(r)}};return function(){i=f.now();if(!t){t=I(n,a)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var N=0;var M=-1;var x=function(e){N--;if(!e||N<0||!e.target){N=0}};var W=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var S=function(e,t){var i;var a=e;var r=W(e);g-=t;b+=t;p-=t;C+=t;while(r&&(a=a.offsetParent)&&a!=D.body&&a!=O){r=(Z(a,"opacity")||1)>0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&p<i.right&&b>i.top-1&&g<i.bottom+1}}return r};var t=function(){var e,t,i,a,r,n,s,l,o,u,f,c;var d=k.elements;if((h=H.loadMode)&&N<8&&(e=d.length)){t=0;M++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(l=d[t][$]("data-expand"))||!(n=l*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&N<1&&M>2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",a)}}if(!i.detail.dataAttr){Y(e,i.detail)}});var a=function(e,t,i){var a;var r=e.parentNode;if(r){i=s(e,r,i);a=X(e,"lazybeforesizes",{width:i,dataAttr:!!t});if(!a.defaultPrevented){i=a.detail.width;if(i&&i!==e._lazysizesWidth){n(e,r,a,i)}}}};var e=function(){var e;var t=i.length;if(t){e=0;for(;e<t;e++){a(i[e])}}};var t=ae(e);return{_:function(){i=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:a}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{}); \ No newline at end of file
diff --git a/assets/js/swipe.js b/assets/js/swipe.js
index 686951b..1dfb2b4 100644
--- a/assets/js/swipe.js
+++ b/assets/js/swipe.js
@@ -6,823 +6,4 @@
*
*/
-// if the module has no dependencies, the above pattern can be simplified to
-// eslint-disable-next-line no-extra-semi
-; (function (root, factory) {
- // eslint-disable-next-line no-undef
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- // eslint-disable-next-line no-undef
- define([], function () {
- root.Swipe = factory();
- return root.Swipe;
- });
- } else if (typeof module === 'object' && module.exports) {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory();
- } else {
- // Browser globals
- root.Swipe = factory();
- }
-}(this, function () {
- // Establish the root object, `window` (`self`) in the browser, `global`
- // on the server, or `this` in some virtual machines. We use `self`
- // instead of `window` for `WebWorker` support.
- var root = typeof self == 'object' && self.self === self && self ||
- typeof global == 'object' && global.global === global && global ||
- this;
-
- var _document = root.document;
-
- function Swipe(container, options) {
-
- 'use strict';
-
- options = options || {};
-
- // setup initial vars
- var start = {};
- var delta = {};
- var isScrolling;
-
- // setup auto slideshow
- var delay = options.auto || 0;
- var interval;
-
- var disabled = false;
-
- // utilities
- // simple no operation function
- var noop = function () { };
- // offload a functions execution
- var offloadFn = function (fn) { setTimeout(fn || noop, 0); };
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered.
- var throttle = function (fn, threshhold) {
- threshhold = threshhold || 100;
- var timeout = null;
-
- function cancel() {
- if (timeout) clearTimeout(timeout);
- }
-
- function throttledFn() {
- var context = this;
- var args = arguments;
- cancel();
- timeout = setTimeout(function () {
- timeout = null;
- fn.apply(context, args);
- }, threshhold);
- }
-
- // allow remove throttled timeout
- throttledFn.cancel = cancel;
-
- return throttledFn;
- };
-
- function getScrollbarWidth() {
- return root.innerWidth - _document.documentElement.clientWidth;
- }
-
- // check whether event is cancelable
- var isCancelable = function (event) {
- if (!event) return false;
- return typeof event.cancelable !== 'boolean' || event.cancelable;
- };
-
- // check browser capabilities
- var browser = {
- addEventListener: !!root.addEventListener,
- passiveEvents: (function () {
- // Test via a getter in the options object to see if the passive property is accessed
- var supportsPassive = false;
- try {
- var opts = Object.defineProperty({}, 'passive', {
- // eslint-disable-next-line getter-return
- get: function () {
- supportsPassive = true;
- }
- });
- root.addEventListener('testEvent', null, opts);
- root.removeEventListener('testEvent', null, opts);
- }
- catch (e) {
- supportsPassive = false;
- }
- return supportsPassive;
- })(),
- // eslint-disable-next-line no-undef
- touch: ('ontouchstart' in root) || root.DocumentTouch && _document instanceof DocumentTouch,
- transitions: (function (temp) {
- var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];
- for (var i in props) {
- if (temp.style[props[i]] !== undefined) {
- return true;
- }
- }
- return false;
- })(_document.createElement('swipe'))
- };
-
- // quit if no root element
- if (!container) return;
-
- var element = container.children[0];
- var slides, slidePos, width, length;
- var index = parseInt(options.startSlide, 10) || 0;
- var speed = options.speed || 300;
- options.continuous = options.continuous !== undefined ? options.continuous : true;
-
- // check text direction
- var slideDir = (function (el, prop, dir) {
- if (el.currentStyle) {
- dir = el.currentStyle[prop];
- } else if (root.getComputedStyle) {
- dir = root.getComputedStyle(el, null).getPropertyValue(prop);
- }
- return 'rtl' === dir ? 'right' : 'left';
- })(container, 'direction');
-
- // AutoRestart option: auto restart slideshow after user's touch event
- options.autoRestart = options.autoRestart !== undefined ? options.autoRestart : false;
-
- // throttled setup
- var throttledSetup = throttle(setup);
-
- // setup event capturing
- var events = {
-
- handleEvent: function (event) {
- if (disabled) return;
-
- switch (event.type) {
- case 'mousedown':
- case 'touchstart': this.start(event); break;
- case 'mousemove':
- case 'touchmove': this.move(event); break;
- case 'mouseup':
- case 'mouseleave':
- case 'touchend': this.end(event); break;
- case 'webkitTransitionEnd':
- case 'msTransitionEnd':
- case 'oTransitionEnd':
- case 'otransitionend':
- case 'transitionend': this.transitionEnd(event); break;
- case 'resize': throttledSetup(); break;
- }
-
- if (options.stopPropagation) {
- event.stopPropagation();
- }
- },
-
- start: function (event) {
- var touches;
-
- if (isMouseEvent(event)) {
- touches = event;
- event.preventDefault(); // For desktop Safari drag
- } else {
- touches = event.touches[0];
- }
-
- // measure start values
- start = {
-
- // get initial touch coords
- x: touches.pageX,
- y: touches.pageY,
-
- // store time to determine touch duration
- time: +new Date()
-
- };
-
- // used for testing first move event
- isScrolling = undefined;
-
- // reset delta and end measurements
- delta = {};
-
- // attach touchmove and touchend listeners
- if (isMouseEvent(event)) {
- element.addEventListener('mousemove', this, false);
- element.addEventListener('mouseup', this, false);
- element.addEventListener('mouseleave', this, false);
- } else {
- element.addEventListener('touchmove', this, browser.passiveEvents ? { passive: false } : false);
- element.addEventListener('touchend', this, false);
- }
-
- },
-
- move: function (event) {
- var touches;
-
- if (isMouseEvent(event)) {
- touches = event;
- } else {
- // ensure swiping with one touch and not pinching
- if (event.touches.length > 1 || event.scale && event.scale !== 1) {
- return;
- }
-
- // we can disable scrolling unless it is already in progress
- if (options.disableScroll && isCancelable(event)) {
- event.preventDefault();
- }
-
- touches = event.touches[0];
- }
-
- // measure change in x and y
- delta = {
- x: touches.pageX - start.x,
- y: touches.pageY - start.y
- };
-
- // determine if scrolling test has run - one time test
- if (typeof isScrolling === 'undefined') {
- isScrolling = !!(isScrolling || Math.abs(delta.x) < Math.abs(delta.y));
- }
-
- // if user is not trying to scroll vertically
- if (!isScrolling) {
-
- // if it is not already scrolling
- if (isCancelable(event)) {
- // prevent native scrolling
- event.preventDefault();
- }
-
- // stop slideshow
- stop();
-
- // increase resistance if first or last slide
- if (options.continuous) { // we don't add resistance at the end
-
- translate(circle(index - 1), delta.x + slidePos[circle(index - 1)], 0);
- translate(index, delta.x + slidePos[index], 0);
- translate(circle(index + 1), delta.x + slidePos[circle(index + 1)], 0);
-
- } else {
-
- delta.x =
- delta.x /
- ((!index && delta.x > 0 || // if first slide and sliding left
- index === slides.length - 1 && // or if last slide and sliding right
- delta.x < 0 // and if sliding at all
- ) ?
- (Math.abs(delta.x) / width + 1) // determine resistance level
- : 1); // no resistance if false
-
- // translate 1:1
- translate(index - 1, delta.x + slidePos[index - 1], 0);
- translate(index, delta.x + slidePos[index], 0);
- translate(index + 1, delta.x + slidePos[index + 1], 0);
- }
- }
- },
-
- end: function (event) {
-
- // measure duration
- var duration = +new Date() - start.time;
-
- // determine if slide attempt triggers next/prev slide
- var isValidSlide =
- Number(duration) < 250 && // if slide duration is less than 250ms
- Math.abs(delta.x) > 20 || // and if slide amt is greater than 20px
- Math.abs(delta.x) > width / 2; // or if slide amt is greater than half the width
-
- // determine if slide attempt is past start and end
- var isPastBounds =
- !index && delta.x > 0 || // if first slide and slide amt is greater than 0
- index === slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0
-
- if (options.continuous) {
- isPastBounds = false;
- }
-
- // OLD determine direction of swipe (true:right, false:left)
- // determine direction of swipe (1: backward, -1: forward)
- var direction = Math.abs(delta.x) / delta.x;
-
- // if not scrolling vertically
- if (!isScrolling) {
-
- if (isValidSlide && !isPastBounds) {
-
- // if we're moving right
- if (direction < 0) {
-
- if (options.continuous) { // we need to get the next in this direction in place
-
- move(circle(index - 1), -width, 0);
- move(circle(index + 2), width, 0);
-
- } else {
- move(index - 1, -width, 0);
- }
-
- move(index, slidePos[index] - width, speed);
- move(circle(index + 1), slidePos[circle(index + 1)] - width, speed);
- index = circle(index + 1);
-
- } else {
- if (options.continuous) { // we need to get the next in this direction in place
-
- move(circle(index + 1), width, 0);
- move(circle(index - 2), -width, 0);
-
- } else {
- move(index + 1, width, 0);
- }
-
- move(index, slidePos[index] + width, speed);
- move(circle(index - 1), slidePos[circle(index - 1)] + width, speed);
- index = circle(index - 1);
- }
-
- runCallback(getPos(), slides[index], direction);
-
- } else {
-
- if (options.continuous) {
-
- move(circle(index - 1), -width, speed);
- move(index, 0, speed);
- move(circle(index + 1), width, speed);
-
- } else {
-
- move(index - 1, -width, speed);
- move(index, 0, speed);
- move(index + 1, width, speed);
- }
- }
- }
-
- // kill touchmove and touchend event listeners until touchstart called again
- if (isMouseEvent(event)) {
- element.removeEventListener('mousemove', events, false);
- element.removeEventListener('mouseup', events, false);
- element.removeEventListener('mouseleave', events, false);
- } else {
- element.removeEventListener('touchmove', events, browser.passiveEvents ? { passive: false } : false);
- element.removeEventListener('touchend', events, false);
- }
-
- },
-
- transitionEnd: function (event) {
- var currentIndex = parseInt(event.target.getAttribute('data-index'), 10);
- if (currentIndex === index) {
- if (delay || options.autoRestart) restart();
-
- runTransitionEnd(getPos(), slides[index]);
- }
- }
- };
-
- // trigger setup
- setup();
-
- // start auto slideshow if applicable
- begin();
-
- // Expose the Swipe API
- return {
- // initialize
- setup: setup,
-
- // go to slide
- slide: function (to, speed) {
- stop();
- slide(to, speed);
- },
-
- // move to previous
- prev: function () {
- stop();
- prev();
- },
-
- // move to next
- next: function () {
- stop();
- next();
- },
-
- // Restart slideshow
- restart: restart,
-
- // cancel slideshow
- stop: stop,
-
- // return current index position
- getPos: getPos,
-
- // disable slideshow
- disable: disable,
-
- // enable slideshow
- enable: enable,
-
- // return total number of slides
- getNumSlides: function () { return length; },
-
- // completely remove swipe
- kill: kill
- };
-
- // remove all event listeners
- function detachEvents() {
- if (browser.addEventListener) {
- // remove current event listeners
- element.removeEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);
- element.removeEventListener('mousedown', events, false);
- element.removeEventListener('webkitTransitionEnd', events, false);
- element.removeEventListener('msTransitionEnd', events, false);
- element.removeEventListener('oTransitionEnd', events, false);
- element.removeEventListener('otransitionend', events, false);
- element.removeEventListener('transitionend', events, false);
- root.removeEventListener('resize', events, false);
- } else {
- root.onresize = null;
- }
- }
-
- // add event listeners
- function attachEvents() {
- if (browser.addEventListener) {
-
- // set touchstart event on element
- if (browser.touch) {
- element.addEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);
- }
-
- if (options.draggable) {
- element.addEventListener('mousedown', events, false);
- }
-
- if (browser.transitions) {
- element.addEventListener('webkitTransitionEnd', events, false);
- element.addEventListener('msTransitionEnd', events, false);
- element.addEventListener('oTransitionEnd', events, false);
- element.addEventListener('otransitionend', events, false);
- element.addEventListener('transitionend', events, false);
- }
-
- // set resize event on window
- root.addEventListener('resize', events, false);
-
- } else {
- root.onresize = throttledSetup; // to play nice with old IE
- }
- }
-
- // clone nodes when there is only two slides
- function cloneNode(el) {
- var clone = el.cloneNode(true);
- element.appendChild(clone);
-
- // tag these slides as clones (to remove them on kill)
- clone.setAttribute('data-cloned', true);
-
- // Remove id from element
- clone.removeAttribute('id');
- }
-
- function setup(opts) {
- // Overwrite options if necessary
- if (opts != null) {
- for (var prop in opts) {
- options[prop] = opts[prop];
- }
- }
-
- // cache slides
- slides = element.children;
- length = slides.length;
-
- // slides length correction, minus cloned slides
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].getAttribute('data-cloned')) length--;
- }
-
- // set continuous to false if only one slide
- if (slides.length < 2) {
- options.continuous = false;
- }
-
- // special case if two slides
- if (browser.transitions && options.continuous && slides.length < 3) {
- cloneNode(slides[0]);
- cloneNode(slides[1]);
-
- slides = element.children;
- }
-
- // adjust style on rtl
- if ('right' === slideDir) {
- for (var j = 0; j < slides.length; j++) {
- slides[j].style.float = 'right';
- }
- }
-
- // create an array to store current positions of each slide
- slidePos = new Array(slides.length);
-
- // determine width of each slide
- //width = container.getBoundingClientRect().width || container.offsetWidth;
- width = root.innerWidth - getScrollbarWidth();
- element.style.width = (slides.length * width * 2) + 'px';
- // stack elements
- var pos = slides.length;
- while (pos--) {
- var slide = slides[pos];
-
- slide.style.width = width + 'px';
- slide.setAttribute('data-index', pos);
-
- if (browser.transitions) {
- slide.style[slideDir] = (pos * -width) + 'px';
- move(pos, index > pos ? -width : (index < pos ? width : 0), 0);
- }
- }
-
- // reposition elements before and after index
- if (options.continuous && browser.transitions) {
- move(circle(index - 1), -width, 0);
- move(circle(index + 1), width, 0);
- }
-
- if (!browser.transitions) {
- element.style[slideDir] = (index * -width) + 'px';
- }
-
- container.style.visibility = 'visible';
-
- // reinitialize events
- detachEvents();
- attachEvents();
- }
-
- function prev() {
- if (disabled) return;
-
- if (options.continuous) {
- slide(index - 1);
- } else if (index) {
- slide(index - 1);
- }
- }
-
- function next() {
- if (disabled) return;
- if (options.continuous) {
- slide(index + 1);
- } else if (index < slides.length - 1) {
- slide(index + 1);
- }
- }
-
- function runCallback(pos, index, dir) {
- if (options.callback) {
- options.callback(pos, index, dir);
- }
- }
-
- function runTransitionEnd(pos, index) {
- if (options.transitionEnd) {
- options.transitionEnd(pos, index);
- }
- }
-
- function circle(index) {
-
- // a simple positive modulo using slides.length
- return (slides.length + (index % slides.length)) % slides.length;
- }
-
- function getPos() {
- // Fix for the clone issue in the event of 2 slides
- var currentIndex = index;
-
- if (currentIndex >= length) {
- currentIndex = currentIndex - length;
- }
-
- return currentIndex;
- }
-
- function slide(to, slideSpeed) {
-
- // ensure to is of type 'number'
- to = typeof to !== 'number' ? parseInt(to, 10) : to;
-
- // do nothing if already on requested slide
- if (index === to) return;
-
- if (browser.transitions) {
-
- var direction = Math.abs(index - to) / (index - to); // 1: backward, -1: forward
-
- // get the actual position of the slide
- if (options.continuous) {
- var natural_direction = direction;
- direction = -slidePos[circle(to)] / width;
-
- // if going forward but to < index, use to = slides.length + to
- // if going backward but to > index, use to = -slides.length + to
- if (direction !== natural_direction) {
- to = -direction * slides.length + to;
- }
-
- }
-
- var diff = Math.abs(index - to) - 1;
-
- // move all the slides between index and to in the right direction
- while (diff--) {
- move(circle((to > index ? to : index) - diff - 1), width * direction, 0);
- }
-
- to = circle(to);
-
- move(index, width * direction, slideSpeed || speed);
- move(to, 0, slideSpeed || speed);
-
- if (options.continuous) { // we need to get the next in place
- move(circle(to - direction), -(width * direction), 0);
- }
-
- } else {
-
- to = circle(to);
- animate(index * -width, to * -width, slideSpeed || speed);
- // no fallback for a circular continuous if the browser does not accept transitions
- }
-
- index = to;
- offloadFn(function () {
- runCallback(getPos(), slides[index], direction);
- });
- }
-
- function move(index, dist, speed) {
- translate(index, dist, speed);
- slidePos[index] = dist;
- }
-
- function translate(index, dist, speed) {
-
- var slide = slides[index];
- var style = slide && slide.style;
-
- if (!style) return;
-
- style.webkitTransitionDuration =
- style.MozTransitionDuration =
- style.msTransitionDuration =
- style.OTransitionDuration =
- style.transitionDuration = speed + 'ms';
-
- style.webkitTransform =
- style.msTransform =
- style.MozTransform =
- style.OTransform =
- style.transform = 'translateX(' + dist + 'px)';
- }
-
- function animate(from, to, speed) {
-
- // if not an animation, just reposition
- if (!speed) {
- element.style[slideDir] = to + 'px';
- return;
- }
-
- var start = +new Date();
-
- var timer = setInterval(function () {
- var timeElap = +new Date() - start;
-
- if (timeElap > speed) {
-
- element.style[slideDir] = to + 'px';
-
- if (delay || options.autoRestart) restart();
-
- runTransitionEnd(getPos(), slides[index]);
-
- clearInterval(timer);
-
- return;
- }
-
- element.style[slideDir] = (((to - from) * (Math.floor((timeElap / speed) * 100) / 100)) + from) + 'px';
- }, 4);
-
- }
-
- function begin() {
- delay = options.auto || 0;
- if (delay) interval = setTimeout(next, delay);
- }
-
- function stop() {
- delay = 0;
- clearTimeout(interval);
- }
-
- function restart() {
- stop();
- begin();
- }
-
- function disable() {
- stop();
- disabled = true;
- }
-
- function enable() {
- disabled = false;
- restart();
- }
-
- function isMouseEvent(e) {
- return /^mouse/.test(e.type);
- }
-
- function kill() {
- // cancel slideshow
- stop();
-
- // remove inline styles
- container.style.visibility = '';
-
- // reset element
- element.style.width = '';
- element.style[slideDir] = '';
-
- // reset slides
- var pos = slides.length;
- while (pos--) {
-
- if (browser.transitions) {
- translate(pos, 0, 0);
- }
-
- var slide = slides[pos];
-
- // if the slide is tagged as clone, remove it
- if (slide.getAttribute('data-cloned')) {
- var _parent = slide.parentElement;
- _parent.removeChild(slide);
- }
-
- // remove styles
- slide.style.width = '';
- slide.style[slideDir] = '';
-
- slide.style.webkitTransitionDuration =
- slide.style.MozTransitionDuration =
- slide.style.msTransitionDuration =
- slide.style.OTransitionDuration =
- slide.style.transitionDuration = '';
-
- slide.style.webkitTransform =
- slide.style.msTransform =
- slide.style.MozTransform =
- slide.style.OTransform = '';
-
- // remove custom attributes (?)
- // slide.removeAttribute('data-index');
- }
-
- // remove all events
- detachEvents();
-
- // remove throttled function timeout
- throttledSetup.cancel();
- }
- }
-
- if (root.jQuery || root.Zepto) {
- (function ($) {
- $.fn.Swipe = function (params) {
- return this.each(function () {
- $(this).data('Swipe', new Swipe($(this)[0], params));
- });
- };
- })(root.jQuery || root.Zepto);
- }
-
- return Swipe;
-})); \ No newline at end of file
+!function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.Swipe=e(),t.Swipe}):"object"==typeof module&&module.exports?module.exports=e():t.Swipe=e()}(this,function(){var t,e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this,n=e.document;function i(t,i){"use strict";var o,s,r={},a={},u=(i=i||{}).auto||0,l=!1,c=function(){},v=function(t){setTimeout(t||c,0)};var d=function(t){return!!t&&("boolean"!=typeof t.cancelable||t.cancelable)},f={addEventListener:!!e.addEventListener,passiveEvents:function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testEvent",null,n),e.removeEventListener("testEvent",null,n)}catch(e){t=!1}return t}(),touch:"ontouchstart"in e||e.DocumentTouch&&n instanceof DocumentTouch,transitions:function(t){var e=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var n in e)if(void 0!==t.style[e[n]])return!0;return!1}(n.createElement("swipe"))};if(t){var m,h,p,E,y=t.children[0],b=parseInt(i.startSlide,10)||0,g=i.speed||300;i.continuous=void 0===i.continuous||i.continuous;var T,x,L=((T=t).currentStyle?x=T.currentStyle.direction:e.getComputedStyle&&(x=e.getComputedStyle(T,null).getPropertyValue("direction")),"rtl"===x?"right":"left");i.autoRestart=void 0!==i.autoRestart&&i.autoRestart;var w=function(t,e){e=e||100;var n=null;function i(){n&&clearTimeout(n)}function o(){var o=this,s=arguments;i(),n=setTimeout(function(){n=null,t.apply(o,s)},e)}return o.cancel=i,o}(S),D={handleEvent:function(t){if(!l){switch(t.type){case"mousedown":case"touchstart":this.start(t);break;case"mousemove":case"touchmove":this.move(t);break;case"mouseup":case"mouseleave":case"touchend":this.end(t);break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":this.transitionEnd(t);break;case"resize":w()}i.stopPropagation&&t.stopPropagation()}},start:function(t){var e;Q(t)?(e=t,t.preventDefault()):e=t.touches[0],r={x:e.pageX,y:e.pageY,time:+new Date},o=void 0,a={},Q(t)?(y.addEventListener("mousemove",this,!1),y.addEventListener("mouseup",this,!1),y.addEventListener("mouseleave",this,!1)):(y.addEventListener("touchmove",this,!!f.passiveEvents&&{passive:!1}),y.addEventListener("touchend",this,!1))},move:function(t){var e;if(Q(t))e=t;else{if(t.touches.length>1||t.scale&&1!==t.scale)return;i.disableScroll&&d(t)&&t.preventDefault(),e=t.touches[0]}a={x:e.pageX-r.x,y:e.pageY-r.y},void 0===o&&(o=!!(o||Math.abs(a.x)<Math.abs(a.y))),o||(d(t)&&t.preventDefault(),N(),i.continuous?(C(O(b-1),a.x+h[O(b-1)],0),C(b,a.x+h[b],0),C(O(b+1),a.x+h[O(b+1)],0)):(a.x=a.x/(!b&&a.x>0||b===m.length-1&&a.x<0?Math.abs(a.x)/p+1:1),C(b-1,a.x+h[b-1],0),C(b,a.x+h[b],0),C(b+1,a.x+h[b+1],0)))},end:function(t){var e=+new Date-r.time,n=Number(e)<250&&Math.abs(a.x)>20||Math.abs(a.x)>p/2,s=!b&&a.x>0||b===m.length-1&&a.x<0;i.continuous&&(s=!1);var u=Math.abs(a.x)/a.x;o||(n&&!s?(u<0?(i.continuous?(R(O(b-1),-p,0),R(O(b+2),p,0)):R(b-1,-p,0),R(b,h[b]-p,g),R(O(b+1),h[O(b+1)]-p,g),b=O(b+1)):(i.continuous?(R(O(b+1),p,0),R(O(b-2),-p,0)):R(b+1,p,0),R(b,h[b]+p,g),R(O(b-1),h[O(b-1)]+p,g),b=O(b-1)),A(P(),m[b],u)):i.continuous?(R(O(b-1),-p,g),R(b,0,g),R(O(b+1),p,g)):(R(b-1,-p,g),R(b,0,g),R(b+1,p,g))),Q(t)?(y.removeEventListener("mousemove",D,!1),y.removeEventListener("mouseup",D,!1),y.removeEventListener("mouseleave",D,!1)):(y.removeEventListener("touchmove",D,!!f.passiveEvents&&{passive:!1}),y.removeEventListener("touchend",D,!1))},transitionEnd:function(t){parseInt(t.target.getAttribute("data-index"),10)===b&&((u||i.autoRestart)&&X(),j(P(),m[b]))}};return S(),W(),{setup:S,slide:function(t,e){N(),I(t,e)},prev:function(){N(),function(){if(l)return;i.continuous?I(b-1):b&&I(b-1)}()},next:function(){N(),z()},restart:X,stop:N,getPos:P,disable:function(){N(),l=!0},enable:function(){l=!1,X()},getNumSlides:function(){return E},kill:function(){N(),t.style.visibility="",y.style.width="",y.style[L]="";var e=m.length;for(;e--;){f.transitions&&C(e,0,0);var n=m[e];if(n.getAttribute("data-cloned")){var i=n.parentElement;i.removeChild(n)}n.style.width="",n.style[L]="",n.style.webkitTransitionDuration=n.style.MozTransitionDuration=n.style.msTransitionDuration=n.style.OTransitionDuration=n.style.transitionDuration="",n.style.webkitTransform=n.style.msTransform=n.style.MozTransform=n.style.OTransform=""}k(),w.cancel()}}}function k(){f.addEventListener?(y.removeEventListener("touchstart",D,!!f.passiveEvents&&{passive:!0}),y.removeEventListener("mousedown",D,!1),y.removeEventListener("webkitTransitionEnd",D,!1),y.removeEventListener("msTransitionEnd",D,!1),y.removeEventListener("oTransitionEnd",D,!1),y.removeEventListener("otransitionend",D,!1),y.removeEventListener("transitionend",D,!1),e.removeEventListener("resize",D,!1)):e.onresize=null}function M(t){var e=t.cloneNode(!0);y.appendChild(e),e.setAttribute("data-cloned",!0),e.removeAttribute("id")}function S(o){if(null!=o)for(var s in o)i[s]=o[s];m=y.children,E=m.length;for(var r=0;r<m.length;r++)m[r].getAttribute("data-cloned")&&E--;if(m.length<2&&(i.continuous=!1),f.transitions&&i.continuous&&m.length<3&&(M(m[0]),M(m[1]),m=y.children),"right"===L)for(var a=0;a<m.length;a++)m[a].style.float="right";h=new Array(m.length),p=e.innerWidth-(e.innerWidth-n.documentElement.clientWidth),y.style.width=m.length*p*2+"px";for(var u=m.length;u--;){var l=m[u];l.style.width=p+"px",l.setAttribute("data-index",u),f.transitions&&(l.style[L]=u*-p+"px",R(u,b>u?-p:b<u?p:0,0))}i.continuous&&f.transitions&&(R(O(b-1),-p,0),R(O(b+1),p,0)),f.transitions||(y.style[L]=b*-p+"px"),t.style.visibility="visible",k(),f.addEventListener?(f.touch&&y.addEventListener("touchstart",D,!!f.passiveEvents&&{passive:!0}),i.draggable&&y.addEventListener("mousedown",D,!1),f.transitions&&(y.addEventListener("webkitTransitionEnd",D,!1),y.addEventListener("msTransitionEnd",D,!1),y.addEventListener("oTransitionEnd",D,!1),y.addEventListener("otransitionend",D,!1),y.addEventListener("transitionend",D,!1)),e.addEventListener("resize",D,!1)):e.onresize=w}function z(){l||(i.continuous?I(b+1):b<m.length-1&&I(b+1))}function A(t,e,n){i.callback&&i.callback(t,e,n)}function j(t,e){i.transitionEnd&&i.transitionEnd(t,e)}function O(t){return(m.length+t%m.length)%m.length}function P(){var t=b;return t>=E&&(t-=E),t}function I(t,e){if(t="number"!=typeof t?parseInt(t,10):t,b!==t){if(f.transitions){var n=Math.abs(b-t)/(b-t);if(i.continuous){var o=n;(n=-h[O(t)]/p)!==o&&(t=-n*m.length+t)}for(var s=Math.abs(b-t)-1;s--;)R(O((t>b?t:b)-s-1),p*n,0);t=O(t),R(b,p*n,e||g),R(t,0,e||g),i.continuous&&R(O(t-n),-p*n,0)}else t=O(t),function(t,e,n){if(!n)return void(y.style[L]=e+"px");var o=+new Date,s=setInterval(function(){var r=+new Date-o;if(r>n)return y.style[L]=e+"px",(u||i.autoRestart)&&X(),j(P(),m[b]),void clearInterval(s);y.style[L]=(e-t)*(Math.floor(r/n*100)/100)+t+"px"},4)}(b*-p,t*-p,e||g);b=t,v(function(){A(P(),m[b],n)})}}function R(t,e,n){C(t,e,n),h[t]=e}function C(t,e,n){var i=m[t],o=i&&i.style;o&&(o.webkitTransitionDuration=o.MozTransitionDuration=o.msTransitionDuration=o.OTransitionDuration=o.transitionDuration=n+"ms",o.webkitTransform=o.msTransform=o.MozTransform=o.OTransform=o.transform="translateX("+e+"px)")}function W(){(u=i.auto||0)&&(s=setTimeout(z,u))}function N(){u=0,clearTimeout(s)}function X(){N(),W()}function Q(t){return/^mouse/.test(t.type)}}return(e.jQuery||e.Zepto)&&((t=e.jQuery||e.Zepto).fn.Swipe=function(e){return this.each(function(){t(this).data("Swipe",new i(t(this)[0],e))})}),i}); \ No newline at end of file
diff --git a/assets/js/swipehome.js b/assets/js/swipehome.js
index fd008b2..47f811d 100644
--- a/assets/js/swipehome.js
+++ b/assets/js/swipehome.js
@@ -6,833 +6,4 @@
*
*/
-// if the module has no dependencies, the above pattern can be simplified to
-// eslint-disable-next-line no-extra-semi
-; (function (root, factory) {
- // eslint-disable-next-line no-undef
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- // eslint-disable-next-line no-undef
- define([], function () {
- root.Swipe = factory();
- return root.Swipe;
- });
- } else if (typeof module === 'object' && module.exports) {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory();
- } else {
- // Browser globals
- root.Swipe = factory();
- }
-}(this, function () {
- // Establish the root object, `window` (`self`) in the browser, `global`
- // on the server, or `this` in some virtual machines. We use `self`
- // instead of `window` for `WebWorker` support.
- var root = typeof self == 'object' && self.self === self && self ||
- typeof global == 'object' && global.global === global && global ||
- this;
-
- var _document = root.document;
-
- function Swipe(container, options) {
-
- 'use strict';
-
- options = options || {};
-
- // setup initial vars
- var start = {};
- var delta = {};
- var isScrolling;
-
- // setup auto slideshow
- var delay = options.auto || 0;
- var interval;
-
- var disabled = false;
-
- // utilities
- // simple no operation function
- var noop = function () { };
- // offload a functions execution
- var offloadFn = function (fn) { setTimeout(fn || noop, 0); };
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered.
- var throttle = function (fn, threshhold) {
- threshhold = threshhold || 100;
- var timeout = null;
-
- function cancel() {
- if (timeout) clearTimeout(timeout);
- }
-
- function throttledFn() {
- var context = this;
- var args = arguments;
- cancel();
- timeout = setTimeout(function () {
- timeout = null;
- fn.apply(context, args);
- }, threshhold);
- }
-
- // allow remove throttled timeout
- throttledFn.cancel = cancel;
-
- return throttledFn;
- };
-
- // check whether event is cancelable
- var isCancelable = function (event) {
- if (!event) return false;
- return typeof event.cancelable !== 'boolean' || event.cancelable;
- };
-
- // check browser capabilities
- var browser = {
- addEventListener: !!root.addEventListener,
- passiveEvents: (function () {
- // Test via a getter in the options object to see if the passive property is accessed
- var supportsPassive = false;
- try {
- var opts = Object.defineProperty({}, 'passive', {
- // eslint-disable-next-line getter-return
- get: function () {
- supportsPassive = true;
- }
- });
- root.addEventListener('testEvent', null, opts);
- root.removeEventListener('testEvent', null, opts);
- }
- catch (e) {
- supportsPassive = false;
- }
- return supportsPassive;
- })(),
- // eslint-disable-next-line no-undef
- touch: ('ontouchstart' in root) || root.DocumentTouch && _document instanceof DocumentTouch,
- transitions: (function (temp) {
- var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];
- for (var i in props) {
- if (temp.style[props[i]] !== undefined) {
- return true;
- }
- }
- return false;
- })(_document.createElement('swipe'))
- };
-
- // quit if no root element
- if (!container) return;
-
- var element = container.children[0];
- var slides, slidePos, width, length;
- var index = parseInt(options.startSlide, 10) || 0;
- var speed = options.speed || 300;
- options.continuous = options.continuous !== undefined ? options.continuous : true;
-
- // check text direction
- var slideDir = (function (el, prop, dir) {
- if (el.currentStyle) {
- dir = el.currentStyle[prop];
- } else if (root.getComputedStyle) {
- dir = root.getComputedStyle(el, null).getPropertyValue(prop);
- }
- return 'rtl' === dir ? 'right' : 'left';
- })(container, 'direction');
-
- // AutoRestart option: auto restart slideshow after user's touch event
- options.autoRestart = options.autoRestart !== undefined ? options.autoRestart : false;
-
- // throttled setup
- var throttledSetup = throttle(setup);
-
- // setup event capturing
- var events = {
-
- handleEvent: function (event) {
- if (disabled) return;
-
- switch (event.type) {
- case 'mousedown':
- case 'touchstart': this.start(event); break;
- case 'mousemove':
- case 'touchmove': this.move(event); break;
- case 'mouseup':
- case 'mouseleave':
- case 'touchend': this.end(event); break;
- case 'webkitTransitionEnd':
- case 'msTransitionEnd':
- case 'oTransitionEnd':
- case 'otransitionend':
- case 'transitionend': this.transitionEnd(event); break;
- case 'resize': throttledSetup(); break;
- }
-
- if (options.stopPropagation) {
- event.stopPropagation();
- }
- },
-
- start: function (event) {
- var touches;
-
- if (isMouseEvent(event)) {
- touches = event;
- event.preventDefault(); // For desktop Safari drag
- } else {
- touches = event.touches[0];
- }
-
- // measure start values
- start = {
-
- // get initial touch coords
- x: touches.pageX,
- y: touches.pageY,
-
- // store time to determine touch duration
- time: +new Date()
-
- };
-
- // used for testing first move event
- isScrolling = undefined;
-
- // reset delta and end measurements
- delta = {};
-
- // attach touchmove and touchend listeners
- if (isMouseEvent(event)) {
- element.addEventListener('mousemove', this, false);
- element.addEventListener('mouseup', this, false);
- element.addEventListener('mouseleave', this, false);
- } else {
- element.addEventListener('touchmove', this, browser.passiveEvents ? { passive: false } : false);
- element.addEventListener('touchend', this, false);
- }
- runDragStart(getPos(), slides[index]);
- },
-
- move: function (event) {
- var touches;
-
- if (isMouseEvent(event)) {
- touches = event;
- } else {
- // ensure swiping with one touch and not pinching
- if (event.touches.length > 1 || event.scale && event.scale !== 1) {
- return;
- }
-
- // we can disable scrolling unless it is already in progress
- if (options.disableScroll && isCancelable(event)) {
- event.preventDefault();
- }
-
- touches = event.touches[0];
- }
-
- // measure change in x and y
- delta = {
- x: touches.pageX - start.x,
- y: touches.pageY - start.y
- };
-
- // determine if scrolling test has run - one time test
- if (typeof isScrolling === 'undefined') {
- isScrolling = !!(isScrolling || Math.abs(delta.x) < Math.abs(delta.y));
- }
-
- // if user is not trying to scroll vertically
- if (!isScrolling) {
-
- // if it is not already scrolling
- if (isCancelable(event)) {
- // prevent native scrolling
- event.preventDefault();
- }
-
- // stop slideshow
- stop();
-
- // increase resistance if first or last slide
- if (options.continuous) { // we don't add resistance at the end
-
- translate(circle(index - 1), delta.x + slidePos[circle(index - 1)], 0);
- translate(index, delta.x + slidePos[index], 0);
- translate(circle(index + 1), delta.x + slidePos[circle(index + 1)], 0);
-
- } else {
-
- delta.x =
- delta.x /
- ((!index && delta.x > 0 || // if first slide and sliding left
- index === slides.length - 1 && // or if last slide and sliding right
- delta.x < 0 // and if sliding at all
- ) ?
- (Math.abs(delta.x) / width + 1) // determine resistance level
- : 1); // no resistance if false
-
- // translate 1:1
- translate(index - 1, delta.x + slidePos[index - 1], 0);
- translate(index, delta.x + slidePos[index], 0);
- translate(index + 1, delta.x + slidePos[index + 1], 0);
- }
- }
- },
-
- end: function (event) {
-
- // measure duration
- var duration = +new Date() - start.time;
-
- // determine if slide attempt triggers next/prev slide
- var isValidSlide =
- Number(duration) < 250 && // if slide duration is less than 250ms
- Math.abs(delta.x) > 20 || // and if slide amt is greater than 20px
- Math.abs(delta.x) > width / 2; // or if slide amt is greater than half the width
-
- // determine if slide attempt is past start and end
- var isPastBounds =
- !index && delta.x > 0 || // if first slide and slide amt is greater than 0
- index === slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0
-
- if (options.continuous) {
- isPastBounds = false;
- }
-
- // OLD determine direction of swipe (true:right, false:left)
- // determine direction of swipe (1: backward, -1: forward)
- var direction = Math.abs(delta.x) / delta.x;
-
- // if not scrolling vertically
- if (!isScrolling) {
-
- if (isValidSlide && !isPastBounds) {
-
- // if we're moving right
- if (direction < 0) {
-
- if (options.continuous) { // we need to get the next in this direction in place
-
- move(circle(index - 1), -width, 0);
- move(circle(index + 2), width, 0);
-
- } else {
- move(index - 1, -width, 0);
- }
-
- move(index, slidePos[index] - width, speed);
- move(circle(index + 1), slidePos[circle(index + 1)] - width, speed);
- index = circle(index + 1);
-
- } else {
- if (options.continuous) { // we need to get the next in this direction in place
-
- move(circle(index + 1), width, 0);
- move(circle(index - 2), -width, 0);
-
- } else {
- move(index + 1, width, 0);
- }
-
- move(index, slidePos[index] + width, speed);
- move(circle(index - 1), slidePos[circle(index - 1)] + width, speed);
- index = circle(index - 1);
- }
-
- runCallback(getPos(), slides[index], direction);
-
- } else {
-
- if (options.continuous) {
-
- move(circle(index - 1), -width, speed);
- move(index, 0, speed);
- move(circle(index + 1), width, speed);
-
- } else {
-
- move(index - 1, -width, speed);
- move(index, 0, speed);
- move(index + 1, width, speed);
- }
- }
- }
-
- // kill touchmove and touchend event listeners until touchstart called again
- if (isMouseEvent(event)) {
- element.removeEventListener('mousemove', events, false);
- element.removeEventListener('mouseup', events, false);
- element.removeEventListener('mouseleave', events, false);
- } else {
- element.removeEventListener('touchmove', events, browser.passiveEvents ? { passive: false } : false);
- element.removeEventListener('touchend', events, false);
- }
- runDragEnd(getPos(), slides[index]);
- },
-
- transitionEnd: function (event) {
- var currentIndex = parseInt(event.target.getAttribute('data-index'), 10);
- if (currentIndex === index) {
- if (delay || options.autoRestart) restart();
-
- runTransitionEnd(getPos(), slides[index]);
- }
- }
- };
-
- // trigger setup
- setup();
-
- // start auto slideshow if applicable
- begin();
-
- // Expose the Swipe API
- return {
- // initialize
- setup: setup,
-
- // go to slide
- slide: function (to, speed) {
- stop();
- slide(to, speed);
- },
-
- // move to previous
- prev: function () {
- stop();
- prev();
- },
-
- // move to next
- next: function () {
- stop();
- next();
- },
-
- // Restart slideshow
- restart: restart,
-
- // cancel slideshow
- stop: stop,
-
- // return current index position
- getPos: getPos,
-
- // disable slideshow
- disable: disable,
-
- // enable slideshow
- enable: enable,
-
- // return total number of slides
- getNumSlides: function () { return length; },
-
- // completely remove swipe
- kill: kill
- };
-
- // remove all event listeners
- function detachEvents() {
- if (browser.addEventListener) {
- // remove current event listeners
- element.removeEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);
- element.removeEventListener('mousedown', events, false);
- element.removeEventListener('webkitTransitionEnd', events, false);
- element.removeEventListener('msTransitionEnd', events, false);
- element.removeEventListener('oTransitionEnd', events, false);
- element.removeEventListener('otransitionend', events, false);
- element.removeEventListener('transitionend', events, false);
- root.removeEventListener('resize', events, false);
- } else {
- root.onresize = null;
- }
- }
-
- // add event listeners
- function attachEvents() {
- if (browser.addEventListener) {
-
- // set touchstart event on element
- if (browser.touch) {
- element.addEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);
- }
-
- if (options.draggable) {
- element.addEventListener('mousedown', events, false);
- }
-
- if (browser.transitions) {
- element.addEventListener('webkitTransitionEnd', events, false);
- element.addEventListener('msTransitionEnd', events, false);
- element.addEventListener('oTransitionEnd', events, false);
- element.addEventListener('otransitionend', events, false);
- element.addEventListener('transitionend', events, false);
- }
-
- // set resize event on window
- root.addEventListener('resize', events, false);
-
- } else {
- root.onresize = throttledSetup; // to play nice with old IE
- }
- }
-
- // clone nodes when there is only two slides
- function cloneNode(el) {
- var clone = el.cloneNode(true);
- element.appendChild(clone);
-
- // tag these slides as clones (to remove them on kill)
- clone.setAttribute('data-cloned', true);
-
- // Remove id from element
- clone.removeAttribute('id');
- }
-
- function setup(opts) {
- // Overwrite options if necessary
- if (opts != null) {
- for (var prop in opts) {
- options[prop] = opts[prop];
- }
- }
-
- // cache slides
- slides = element.children;
- length = slides.length;
-
- // slides length correction, minus cloned slides
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].getAttribute('data-cloned')) length--;
- }
-
- // set continuous to false if only one slide
- if (slides.length < 2) {
- options.continuous = false;
- }
-
- // special case if two slides
- if (browser.transitions && options.continuous && slides.length < 3) {
- cloneNode(slides[0]);
- cloneNode(slides[1]);
-
- slides = element.children;
- }
-
- // adjust style on rtl
- if ('right' === slideDir) {
- for (var j = 0; j < slides.length; j++) {
- slides[j].style.float = 'right';
- }
- }
-
- // create an array to store current positions of each slide
- slidePos = new Array(slides.length);
-
- // determine width of each slide
- width = container.getBoundingClientRect().width || container.offsetWidth;
-
- element.style.width = (slides.length * width * 2) + 'px';
-
- // stack elements
- var pos = slides.length;
- while (pos--) {
- var slide = slides[pos];
-
- slide.style.width = width + 'px';
- slide.setAttribute('data-index', pos);
-
- if (browser.transitions) {
- slide.style[slideDir] = (pos * -width) + 'px';
- move(pos, index > pos ? -width : (index < pos ? width : 0), 0);
- }
- }
-
- // reposition elements before and after index
- if (options.continuous && browser.transitions) {
- move(circle(index - 1), -width, 0);
- move(circle(index + 1), width, 0);
- }
-
- if (!browser.transitions) {
- element.style[slideDir] = (index * -width) + 'px';
- }
-
- container.style.visibility = 'visible';
-
- // reinitialize events
- detachEvents();
- attachEvents();
- }
-
- function prev() {
- if (disabled) return;
-
- if (options.continuous) {
- slide(index - 1);
- } else if (index) {
- slide(index - 1);
- }
- }
-
- function next() {
- if (disabled) return;
-
- if (options.continuous) {
- slide(index + 1);
- } else if (index < slides.length - 1) {
- slide(index + 1);
- }
- }
-
- function runCallback(pos, index, dir) {
- if (options.callback) {
- options.callback(pos, index, dir);
- }
- }
-
- function runTransitionEnd(pos, index) {
- if (options.transitionEnd) {
- options.transitionEnd(pos, index);
- }
- }
-
- function runDragStart(pos, index) {
- if (options.dragStart) {
- options.dragStart(pos, index);
- }
- }
-
- function runDragEnd(pos, index) {
- if (options.dragEnd) {
- options.dragEnd(pos, index);
- }
- }
-
- function circle(index) {
-
- // a simple positive modulo using slides.length
- return (slides.length + (index % slides.length)) % slides.length;
- }
-
- function getPos() {
- // Fix for the clone issue in the event of 2 slides
- var currentIndex = index;
-
- if (currentIndex >= length) {
- currentIndex = currentIndex - length;
- }
-
- return currentIndex;
- }
-
- function slide(to, slideSpeed) {
-
- // ensure to is of type 'number'
- to = typeof to !== 'number' ? parseInt(to, 10) : to;
-
- // do nothing if already on requested slide
- if (index === to) return;
-
- if (browser.transitions) {
-
- var direction = Math.abs(index - to) / (index - to); // 1: backward, -1: forward
-
- // get the actual position of the slide
- if (options.continuous) {
- var natural_direction = direction;
- direction = -slidePos[circle(to)] / width;
-
- // if going forward but to < index, use to = slides.length + to
- // if going backward but to > index, use to = -slides.length + to
- if (direction !== natural_direction) {
- to = -direction * slides.length + to;
- }
-
- }
-
- var diff = Math.abs(index - to) - 1;
-
- // move all the slides between index and to in the right direction
- while (diff--) {
- move(circle((to > index ? to : index) - diff - 1), width * direction, 0);
- }
-
- to = circle(to);
-
- move(index, width * direction, slideSpeed || speed);
- move(to, 0, slideSpeed || speed);
-
- if (options.continuous) { // we need to get the next in place
- move(circle(to - direction), -(width * direction), 0);
- }
-
- } else {
-
- to = circle(to);
- animate(index * -width, to * -width, slideSpeed || speed);
- // no fallback for a circular continuous if the browser does not accept transitions
- }
-
- index = to;
- offloadFn(function () {
- runCallback(getPos(), slides[index], direction);
- });
- }
-
- function move(index, dist, speed) {
- translate(index, dist, speed);
- slidePos[index] = dist;
- }
-
- function translate(index, dist, speed) {
-
- var slide = slides[index];
- var style = slide && slide.style;
-
- if (!style) return;
-
- style.webkitTransitionDuration =
- style.MozTransitionDuration =
- style.msTransitionDuration =
- style.OTransitionDuration =
- style.transitionDuration = speed + 'ms';
-
- style.webkitTransform =
- style.msTransform =
- style.MozTransform =
- style.OTransform =
- style.transform = 'translateX(' + dist + 'px)';
- }
-
- function animate(from, to, speed) {
-
- // if not an animation, just reposition
- if (!speed) {
- element.style[slideDir] = to + 'px';
- return;
- }
-
- var start = +new Date();
-
- var timer = setInterval(function () {
- var timeElap = +new Date() - start;
-
- if (timeElap > speed) {
-
- element.style[slideDir] = to + 'px';
-
- if (delay || options.autoRestart) restart();
-
- runTransitionEnd(getPos(), slides[index]);
-
- clearInterval(timer);
-
- return;
- }
-
- element.style[slideDir] = (((to - from) * (Math.floor((timeElap / speed) * 100) / 100)) + from) + 'px';
- }, 4);
-
- }
-
- function begin() {
- delay = options.auto || 0;
- if (delay) interval = setTimeout(next, delay);
- }
-
- function stop() {
- delay = 0;
- clearTimeout(interval);
- }
-
- function restart() {
- stop();
- begin();
- }
-
- function disable() {
- stop();
- disabled = true;
- }
-
- function enable() {
- disabled = false;
- restart();
- }
-
- function isMouseEvent(e) {
- return /^mouse/.test(e.type);
- }
-
- function kill() {
- // cancel slideshow
- stop();
-
- // remove inline styles
- container.style.visibility = '';
-
- // reset element
- element.style.width = '';
- element.style[slideDir] = '';
-
- // reset slides
- var pos = slides.length;
- while (pos--) {
-
- if (browser.transitions) {
- translate(pos, 0, 0);
- }
-
- var slide = slides[pos];
-
- // if the slide is tagged as clone, remove it
- if (slide.getAttribute('data-cloned')) {
- var _parent = slide.parentElement;
- _parent.removeChild(slide);
- }
-
- // remove styles
- slide.style.width = '';
- slide.style[slideDir] = '';
-
- slide.style.webkitTransitionDuration =
- slide.style.MozTransitionDuration =
- slide.style.msTransitionDuration =
- slide.style.OTransitionDuration =
- slide.style.transitionDuration = '';
-
- slide.style.webkitTransform =
- slide.style.msTransform =
- slide.style.MozTransform =
- slide.style.OTransform = '';
-
- // remove custom attributes (?)
- // slide.removeAttribute('data-index');
- }
-
- // remove all events
- detachEvents();
-
- // remove throttled function timeout
- throttledSetup.cancel();
- }
- }
-
- if (root.jQuery || root.Zepto) {
- (function ($) {
- $.fn.Swipe = function (params) {
- return this.each(function () {
- $(this).data('Swipe', new Swipe($(this)[0], params));
- });
- };
- })(root.jQuery || root.Zepto);
- }
-
- return Swipe;
-})); \ No newline at end of file
+!function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.Swipe=e(),t.Swipe}):"object"==typeof module&&module.exports?module.exports=e():t.Swipe=e()}(this,function(){var t,e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this,n=e.document;function i(t,i){"use strict";var o,s,r={},a={},u=(i=i||{}).auto||0,c=!1,l=function(){},v=function(t){setTimeout(t||l,0)},d=function(t){return!!t&&("boolean"!=typeof t.cancelable||t.cancelable)},f={addEventListener:!!e.addEventListener,passiveEvents:function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testEvent",null,n),e.removeEventListener("testEvent",null,n)}catch(e){t=!1}return t}(),touch:"ontouchstart"in e||e.DocumentTouch&&n instanceof DocumentTouch,transitions:function(t){var e=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var n in e)if(void 0!==t.style[e[n]])return!0;return!1}(n.createElement("swipe"))};if(t){var h,m,p,E,y=t.children[0],b=parseInt(i.startSlide,10)||0,g=i.speed||300;i.continuous=void 0===i.continuous||i.continuous;var T,x,L=((T=t).currentStyle?x=T.currentStyle.direction:e.getComputedStyle&&(x=e.getComputedStyle(T,null).getPropertyValue("direction")),"rtl"===x?"right":"left");i.autoRestart=void 0!==i.autoRestart&&i.autoRestart;var w=function(t,e){e=e||100;var n=null;function i(){n&&clearTimeout(n)}function o(){var o=this,s=arguments;i(),n=setTimeout(function(){n=null,t.apply(o,s)},e)}return o.cancel=i,o}(S),D={handleEvent:function(t){if(!c){switch(t.type){case"mousedown":case"touchstart":this.start(t);break;case"mousemove":case"touchmove":this.move(t);break;case"mouseup":case"mouseleave":case"touchend":this.end(t);break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":this.transitionEnd(t);break;case"resize":w()}i.stopPropagation&&t.stopPropagation()}},start:function(t){var e;W(t)?(e=t,t.preventDefault()):e=t.touches[0],r={x:e.pageX,y:e.pageY,time:+new Date},o=void 0,a={},W(t)?(y.addEventListener("mousemove",this,!1),y.addEventListener("mouseup",this,!1),y.addEventListener("mouseleave",this,!1)):(y.addEventListener("touchmove",this,!!f.passiveEvents&&{passive:!1}),y.addEventListener("touchend",this,!1)),function(t,e){i.dragStart&&i.dragStart(t,e)}(P(),h[b])},move:function(t){var e;if(W(t))e=t;else{if(t.touches.length>1||t.scale&&1!==t.scale)return;i.disableScroll&&d(t)&&t.preventDefault(),e=t.touches[0]}a={x:e.pageX-r.x,y:e.pageY-r.y},void 0===o&&(o=!!(o||Math.abs(a.x)<Math.abs(a.y))),o||(d(t)&&t.preventDefault(),X(),i.continuous?(I(O(b-1),a.x+m[O(b-1)],0),I(b,a.x+m[b],0),I(O(b+1),a.x+m[O(b+1)],0)):(a.x=a.x/(!b&&a.x>0||b===h.length-1&&a.x<0?Math.abs(a.x)/p+1:1),I(b-1,a.x+m[b-1],0),I(b,a.x+m[b],0),I(b+1,a.x+m[b+1],0)))},end:function(t){var e=+new Date-r.time,n=Number(e)<250&&Math.abs(a.x)>20||Math.abs(a.x)>p/2,s=!b&&a.x>0||b===h.length-1&&a.x<0;i.continuous&&(s=!1);var u=Math.abs(a.x)/a.x;o||(n&&!s?(u<0?(i.continuous?(C(O(b-1),-p,0),C(O(b+2),p,0)):C(b-1,-p,0),C(b,m[b]-p,g),C(O(b+1),m[O(b+1)]-p,g),b=O(b+1)):(i.continuous?(C(O(b+1),p,0),C(O(b-2),-p,0)):C(b+1,p,0),C(b,m[b]+p,g),C(O(b-1),m[O(b-1)]+p,g),b=O(b-1)),A(P(),h[b],u)):i.continuous?(C(O(b-1),-p,g),C(b,0,g),C(O(b+1),p,g)):(C(b-1,-p,g),C(b,0,g),C(b+1,p,g))),W(t)?(y.removeEventListener("mousemove",D,!1),y.removeEventListener("mouseup",D,!1),y.removeEventListener("mouseleave",D,!1)):(y.removeEventListener("touchmove",D,!!f.passiveEvents&&{passive:!1}),y.removeEventListener("touchend",D,!1)),function(t,e){i.dragEnd&&i.dragEnd(t,e)}(P(),h[b])},transitionEnd:function(t){parseInt(t.target.getAttribute("data-index"),10)===b&&((u||i.autoRestart)&&Q(),j(P(),h[b]))}};return S(),N(),{setup:S,slide:function(t,e){X(),R(t,e)},prev:function(){X(),function(){if(c)return;i.continuous?R(b-1):b&&R(b-1)}()},next:function(){X(),z()},restart:Q,stop:X,getPos:P,disable:function(){X(),c=!0},enable:function(){c=!1,Q()},getNumSlides:function(){return E},kill:function(){X(),t.style.visibility="",y.style.width="",y.style[L]="";var e=h.length;for(;e--;){f.transitions&&I(e,0,0);var n=h[e];if(n.getAttribute("data-cloned")){var i=n.parentElement;i.removeChild(n)}n.style.width="",n.style[L]="",n.style.webkitTransitionDuration=n.style.MozTransitionDuration=n.style.msTransitionDuration=n.style.OTransitionDuration=n.style.transitionDuration="",n.style.webkitTransform=n.style.msTransform=n.style.MozTransform=n.style.OTransform=""}k(),w.cancel()}}}function k(){f.addEventListener?(y.removeEventListener("touchstart",D,!!f.passiveEvents&&{passive:!0}),y.removeEventListener("mousedown",D,!1),y.removeEventListener("webkitTransitionEnd",D,!1),y.removeEventListener("msTransitionEnd",D,!1),y.removeEventListener("oTransitionEnd",D,!1),y.removeEventListener("otransitionend",D,!1),y.removeEventListener("transitionend",D,!1),e.removeEventListener("resize",D,!1)):e.onresize=null}function M(t){var e=t.cloneNode(!0);y.appendChild(e),e.setAttribute("data-cloned",!0),e.removeAttribute("id")}function S(n){if(null!=n)for(var o in n)i[o]=n[o];h=y.children,E=h.length;for(var s=0;s<h.length;s++)h[s].getAttribute("data-cloned")&&E--;if(h.length<2&&(i.continuous=!1),f.transitions&&i.continuous&&h.length<3&&(M(h[0]),M(h[1]),h=y.children),"right"===L)for(var r=0;r<h.length;r++)h[r].style.float="right";m=new Array(h.length),p=t.getBoundingClientRect().width||t.offsetWidth,y.style.width=h.length*p*2+"px";for(var a=h.length;a--;){var u=h[a];u.style.width=p+"px",u.setAttribute("data-index",a),f.transitions&&(u.style[L]=a*-p+"px",C(a,b>a?-p:b<a?p:0,0))}i.continuous&&f.transitions&&(C(O(b-1),-p,0),C(O(b+1),p,0)),f.transitions||(y.style[L]=b*-p+"px"),t.style.visibility="visible",k(),f.addEventListener?(f.touch&&y.addEventListener("touchstart",D,!!f.passiveEvents&&{passive:!0}),i.draggable&&y.addEventListener("mousedown",D,!1),f.transitions&&(y.addEventListener("webkitTransitionEnd",D,!1),y.addEventListener("msTransitionEnd",D,!1),y.addEventListener("oTransitionEnd",D,!1),y.addEventListener("otransitionend",D,!1),y.addEventListener("transitionend",D,!1)),e.addEventListener("resize",D,!1)):e.onresize=w}function z(){c||(i.continuous?R(b+1):b<h.length-1&&R(b+1))}function A(t,e,n){i.callback&&i.callback(t,e,n)}function j(t,e){i.transitionEnd&&i.transitionEnd(t,e)}function O(t){return(h.length+t%h.length)%h.length}function P(){var t=b;return t>=E&&(t-=E),t}function R(t,e){if(t="number"!=typeof t?parseInt(t,10):t,b!==t){if(f.transitions){var n=Math.abs(b-t)/(b-t);if(i.continuous){var o=n;(n=-m[O(t)]/p)!==o&&(t=-n*h.length+t)}for(var s=Math.abs(b-t)-1;s--;)C(O((t>b?t:b)-s-1),p*n,0);t=O(t),C(b,p*n,e||g),C(t,0,e||g),i.continuous&&C(O(t-n),-p*n,0)}else t=O(t),function(t,e,n){if(!n)return void(y.style[L]=e+"px");var o=+new Date,s=setInterval(function(){var r=+new Date-o;if(r>n)return y.style[L]=e+"px",(u||i.autoRestart)&&Q(),j(P(),h[b]),void clearInterval(s);y.style[L]=(e-t)*(Math.floor(r/n*100)/100)+t+"px"},4)}(b*-p,t*-p,e||g);b=t,v(function(){A(P(),h[b],n)})}}function C(t,e,n){I(t,e,n),m[t]=e}function I(t,e,n){var i=h[t],o=i&&i.style;o&&(o.webkitTransitionDuration=o.MozTransitionDuration=o.msTransitionDuration=o.OTransitionDuration=o.transitionDuration=n+"ms",o.webkitTransform=o.msTransform=o.MozTransform=o.OTransform=o.transform="translateX("+e+"px)")}function N(){(u=i.auto||0)&&(s=setTimeout(z,u))}function X(){u=0,clearTimeout(s)}function Q(){X(),N()}function W(t){return/^mouse/.test(t.type)}}return(e.jQuery||e.Zepto)&&((t=e.jQuery||e.Zepto).fn.Swipe=function(e){return this.each(function(){t(this).data("Swipe",new i(t(this)[0],e))})}),i}); \ No newline at end of file
diff --git a/assets/sass/base/_helpers.scss b/assets/sass/base/_helpers.scss
index 5fd6f69..010cec6 100644
--- a/assets/sass/base/_helpers.scss
+++ b/assets/sass/base/_helpers.scss
@@ -10,6 +10,11 @@
.hide {
display: none;
+ &-mobile {
+ @media only screen and (max-width: 769px) {
+ display: none;
+ }
+ }
}
.grow {
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
index b16a7d6..6728bda 100644
--- a/exampleSite/config/_default/params.toml
+++ b/exampleSite/config/_default/params.toml
@@ -21,6 +21,7 @@ minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide, typewriter
+hideHomeHeaderWhenMobile = false
# menu
showMobileMenuTerms = ["tags", "categories", "series"]
diff --git a/i18n/en.toml b/i18n/en.toml
index 2d795a1..3842736 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -98,4 +98,19 @@ other = "Pinned"
other = "This page looks best with JavaScript enabled"
[posts-by-order]
-other = "TOP POSTS" \ No newline at end of file
+other = "TOP POSTS"
+
+[skin-dark]
+other = "dark"
+
+[skin-light]
+other = "light"
+
+[skin-hacker]
+other = "hacker"
+
+[skin-solarized]
+other = "solarized"
+
+[skin-kimbie]
+other = "kimbie" \ No newline at end of file
diff --git a/i18n/eo.toml b/i18n/eo.toml
index 0a10785..ac80aae 100644
--- a/i18n/eo.toml
+++ b/i18n/eo.toml
@@ -99,3 +99,18 @@ other = "Por plibona vido the ĉi tiu paĝo, eble ŝaltu JavaSkripton"
[posts-by-order]
other = "PLEJ BONAJ AFIŜOJ"
+
+[skin-dark]
+other = "dark"
+
+[skin-light]
+other = "light"
+
+[skin-hacker]
+other = "hacker"
+
+[skin-solarized]
+other = "solarized"
+
+[skin-kimbie]
+other = "kimbie" \ No newline at end of file
diff --git a/i18n/fa.toml b/i18n/fa.toml
index b75aceb..206bbcd 100644
--- a/i18n/fa.toml
+++ b/i18n/fa.toml
@@ -99,3 +99,18 @@ other = "لطفا برای نمایش محتوا اجرای جاوا اسکری
[posts-by-order]
other = "پست های پربازدید"
+
+[skin-dark]
+other = "dark"
+
+[skin-light]
+other = "light"
+
+[skin-hacker]
+other = "hacker"
+
+[skin-solarized]
+other = "solarized"
+
+[skin-kimbie]
+other = "kimbie" \ No newline at end of file
diff --git a/i18n/fr.toml b/i18n/fr.toml
index cfd59b8..896d199 100644
--- a/i18n/fr.toml
+++ b/i18n/fr.toml
@@ -99,3 +99,18 @@ other = "Pour un rendu optimal, activez JavaScript"
[posts-by-order]
other = "MEILLEURES PUBLICATIONS"
+
+[skin-dark]
+other = "dark"
+
+[skin-light]
+other = "light"
+
+[skin-hacker]
+other = "hacker"
+
+[skin-solarized]
+other = "solarized"
+
+[skin-kimbie]
+other = "kimbie" \ No newline at end of file
diff --git a/i18n/ko.toml b/i18n/ko.toml
index d1d2866..8d2941c 100644
--- a/i18n/ko.toml
+++ b/i18n/ko.toml
@@ -98,4 +98,19 @@ other = "고정"
other = "자바스크립트를 활성화 해주세요"
[posts-by-order]
-other = "TOP POSTS" \ No newline at end of file
+other = "TOP POSTS"
+
+[skin-dark]
+other = "dark"
+
+[skin-light]
+other = "light"
+
+[skin-hacker]
+other = "hacker"
+
+[skin-solarized]
+other = "solarized"
+
+[skin-kimbie]
+other = "kimbie" \ No newline at end of file
diff --git a/i18n/zh.toml b/i18n/zh.toml
index 68e3656..b4c3ad3 100644
--- a/i18n/zh.toml
+++ b/i18n/zh.toml
@@ -98,4 +98,19 @@ other = "固定"
other = "Please enable Javascript to view the contents"
[posts-by-order]
-other = "TOP POSTS" \ No newline at end of file
+other = "TOP POSTS"
+
+[skin-dark]
+other = "dark"
+
+[skin-light]
+other = "light"
+
+[skin-hacker]
+other = "hacker"
+
+[skin-solarized]
+other = "solarized"
+
+[skin-kimbie]
+other = "kimbie" \ No newline at end of file
diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html
index 3b9556a..80ca22a 100644
--- a/layouts/partials/head/scripts.html
+++ b/layouts/partials/head/scripts.html
@@ -591,12 +591,15 @@
fuse = new Fuse(JSON.parse(xhr.response.toString('utf-8')), {
keys: sectionType.includes('publication') ? ['title', 'abstract'] : ['title', 'description', 'content'],
includeMatches: enableSearchHighlight,
- shouldSort: true,
- threshold: 0.4,
- location: 0,
- distance: 100,
+ shouldSort: true, // default: true
+ threshold: 0.4, // default: 0.6 (0.0 requires a perfect match)
+ location: 0, // default: 0
+ distance: 100, // default: 100
maxPatternLength: 32,
minMatchCharLength: 1,
+ isCaseSensitive: false, // defualt: false
+ findAllMatches: false, // default: false
+ useExtendedSearch: false, // default: false
});
window.fuse = fuse;
}
diff --git a/layouts/partials/header/site-header.html b/layouts/partials/header/site-header.html
index 67f352e..f42ff05 100644
--- a/layouts/partials/header/site-header.html
+++ b/layouts/partials/header/site-header.html
@@ -1,5 +1,5 @@
{{ if .IsHome }}
-<header class="header">
+<header class="header {{ if $.Param "hideHomeHeaderWhenMobile" }}hide-mobile{{ end }}">
{{ if and ($.Param "homeHeaderType") (eq ($.Param "homeHeaderType") "slide") }}
{{ partial "header/header-slide" . }}
{{ else if and ($.Param "homeHeaderType") (eq ($.Param "homeHeaderType") "img") }}
diff --git a/layouts/partials/navbar/select-theme.html b/layouts/partials/navbar/select-theme.html
index f41779d..472957c 100644
--- a/layouts/partials/navbar/select-theme.html
+++ b/layouts/partials/navbar/select-theme.html
@@ -8,7 +8,7 @@
{{ if .Site.Params.themeOptions }}
{{ range $index, $value := .Site.Params.themeOptions }}
<a href="#" class="dropdown-item select-theme__item {{ if (eq $index 0) }}is-active{{ end }}">
- {{ . }}
+ {{ i18n (print "skin-" .) | default . }}
</a>
{{ end }}
{{ end }}