From c629584a1a1b6ba803ba0a2835c01c051c9dc107 Mon Sep 17 00:00:00 2001 From: Anxhelo Lushka Date: Sun, 14 Oct 2018 12:26:18 +0200 Subject: [PATCH] some more fixes --- _layouts/default-post.html | 2 +- _layouts/default.html | 2 +- .../01/03/Hello-open-source-design-world.html | 2 +- ...ject-has-a-logo-guess-who-designed-it.html | 2 +- ...workshop-open-labs-hackerspace-tirana.html | 2 +- _site/2017/08/25/ura-sha-2017.html | 2 +- .../01/09/ura-work-week-november-2017.html | 2 +- .../15/chaos-communication-congress-2017.html | 2 +- _site/2018/02/09/ura-fosdem-2018.html | 2 +- .../2018/02/23/inkscape-workshop-tirana.html | 2 +- ...ow-part-open-tech-funds-usability-lab.html | 2 +- _site/2018/03/19/new-ura-website.html | 2 +- ...ucing-cryptopayments-for-our-services.html | 2 +- _site/2018/05/31/oscal-18-we-were-there.html | 2 +- .../06/13/reproducible-builds-styleguide.html | 2 +- ...ming-renata-uras-usability-researcher.html | 2 +- .../02/style-guides-go-beyond-aesthetics.html | 2 +- _site/2018/07/05/thunderbird-style-guide.html | 2 +- _site/404.html | 2 +- _site/about.html | 2 +- _site/blog/index.html | 2 +- _site/blog/page2/index.html | 2 +- _site/blog/page3/index.html | 2 +- _site/contact.html | 2 +- _site/events/fosdem-2017.html | 2 +- _site/events/fosdem-2018.html | 2 +- _site/events/index.html | 2 +- _site/events/oscal-2017.html | 2 +- _site/events/oscal-2018.html | 2 +- _site/events/osd-workshop-1-in-tirana.html | 2 +- _site/events/osd-workshop-2-tirana.html | 2 +- _site/events/osd-workshop-3-tirana.html | 2 +- _site/feed.xml | 4 +- _site/index.html | 2 +- _site/jobs/frontend.html | 2 +- _site/jobs/full-stack.html | 2 +- _site/jobs/index.html | 2 +- _site/js/lazyload.js | 301 ------------------ _site/js/svg.js | 2 +- _site/logobridge.html | 2 +- _site/portfolio-item-2.html | 2 +- _site/privacy-policy.html | 2 +- _site/projects/enigmail.html | 2 +- _site/projects/index.html | 2 +- _site/projects/libocon.html | 2 +- _site/projects/mozilla-l10n.html | 2 +- _site/projects/openchain.html | 2 +- _site/projects/openlabs.html | 2 +- _site/projects/reproducible-builds.html | 2 +- _site/projects/sfk16.html | 2 +- _site/projects/thunderbird.html | 2 +- _site/projects/tor-style-guide.html | 2 +- _site/request.html | 2 +- _site/services.html | 2 +- _site/support-us.html | 2 +- _site/tags/index.html | 2 +- js/lazyload.js | 301 ------------------ js/svg.js | 2 +- 58 files changed, 57 insertions(+), 659 deletions(-) delete mode 100644 _site/js/lazyload.js delete mode 100644 js/lazyload.js diff --git a/_layouts/default-post.html b/_layouts/default-post.html index 99777c8..6976056 100644 --- a/_layouts/default-post.html +++ b/_layouts/default-post.html @@ -1,5 +1,5 @@ - + {% include head.html %} diff --git a/_layouts/default.html b/_layouts/default.html index 5cf0bc1..a6e2957 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,5 +1,5 @@ - + {% include head.html %} diff --git a/_site/2017/01/03/Hello-open-source-design-world.html b/_site/2017/01/03/Hello-open-source-design-world.html index 5ec21a8..0565717 100644 --- a/_site/2017/01/03/Hello-open-source-design-world.html +++ b/_site/2017/01/03/Hello-open-source-design-world.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2017/01/24/wikispeech-wikimedia-project-has-a-logo-guess-who-designed-it.html b/_site/2017/01/24/wikispeech-wikimedia-project-has-a-logo-guess-who-designed-it.html index 78cf564..e0affa1 100644 --- a/_site/2017/01/24/wikispeech-wikimedia-project-has-a-logo-guess-who-designed-it.html +++ b/_site/2017/01/24/wikispeech-wikimedia-project-has-a-logo-guess-who-designed-it.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2017/02/11/open-source-design-workshop-open-labs-hackerspace-tirana.html b/_site/2017/02/11/open-source-design-workshop-open-labs-hackerspace-tirana.html index 55c4692..305b918 100644 --- a/_site/2017/02/11/open-source-design-workshop-open-labs-hackerspace-tirana.html +++ b/_site/2017/02/11/open-source-design-workshop-open-labs-hackerspace-tirana.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2017/08/25/ura-sha-2017.html b/_site/2017/08/25/ura-sha-2017.html index aa47c9e..bb88e4e 100644 --- a/_site/2017/08/25/ura-sha-2017.html +++ b/_site/2017/08/25/ura-sha-2017.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/01/09/ura-work-week-november-2017.html b/_site/2018/01/09/ura-work-week-november-2017.html index 3404787..793c079 100644 --- a/_site/2018/01/09/ura-work-week-november-2017.html +++ b/_site/2018/01/09/ura-work-week-november-2017.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/01/15/chaos-communication-congress-2017.html b/_site/2018/01/15/chaos-communication-congress-2017.html index e7ad340..65aa701 100644 --- a/_site/2018/01/15/chaos-communication-congress-2017.html +++ b/_site/2018/01/15/chaos-communication-congress-2017.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/02/09/ura-fosdem-2018.html b/_site/2018/02/09/ura-fosdem-2018.html index 72d9940..9250cff 100644 --- a/_site/2018/02/09/ura-fosdem-2018.html +++ b/_site/2018/02/09/ura-fosdem-2018.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/02/23/inkscape-workshop-tirana.html b/_site/2018/02/23/inkscape-workshop-tirana.html index 9c1ba3a..7c13d09 100644 --- a/_site/2018/02/23/inkscape-workshop-tirana.html +++ b/_site/2018/02/23/inkscape-workshop-tirana.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/03/12/ura-now-part-open-tech-funds-usability-lab.html b/_site/2018/03/12/ura-now-part-open-tech-funds-usability-lab.html index 75baa07..06f7437 100644 --- a/_site/2018/03/12/ura-now-part-open-tech-funds-usability-lab.html +++ b/_site/2018/03/12/ura-now-part-open-tech-funds-usability-lab.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/03/19/new-ura-website.html b/_site/2018/03/19/new-ura-website.html index 9a05fb1..bd87240 100644 --- a/_site/2018/03/19/new-ura-website.html +++ b/_site/2018/03/19/new-ura-website.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/03/31/introducing-cryptopayments-for-our-services.html b/_site/2018/03/31/introducing-cryptopayments-for-our-services.html index 766c450..5def0ba 100644 --- a/_site/2018/03/31/introducing-cryptopayments-for-our-services.html +++ b/_site/2018/03/31/introducing-cryptopayments-for-our-services.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/05/31/oscal-18-we-were-there.html b/_site/2018/05/31/oscal-18-we-were-there.html index 07d6aed..d328706 100644 --- a/_site/2018/05/31/oscal-18-we-were-there.html +++ b/_site/2018/05/31/oscal-18-we-were-there.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/06/13/reproducible-builds-styleguide.html b/_site/2018/06/13/reproducible-builds-styleguide.html index a5cdd66..c18b2ec 100644 --- a/_site/2018/06/13/reproducible-builds-styleguide.html +++ b/_site/2018/06/13/reproducible-builds-styleguide.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/06/17/welcoming-renata-uras-usability-researcher.html b/_site/2018/06/17/welcoming-renata-uras-usability-researcher.html index 1e3a4a3..d92dd42 100644 --- a/_site/2018/06/17/welcoming-renata-uras-usability-researcher.html +++ b/_site/2018/06/17/welcoming-renata-uras-usability-researcher.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/07/02/style-guides-go-beyond-aesthetics.html b/_site/2018/07/02/style-guides-go-beyond-aesthetics.html index 4db15af..1cf039e 100644 --- a/_site/2018/07/02/style-guides-go-beyond-aesthetics.html +++ b/_site/2018/07/02/style-guides-go-beyond-aesthetics.html @@ -1,5 +1,5 @@ - + diff --git a/_site/2018/07/05/thunderbird-style-guide.html b/_site/2018/07/05/thunderbird-style-guide.html index e8d34a0..f48ce67 100644 --- a/_site/2018/07/05/thunderbird-style-guide.html +++ b/_site/2018/07/05/thunderbird-style-guide.html @@ -1,5 +1,5 @@ - + diff --git a/_site/404.html b/_site/404.html index ceef973..8fdfc5c 100644 --- a/_site/404.html +++ b/_site/404.html @@ -1,5 +1,5 @@ - + diff --git a/_site/about.html b/_site/about.html index 3babbd0..a3b1fc2 100644 --- a/_site/about.html +++ b/_site/about.html @@ -1,5 +1,5 @@ - + diff --git a/_site/blog/index.html b/_site/blog/index.html index c43856f..6c96e7f 100644 --- a/_site/blog/index.html +++ b/_site/blog/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/blog/page2/index.html b/_site/blog/page2/index.html index f1b7c54..3bd6d62 100644 --- a/_site/blog/page2/index.html +++ b/_site/blog/page2/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/blog/page3/index.html b/_site/blog/page3/index.html index 2d16a88..6fae6b5 100644 --- a/_site/blog/page3/index.html +++ b/_site/blog/page3/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/contact.html b/_site/contact.html index b5957ea..781934a 100644 --- a/_site/contact.html +++ b/_site/contact.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/fosdem-2017.html b/_site/events/fosdem-2017.html index 891f96c..9eadab3 100644 --- a/_site/events/fosdem-2017.html +++ b/_site/events/fosdem-2017.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/fosdem-2018.html b/_site/events/fosdem-2018.html index 760f91e..e072336 100644 --- a/_site/events/fosdem-2018.html +++ b/_site/events/fosdem-2018.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/index.html b/_site/events/index.html index 6cad3a2..0e15b21 100644 --- a/_site/events/index.html +++ b/_site/events/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/oscal-2017.html b/_site/events/oscal-2017.html index 65f8b3e..2e9f27f 100644 --- a/_site/events/oscal-2017.html +++ b/_site/events/oscal-2017.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/oscal-2018.html b/_site/events/oscal-2018.html index db2af36..5808dd0 100644 --- a/_site/events/oscal-2018.html +++ b/_site/events/oscal-2018.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/osd-workshop-1-in-tirana.html b/_site/events/osd-workshop-1-in-tirana.html index 02732f3..fcf423f 100644 --- a/_site/events/osd-workshop-1-in-tirana.html +++ b/_site/events/osd-workshop-1-in-tirana.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/osd-workshop-2-tirana.html b/_site/events/osd-workshop-2-tirana.html index f87f6fd..f8960af 100644 --- a/_site/events/osd-workshop-2-tirana.html +++ b/_site/events/osd-workshop-2-tirana.html @@ -1,5 +1,5 @@ - + diff --git a/_site/events/osd-workshop-3-tirana.html b/_site/events/osd-workshop-3-tirana.html index 71a95c8..6dc75ce 100644 --- a/_site/events/osd-workshop-3-tirana.html +++ b/_site/events/osd-workshop-3-tirana.html @@ -1,5 +1,5 @@ - + diff --git a/_site/feed.xml b/_site/feed.xml index 6e31f5e..dbd4cb8 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -6,8 +6,8 @@ http://localhost:4000/ - Sun, 14 Oct 2018 12:14:13 +0200 - Sun, 14 Oct 2018 12:14:13 +0200 + Sun, 14 Oct 2018 12:25:59 +0200 + Sun, 14 Oct 2018 12:25:59 +0200 Jekyll v3.8.4 diff --git a/_site/index.html b/_site/index.html index eacb97a..2668de4 100644 --- a/_site/index.html +++ b/_site/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/jobs/frontend.html b/_site/jobs/frontend.html index 020e65a..ce822f7 100644 --- a/_site/jobs/frontend.html +++ b/_site/jobs/frontend.html @@ -1,5 +1,5 @@ - + diff --git a/_site/jobs/full-stack.html b/_site/jobs/full-stack.html index 9ebc059..43a69b8 100644 --- a/_site/jobs/full-stack.html +++ b/_site/jobs/full-stack.html @@ -1,5 +1,5 @@ - + diff --git a/_site/jobs/index.html b/_site/jobs/index.html index 54a88ad..3b127fb 100644 --- a/_site/jobs/index.html +++ b/_site/jobs/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/js/lazyload.js b/_site/js/lazyload.js deleted file mode 100644 index bdf9180..0000000 --- a/_site/js/lazyload.js +++ /dev/null @@ -1,301 +0,0 @@ -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -(function (global, factory) { - (typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.LazyLoad = factory(); -})(this, function () { - 'use strict'; - - var getInstanceSettings = function getInstanceSettings(customSettings) { - var defaultSettings = { - elements_selector: "img", - container: document, - threshold: 300, - data_src: "src", - data_srcset: "srcset", - data_sizes: "sizes", - class_loading: "loading", - class_loaded: "loaded", - class_error: "error", - callback_load: null, - callback_error: null, - callback_set: null, - callback_enter: null - }; - - return _extends({}, defaultSettings, customSettings); - }; - - var dataPrefix = "data-"; - var processedDataName = "was-processed"; - var processedDataValue = "true"; - - var getData = function getData(element, attribute) { - return element.getAttribute(dataPrefix + attribute); - }; - - var setData = function setData(element, attribute, value) { - return element.setAttribute(dataPrefix + attribute, value); - }; - - var setWasProcessed = function setWasProcessed(element) { - return setData(element, processedDataName, processedDataValue); - }; - - var getWasProcessed = function getWasProcessed(element) { - return getData(element, processedDataName) === processedDataValue; - }; - - function purgeElements(elements) { - return elements.filter(function (element) { - return !getWasProcessed(element); - }); - } - - /* Creates instance and notifies it through the window element */ - var createInstance = function createInstance(classObj, options) { - var event; - var eventString = "LazyLoad::Initialized"; - var instance = new classObj(options); - try { - // Works in modern browsers - event = new CustomEvent(eventString, { detail: { instance: instance } }); - } catch (err) { - // Works in Internet Explorer (all versions) - event = document.createEvent("CustomEvent"); - event.initCustomEvent(eventString, false, false, { instance: instance }); - } - window.dispatchEvent(event); - }; - - /* Auto initialization of one or more instances of lazyload, depending on the - options passed in (plain object or an array) */ - function autoInitialize(classObj, options) { - if (!options.length) { - // Plain object - createInstance(classObj, options); - } else { - // Array of objects - for (var i = 0, optionsItem; optionsItem = options[i]; i += 1) { - createInstance(classObj, optionsItem); - } - } - } - - var setSourcesInChildren = function setSourcesInChildren(parentTag, attrName, dataAttrName) { - for (var i = 0, childTag; childTag = parentTag.children[i]; i += 1) { - if (childTag.tagName === "SOURCE") { - var attributeValue = getData(childTag, dataAttrName); - if (attributeValue) { - childTag.setAttribute(attrName, attributeValue); - } - } - } - }; - - var setAttributeIfNotNullOrEmpty = function setAttributeIfNotNullOrEmpty(element, attrName, value) { - if (!value) { - return; - } - element.setAttribute(attrName, value); - }; - - var setSources = function setSources(element, settings) { - var sizesDataName = settings.data_sizes, - srcsetDataName = settings.data_srcset, - srcDataName = settings.data_src; - - var srcDataValue = getData(element, srcDataName); - switch (element.tagName) { - case "IMG": - { - var parent = element.parentNode; - if (parent && parent.tagName === "PICTURE") { - setSourcesInChildren(parent, "srcset", srcsetDataName); - } - var sizesDataValue = getData(element, sizesDataName); - setAttributeIfNotNullOrEmpty(element, "sizes", sizesDataValue); - var srcsetDataValue = getData(element, srcsetDataName); - setAttributeIfNotNullOrEmpty(element, "srcset", srcsetDataValue); - setAttributeIfNotNullOrEmpty(element, "src", srcDataValue); - break; - } - case "IFRAME": - setAttributeIfNotNullOrEmpty(element, "src", srcDataValue); - break; - case "VIDEO": - setSourcesInChildren(element, "src", srcDataName); - setAttributeIfNotNullOrEmpty(element, "src", srcDataValue); - break; - default: - if (srcDataValue) { - element.style.backgroundImage = 'url("' + srcDataValue + '")'; - } - } - }; - - var isBot = "onscroll" in window && !/glebot/.test(navigator.userAgent); - - var runningOnBrowser = typeof window !== "undefined"; - - var supportsIntersectionObserver = runningOnBrowser && "IntersectionObserver" in window; - - var supportsClassList = runningOnBrowser && "classList" in document.createElement("p"); - - var addClass = function addClass(element, className) { - if (supportsClassList) { - element.classList.add(className); - return; - } - element.className += (element.className ? " " : "") + className; - }; - - var removeClass = function removeClass(element, className) { - if (supportsClassList) { - element.classList.remove(className); - return; - } - element.className = element.className.replace(new RegExp("(^|\\s+)" + className + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, ""); - }; - - var callCallback = function callCallback(callback, argument) { - if (callback) { - callback(argument); - } - }; - - var loadString = "load"; - var errorString = "error"; - - var removeListeners = function removeListeners(element, loadHandler, errorHandler) { - element.removeEventListener(loadString, loadHandler); - element.removeEventListener(errorString, errorHandler); - }; - - var addOneShotListeners = function addOneShotListeners(element, settings) { - var onLoad = function onLoad(event) { - onEvent(event, true, settings); - removeListeners(element, onLoad, onError); - }; - var onError = function onError(event) { - onEvent(event, false, settings); - removeListeners(element, onLoad, onError); - }; - element.addEventListener(loadString, onLoad); - element.addEventListener(errorString, onError); - }; - - var onEvent = function onEvent(event, success, settings) { - var element = event.target; - removeClass(element, settings.class_loading); - addClass(element, success ? settings.class_loaded : settings.class_error); // Setting loaded or error class - callCallback(success ? settings.callback_load : settings.callback_error, element); - }; - - function revealElement(element, settings, force) { - if (!force && getWasProcessed(element)) { - return; // element has already been processed and force wasn't true - } - callCallback(settings.callback_enter, element); - if (["IMG", "IFRAME", "VIDEO"].indexOf(element.tagName) > -1) { - addOneShotListeners(element, settings); - addClass(element, settings.class_loading); - } - setSources(element, settings); - setWasProcessed(element); - callCallback(settings.callback_set, element); - } - - /* entry.isIntersecting needs fallback because is null on some versions of MS Edge, and - entry.intersectionRatio is not enough alone because it could be 0 on some intersecting elements */ - var isIntersecting = function isIntersecting(element) { - return element.isIntersecting || element.intersectionRatio > 0; - }; - - var getObserverSettings = function getObserverSettings(settings) { - return { - root: settings.container === document ? null : settings.container, - rootMargin: settings.threshold + "px" - }; - }; - - var LazyLoad = function LazyLoad(customSettings, elements) { - this._settings = getInstanceSettings(customSettings); - this._setObserver(); - this.update(elements); - }; - - LazyLoad.prototype = { - _setObserver: function _setObserver() { - var _this = this; - - if (!supportsIntersectionObserver) { - return; - } - var revealIntersectingElements = function revealIntersectingElements(entries) { - entries.forEach(function (entry) { - if (isIntersecting(entry)) { - var element = entry.target; - _this.load(element); - _this._observer.unobserve(element); - } - }); - _this._elements = purgeElements(_this._elements); - }; - this._observer = new IntersectionObserver(revealIntersectingElements, getObserverSettings(this._settings)); - }, - - loadAll: function loadAll() { - var _this2 = this; - - this._elements.forEach(function (element) { - _this2.load(element); - }); - this._elements = purgeElements(this._elements); - }, - - update: function update(elements) { - var _this3 = this; - - var settings = this._settings; - var nodeSet = elements || settings.container.querySelectorAll(settings.elements_selector); - - this._elements = purgeElements(Array.prototype.slice.call(nodeSet)); // nodeset to array for IE compatibility - - if (isBot || !this._observer) { - this.loadAll(); - return; - } - - this._elements.forEach(function (element) { - _this3._observer.observe(element); - }); - }, - - destroy: function destroy() { - var _this4 = this; - - if (this._observer) { - purgeElements(this._elements).forEach(function (element) { - _this4._observer.unobserve(element); - }); - this._observer = null; - } - this._elements = null; - this._settings = null; - }, - - load: function load(element, force) { - revealElement(element, this._settings, force); - } - }; - - /* Automatic instances creation if required (useful for async script loading!) */ - var autoInitOptions = window.lazyLoadOptions; - if (runningOnBrowser && autoInitOptions) { - autoInitialize(LazyLoad, autoInitOptions); - } - - return LazyLoad; -}); \ No newline at end of file diff --git a/_site/js/svg.js b/_site/js/svg.js index b141853..0f985be 100644 --- a/_site/js/svg.js +++ b/_site/js/svg.js @@ -33,4 +33,4 @@ jQuery('img.svg').each(function(){ }, 'xml'); -}); +}); \ No newline at end of file diff --git a/_site/logobridge.html b/_site/logobridge.html index 03bf393..94434df 100644 --- a/_site/logobridge.html +++ b/_site/logobridge.html @@ -1,5 +1,5 @@ - + diff --git a/_site/portfolio-item-2.html b/_site/portfolio-item-2.html index 7fe0cbc..79e442e 100644 --- a/_site/portfolio-item-2.html +++ b/_site/portfolio-item-2.html @@ -1,5 +1,5 @@ - + diff --git a/_site/privacy-policy.html b/_site/privacy-policy.html index 9fb3c60..f730799 100644 --- a/_site/privacy-policy.html +++ b/_site/privacy-policy.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/enigmail.html b/_site/projects/enigmail.html index cac46a2..734fc17 100644 --- a/_site/projects/enigmail.html +++ b/_site/projects/enigmail.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/index.html b/_site/projects/index.html index 893bef1..3dd07f2 100644 --- a/_site/projects/index.html +++ b/_site/projects/index.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/libocon.html b/_site/projects/libocon.html index 5b40754..ba13bdd 100644 --- a/_site/projects/libocon.html +++ b/_site/projects/libocon.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/mozilla-l10n.html b/_site/projects/mozilla-l10n.html index c6b3102..a076933 100644 --- a/_site/projects/mozilla-l10n.html +++ b/_site/projects/mozilla-l10n.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/openchain.html b/_site/projects/openchain.html index a9d96e3..a456dcb 100644 --- a/_site/projects/openchain.html +++ b/_site/projects/openchain.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/openlabs.html b/_site/projects/openlabs.html index d8945e6..d954ce5 100644 --- a/_site/projects/openlabs.html +++ b/_site/projects/openlabs.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/reproducible-builds.html b/_site/projects/reproducible-builds.html index f213e07..02b8666 100644 --- a/_site/projects/reproducible-builds.html +++ b/_site/projects/reproducible-builds.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/sfk16.html b/_site/projects/sfk16.html index 13b6fa4..ee54bf0 100644 --- a/_site/projects/sfk16.html +++ b/_site/projects/sfk16.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/thunderbird.html b/_site/projects/thunderbird.html index ace24d2..a0f03dd 100644 --- a/_site/projects/thunderbird.html +++ b/_site/projects/thunderbird.html @@ -1,5 +1,5 @@ - + diff --git a/_site/projects/tor-style-guide.html b/_site/projects/tor-style-guide.html index b76eee7..157c321 100644 --- a/_site/projects/tor-style-guide.html +++ b/_site/projects/tor-style-guide.html @@ -1,5 +1,5 @@ - + diff --git a/_site/request.html b/_site/request.html index b6bead4..a297494 100644 --- a/_site/request.html +++ b/_site/request.html @@ -1,5 +1,5 @@ - + diff --git a/_site/services.html b/_site/services.html index d35a172..4ed9d79 100644 --- a/_site/services.html +++ b/_site/services.html @@ -1,5 +1,5 @@ - + diff --git a/_site/support-us.html b/_site/support-us.html index 053f520..4201aa8 100644 --- a/_site/support-us.html +++ b/_site/support-us.html @@ -1,5 +1,5 @@ - + diff --git a/_site/tags/index.html b/_site/tags/index.html index 445b58d..bedaa4e 100644 --- a/_site/tags/index.html +++ b/_site/tags/index.html @@ -1,5 +1,5 @@ - + diff --git a/js/lazyload.js b/js/lazyload.js deleted file mode 100644 index bdf9180..0000000 --- a/js/lazyload.js +++ /dev/null @@ -1,301 +0,0 @@ -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -(function (global, factory) { - (typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.LazyLoad = factory(); -})(this, function () { - 'use strict'; - - var getInstanceSettings = function getInstanceSettings(customSettings) { - var defaultSettings = { - elements_selector: "img", - container: document, - threshold: 300, - data_src: "src", - data_srcset: "srcset", - data_sizes: "sizes", - class_loading: "loading", - class_loaded: "loaded", - class_error: "error", - callback_load: null, - callback_error: null, - callback_set: null, - callback_enter: null - }; - - return _extends({}, defaultSettings, customSettings); - }; - - var dataPrefix = "data-"; - var processedDataName = "was-processed"; - var processedDataValue = "true"; - - var getData = function getData(element, attribute) { - return element.getAttribute(dataPrefix + attribute); - }; - - var setData = function setData(element, attribute, value) { - return element.setAttribute(dataPrefix + attribute, value); - }; - - var setWasProcessed = function setWasProcessed(element) { - return setData(element, processedDataName, processedDataValue); - }; - - var getWasProcessed = function getWasProcessed(element) { - return getData(element, processedDataName) === processedDataValue; - }; - - function purgeElements(elements) { - return elements.filter(function (element) { - return !getWasProcessed(element); - }); - } - - /* Creates instance and notifies it through the window element */ - var createInstance = function createInstance(classObj, options) { - var event; - var eventString = "LazyLoad::Initialized"; - var instance = new classObj(options); - try { - // Works in modern browsers - event = new CustomEvent(eventString, { detail: { instance: instance } }); - } catch (err) { - // Works in Internet Explorer (all versions) - event = document.createEvent("CustomEvent"); - event.initCustomEvent(eventString, false, false, { instance: instance }); - } - window.dispatchEvent(event); - }; - - /* Auto initialization of one or more instances of lazyload, depending on the - options passed in (plain object or an array) */ - function autoInitialize(classObj, options) { - if (!options.length) { - // Plain object - createInstance(classObj, options); - } else { - // Array of objects - for (var i = 0, optionsItem; optionsItem = options[i]; i += 1) { - createInstance(classObj, optionsItem); - } - } - } - - var setSourcesInChildren = function setSourcesInChildren(parentTag, attrName, dataAttrName) { - for (var i = 0, childTag; childTag = parentTag.children[i]; i += 1) { - if (childTag.tagName === "SOURCE") { - var attributeValue = getData(childTag, dataAttrName); - if (attributeValue) { - childTag.setAttribute(attrName, attributeValue); - } - } - } - }; - - var setAttributeIfNotNullOrEmpty = function setAttributeIfNotNullOrEmpty(element, attrName, value) { - if (!value) { - return; - } - element.setAttribute(attrName, value); - }; - - var setSources = function setSources(element, settings) { - var sizesDataName = settings.data_sizes, - srcsetDataName = settings.data_srcset, - srcDataName = settings.data_src; - - var srcDataValue = getData(element, srcDataName); - switch (element.tagName) { - case "IMG": - { - var parent = element.parentNode; - if (parent && parent.tagName === "PICTURE") { - setSourcesInChildren(parent, "srcset", srcsetDataName); - } - var sizesDataValue = getData(element, sizesDataName); - setAttributeIfNotNullOrEmpty(element, "sizes", sizesDataValue); - var srcsetDataValue = getData(element, srcsetDataName); - setAttributeIfNotNullOrEmpty(element, "srcset", srcsetDataValue); - setAttributeIfNotNullOrEmpty(element, "src", srcDataValue); - break; - } - case "IFRAME": - setAttributeIfNotNullOrEmpty(element, "src", srcDataValue); - break; - case "VIDEO": - setSourcesInChildren(element, "src", srcDataName); - setAttributeIfNotNullOrEmpty(element, "src", srcDataValue); - break; - default: - if (srcDataValue) { - element.style.backgroundImage = 'url("' + srcDataValue + '")'; - } - } - }; - - var isBot = "onscroll" in window && !/glebot/.test(navigator.userAgent); - - var runningOnBrowser = typeof window !== "undefined"; - - var supportsIntersectionObserver = runningOnBrowser && "IntersectionObserver" in window; - - var supportsClassList = runningOnBrowser && "classList" in document.createElement("p"); - - var addClass = function addClass(element, className) { - if (supportsClassList) { - element.classList.add(className); - return; - } - element.className += (element.className ? " " : "") + className; - }; - - var removeClass = function removeClass(element, className) { - if (supportsClassList) { - element.classList.remove(className); - return; - } - element.className = element.className.replace(new RegExp("(^|\\s+)" + className + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, ""); - }; - - var callCallback = function callCallback(callback, argument) { - if (callback) { - callback(argument); - } - }; - - var loadString = "load"; - var errorString = "error"; - - var removeListeners = function removeListeners(element, loadHandler, errorHandler) { - element.removeEventListener(loadString, loadHandler); - element.removeEventListener(errorString, errorHandler); - }; - - var addOneShotListeners = function addOneShotListeners(element, settings) { - var onLoad = function onLoad(event) { - onEvent(event, true, settings); - removeListeners(element, onLoad, onError); - }; - var onError = function onError(event) { - onEvent(event, false, settings); - removeListeners(element, onLoad, onError); - }; - element.addEventListener(loadString, onLoad); - element.addEventListener(errorString, onError); - }; - - var onEvent = function onEvent(event, success, settings) { - var element = event.target; - removeClass(element, settings.class_loading); - addClass(element, success ? settings.class_loaded : settings.class_error); // Setting loaded or error class - callCallback(success ? settings.callback_load : settings.callback_error, element); - }; - - function revealElement(element, settings, force) { - if (!force && getWasProcessed(element)) { - return; // element has already been processed and force wasn't true - } - callCallback(settings.callback_enter, element); - if (["IMG", "IFRAME", "VIDEO"].indexOf(element.tagName) > -1) { - addOneShotListeners(element, settings); - addClass(element, settings.class_loading); - } - setSources(element, settings); - setWasProcessed(element); - callCallback(settings.callback_set, element); - } - - /* entry.isIntersecting needs fallback because is null on some versions of MS Edge, and - entry.intersectionRatio is not enough alone because it could be 0 on some intersecting elements */ - var isIntersecting = function isIntersecting(element) { - return element.isIntersecting || element.intersectionRatio > 0; - }; - - var getObserverSettings = function getObserverSettings(settings) { - return { - root: settings.container === document ? null : settings.container, - rootMargin: settings.threshold + "px" - }; - }; - - var LazyLoad = function LazyLoad(customSettings, elements) { - this._settings = getInstanceSettings(customSettings); - this._setObserver(); - this.update(elements); - }; - - LazyLoad.prototype = { - _setObserver: function _setObserver() { - var _this = this; - - if (!supportsIntersectionObserver) { - return; - } - var revealIntersectingElements = function revealIntersectingElements(entries) { - entries.forEach(function (entry) { - if (isIntersecting(entry)) { - var element = entry.target; - _this.load(element); - _this._observer.unobserve(element); - } - }); - _this._elements = purgeElements(_this._elements); - }; - this._observer = new IntersectionObserver(revealIntersectingElements, getObserverSettings(this._settings)); - }, - - loadAll: function loadAll() { - var _this2 = this; - - this._elements.forEach(function (element) { - _this2.load(element); - }); - this._elements = purgeElements(this._elements); - }, - - update: function update(elements) { - var _this3 = this; - - var settings = this._settings; - var nodeSet = elements || settings.container.querySelectorAll(settings.elements_selector); - - this._elements = purgeElements(Array.prototype.slice.call(nodeSet)); // nodeset to array for IE compatibility - - if (isBot || !this._observer) { - this.loadAll(); - return; - } - - this._elements.forEach(function (element) { - _this3._observer.observe(element); - }); - }, - - destroy: function destroy() { - var _this4 = this; - - if (this._observer) { - purgeElements(this._elements).forEach(function (element) { - _this4._observer.unobserve(element); - }); - this._observer = null; - } - this._elements = null; - this._settings = null; - }, - - load: function load(element, force) { - revealElement(element, this._settings, force); - } - }; - - /* Automatic instances creation if required (useful for async script loading!) */ - var autoInitOptions = window.lazyLoadOptions; - if (runningOnBrowser && autoInitOptions) { - autoInitialize(LazyLoad, autoInitOptions); - } - - return LazyLoad; -}); \ No newline at end of file diff --git a/js/svg.js b/js/svg.js index b141853..0f985be 100644 --- a/js/svg.js +++ b/js/svg.js @@ -33,4 +33,4 @@ jQuery('img.svg').each(function(){ }, 'xml'); -}); +}); \ No newline at end of file