diff --git a/_includes/footer.html b/_includes/footer.html index 36d4981..203e6c3 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -47,12 +47,11 @@ })(); - + diff --git a/_includes/head.html b/_includes/head.html index 9833cc9..88e1367 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -49,7 +49,7 @@ - + diff --git a/index.html b/index.html index 54371a1..d602a0e 100644 --- a/index.html +++ b/index.html @@ -126,7 +126,7 @@ clients:
- +

Design, but Open

@@ -158,7 +158,7 @@ clients:
{% for client in page.clients %} -
+
{% endfor %}
@@ -181,7 +181,7 @@ clients:
- author + author

{{testimonial.content}}

@@ -196,7 +196,7 @@ clients:
- author + author

{{testimonial.content}}

@@ -226,7 +226,7 @@ clients: {% for work in page.works_left %}
- +

{{work.title}}

{{work.categories}}

@@ -239,7 +239,7 @@ clients: {% for work in page.works_middle %}
- +

{{work.title}}

{{work.categories}}

@@ -252,7 +252,7 @@ clients: {% for work in page.works_right %}
- +

{{work.title}}

{{work.categories}}

diff --git a/js/lazyload.js b/js/lazyload.js deleted file mode 100644 index df1f7d3..0000000 --- a/js/lazyload.js +++ /dev/null @@ -1,173 +0,0 @@ -/*! - * Lazy Load - JavaScript plugin for lazy loading images - * - * Copyright (c) 2007-2017 Mika Tuupola - * - * Licensed under the MIT license: - * http://www.opensource.org/licenses/mit-license.php - * - * Project home: - * https://appelsiini.net/projects/lazyload - * - * Version: 2.0.0-beta.2 - * - */ - -(function (root, factory) { - if (typeof exports === "object") { - module.exports = factory(root); - } else if (typeof define === "function" && define.amd) { - define([], factory(root)); - } else { - root.LazyLoad = factory(root); - } -}) (typeof global !== "undefined" ? global : this.window || this.global, function (root) { - - "use strict"; - - const defaults = { - src: "data-src", - srcset: "data-srcset", - selector: ".lazyload" - }; - - /** - * Merge two or more objects. Returns a new object. - * @private - * @param {Boolean} deep If true, do a deep (or recursive) merge [optional] - * @param {Object} objects The objects to merge together - * @returns {Object} Merged values of defaults and options - */ - const extend = function () { - - let extended = {}; - let deep = false; - let i = 0; - let length = arguments.length; - - /* Check if a deep merge */ - if (Object.prototype.toString.call(arguments[0]) === "[object Boolean]") { - deep = arguments[0]; - i++; - } - - /* Merge the object into the extended object */ - let merge = function (obj) { - for (let prop in obj) { - if (Object.prototype.hasOwnProperty.call(obj, prop)) { - /* If deep merge and property is an object, merge properties */ - if (deep && Object.prototype.toString.call(obj[prop]) === "[object Object]") { - extended[prop] = extend(true, extended[prop], obj[prop]); - } else { - extended[prop] = obj[prop]; - } - } - } - }; - - /* Loop through each object and conduct a merge */ - for (; i < length; i++) { - let obj = arguments[i]; - merge(obj); - } - - return extended; - }; - - function LazyLoad(images, options) { - this.settings = extend(defaults, options || {}); - this.images = images || document.querySelectorAll(this.settings.selector); - this.observer = null; - this.init(); - } - - LazyLoad.prototype = { - init: function() { - - /* Without observers load everything and bail out early. */ - if (!root.IntersectionObserver) { - this.loadImages(); - return; - } - - let self = this; - let observerConfig = { - root: null, - rootMargin: "0px", - threshold: [0] - }; - - this.observer = new IntersectionObserver(function(entries) { - entries.forEach(function (entry) { - if (entry.intersectionRatio > 0) { - self.observer.unobserve(entry.target); - let src = entry.target.getAttribute(self.settings.src); - let srcset = entry.target.getAttribute(self.settings.srcset); - if ("img" === entry.target.tagName.toLowerCase()) { - if (src) { - entry.target.src = src; - } - if (srcset) { - entry.target.srcset = srcset; - } - } else { - entry.target.style.backgroundImage = "url(" + src + ")"; - } - } - }); - }, observerConfig); - - this.images.forEach(function (image) { - self.observer.observe(image); - }); - }, - - loadAndDestroy: function () { - if (!this.settings) { return; } - this.loadImages(); - this.destroy(); - }, - - loadImages: function () { - if (!this.settings) { return; } - - let self = this; - this.images.forEach(function (image) { - let src = image.getAttribute(self.settings.src); - let srcset = image.getAttribute(self.settings.srcset); - if ("img" === image.tagName.toLowerCase()) { - if (src) { - image.src = src; - } - if (srcset) { - image.srcset = srcset; - } - } else { - image.style.backgroundImage = "url(" + src + ")"; - } - }); - }, - - destroy: function () { - if (!this.settings) { return; } - this.observer.disconnect(); - this.settings = null; - } - }; - - root.lazyload = function(images, options) { - return new LazyLoad(images, options); - }; - - if (root.jQuery) { - const $ = root.jQuery; - $.fn.lazyload = function (options) { - options = options || {}; - options.attribute = options.attribute || "src"; - new LazyLoad($.makeArray(this), options); - return this; - }; - } - - return LazyLoad; -}); diff --git a/js/lazyload.min.js b/js/lazyload.min.js new file mode 100644 index 0000000..86fba10 --- /dev/null +++ b/js/lazyload.min.js @@ -0,0 +1,2 @@ +var _extends=Object.assign||function(t){for(var e=1;e-1&&(N(t,e),E(t,e.class_loading)),w(t,e),a(t),L(e.callback_set,t))}var n={elements_selector:"img",container:document,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,to_webp:!1},r=function(t){return _extends({},n,t)},o=function(t,e){return t.getAttribute("data-"+e)},s=function(t,e,n){var r="data-"+e;null!==n?t.setAttribute(r,n):t.removeAttribute(r)},a=function(t){return s(t,"was-processed","true")},i=function(t){return"true"===o(t,"was-processed")},c=function(t,e){return s(t,"ll-timeout",e)},l=function(t){return o(t,"ll-timeout")},u=function(t,e){var n,r=new t(e);try{n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:r}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:r})}window.dispatchEvent(n)},d=function(t,e){return e?t.replace(/\.(jpe?g|png)/gi,".webp"):t},f="undefined"!=typeof window,_=f&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),v=f&&"IntersectionObserver"in window,m=f&&"classList"in document.createElement("p"),h=f&&function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL("image/webp").indexOf("data:image/webp")}(),b=function(t,e,n,r){for(var s,a=0;s=t.children[a];a+=1)if("SOURCE"===s.tagName){var i=o(s,n);p(s,e,i,r)}},p=function(t,e,n,r){n&&t.setAttribute(e,d(n,r))},g=function(t,e){var n=h&&e.to_webp,r=o(t,e.data_src);if(r){var s=d(r,n);t.style.backgroundImage='url("'+s+'")'}},y={IMG:function(t,e){var n=h&&e.to_webp,r=e.data_srcset,s=t.parentNode;s&&"PICTURE"===s.tagName&&b(s,"srcset",r,n);var a=o(t,e.data_sizes);p(t,"sizes",a);var i=o(t,r);p(t,"srcset",i,n);var c=o(t,e.data_src);p(t,"src",c,n)},IFRAME:function(t,e){var n=o(t,e.data_src);p(t,"src",n)},VIDEO:function(t,e){var n=e.data_src,r=o(t,n);b(t,"src",n),p(t,"src",r),t.load()}},w=function(t,e){var n=t.tagName,r=y[n];r?r(t,e):g(t,e)},E=function(t,e){m?t.classList.add(e):t.className+=(t.className?" ":"")+e},I=function(t,e){m?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},L=function(t,e){t&&t(e)},O=function(t,e,n){t.addEventListener(e,n)},x=function(t,e,n){t.removeEventListener(e,n)},A=function(t,e,n){O(t,"load",e),O(t,"loadeddata",e),O(t,"error",n)},z=function(t,e,n){x(t,"load",e),x(t,"loadeddata",e),x(t,"error",n)},k=function(t,e,n){var r=e?n.class_loaded:n.class_error,o=e?n.callback_load:n.callback_error,s=t.target;I(s,n.class_loading),E(s,r),L(o,s)},N=function(t,e){var n=function n(o){k(o,!0,e),z(t,n,r)},r=function r(o){k(o,!1,e),z(t,n,r)};A(t,n,r)},C=["IMG","IFRAME","VIDEO"],R=function(t,n,r){e(t,r),n.unobserve(t)},S=function(t){var e=l(t);e&&(clearTimeout(e),c(t,null))},M=function(t,e,n){var r=n.load_delay,o=l(t);o||(o=setTimeout(function(){R(t,e,n),S(t)},r),c(t,o))},j=function(t){return t.isIntersecting||t.intersectionRatio>0},D=function(t){return{root:t.container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}},T=function(t,e){this._settings=r(t),this._setObserver(),this.update(e)};return T.prototype={_manageIntersection:function(t){var e=this._observer,n=this._settings,r=this._settings.load_delay,o=t.target;j(t)&&(r?M(o,e,n):R(o,e,n)),j(t)||S(o)},_onIntersection:function(e){e.forEach(this._manageIntersection.bind(this)),this._elements=t(this._elements)},_setObserver:function(){v&&(this._observer=new IntersectionObserver(this._onIntersection.bind(this),D(this._settings)))},loadAll:function(){var e=this;this._elements.forEach(function(t){e.load(t)}),this._elements=t(this._elements)},update:function(e){var n=this,r=this._settings,o=e||r.container.querySelectorAll(r.elements_selector);this._elements=t(Array.prototype.slice.call(o)),!_&&this._observer?this._elements.forEach(function(t){n._observer.observe(t)}):this.loadAll()},destroy:function(){var e=this;this._observer&&(t(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,n){e(t,this._settings,n)}},f&&function(t,e){if(e)if(e.length)for(var n,r=0;n=e[r];r+=1)u(t,n);else u(t,e)}(T,window.lazyLoadOptions),T}); +//# sourceMappingURL=lazyload.min.js.map