...
 
Commits (4)
......@@ -19,7 +19,7 @@ web/.htaccess
# Composer
auth.json
vendor
/vendor
# Logs (server and Wonolog)
logs/*
......
......@@ -85,13 +85,14 @@
"source": {
"type": "git",
"url": "https://gitlab.com/chesio/lazy-daisy",
"reference": "9875579ea64dbbafae6c3681fac39d7df77f9fc5"
"reference": "d148ea3b8c6f0e9a34d08d6c72f19898e4ee53cb"
},
"require": {
"composer/installers": "~1.0",
"php": ">=7.1.0"
},
"require-dev": {
"php-stubs/wordpress-stubs": "^5.3",
"squizlabs/php_codesniffer": "^3.2"
},
"type": "wordpress-plugin",
......@@ -126,7 +127,7 @@
"support": {
"issues": "https://gitlab.com/chesio/lazy-daisy/issues"
},
"time": "2020-01-17T19:41:28+00:00"
"time": "2020-01-18T15:39:00+00:00"
},
{
"name": "composer/installers",
......
assets/.sass-cache
assets/dist
assets/node_modules
languages/*.mo
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" stroke="#000"><g transform="translate(1 1)" stroke-width="2" fill="none" fill-rule="evenodd"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></svg>
\ No newline at end of file
<svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" stroke="#fff"><g transform="translate(1 1)" stroke-width="2" fill="none" fill-rule="evenodd"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></svg>
\ No newline at end of file
This diff is collapsed.
!function(){var t=document.querySelector("html");function n(e,t,n){try{return window[e].setItem(t,n),!0}catch(e){return!1}}function i(){n("sessionStorage","zoom",t.classList.toggle("zoomed-out")?"out":"in")}function e(e){if(e){for(var t=null,n=/^v(h|min|max|w)-\d+$/i,i=0;i<e.classList.length;++i){var o=e.classList.item(i);if(n.test(o)){t=o;break}}if(t){var r=e.querySelector("img");if(r){var c=0,a=null;u(),window.addEventListener("orientationchange",u)}}}function u(){var e=function(e){var t=e.split("-"),n=parseInt(t[1])/100;switch(t[0]){case"vh":return window.innerHeight*n;case"vmax":return Math.max(window.innerWidth,window.innerHeight)*n;case"vmin":return Math.min(window.innerWidth,window.innerHeight)*n;case"vw":return window.innerWidth*n;default:return 0}}(t);e===c?(a&&clearTimeout(a),a=setTimeout(u,100)):(c=e,r.style.height=e+"px")}}function o(e){e&&e.addEventListener("click",i)}function r(e){e&&e.addEventListener("click",function(){n("localStorage","lights",t.classList.toggle("lights-off")?"off":"on")})}var c,a={common:{init:function(){r(document.querySelector("button#turn-lights-on")),r(document.querySelector("button#turn-lights-off")),function(e){try{".".endsWith(".")}catch(e){return}if(e)for(var t=window.location.hostname,n=e.querySelectorAll('[href^="http://"], [href^="https://"]'),i=0;i<n.length;++i){var o=n[i],r=new URL(o.getAttribute("href"));r.hostname===t||r.hostname.endsWith("."+t)||1<o.children.length||(o.classList.add("external-link"),o.innerHTML=window.b13r.content_with_svg_icon(o.textContent,"","external-link"))}}(document.querySelector("main")),function(e){if(e)for(var t=e.querySelectorAll("a[href]"),n=0;n<t.length;++n){var i=t[n];if(!i.classList.contains("pswp-link")){var o=document.querySelector('a.pswp-link[href="'+i.getAttribute("href")+'"]');o&&(i.classList.add("photoswiped-link"),i.pswp=o,i.innerHTML=window.b13r.content_with_svg_icon(i.textContent,"","image"))}}}(document.querySelector("main")),function(n,e){var t;n.addEventListener("change",function(){n.checked?(t=location.hash,location.hash="menu-open"):"#menu-open"===location.hash&&(t=null,history.back()),e.dispatchEvent(new CustomEvent("primary-nav-toggle",{detail:{isOpen:n.checked}}))}),window.addEventListener("hashchange",function(){location.hash===t&&(n.checked=!1,e.dispatchEvent(new CustomEvent("primary-nav-toggle",{detail:{isOpen:n.checked}})))}),document.addEventListener("keyup",function(e){if(27===e.keyCode){n.checked=!1;var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),n.dispatchEvent(t)}})}(document.querySelector("input#nav-trigger"),document.querySelector("#primary-nav")),function(e,t){function n(e){for(var t=e?0:-1,n=0;n<i.length;++n)i[n].setAttribute("tabindex",t)}var i=e.querySelectorAll("a");n(t.checked),e.addEventListener("primary-nav-toggle",function(e){n(e.detail.isOpen)})}(document.querySelector("#primary-nav"),document.querySelector("input#nav-trigger"))},finalize:function(){}},attachment:{init:function(){!function(e,t){var n=e?e.getAttribute("href"):null,i=t?t.getAttribute("href"):null,o=[];document.addEventListener("keydown",function(e){if(o.push(e.which),!(1<o.length)){switch((e.target||e.srcElement).tagName.toLowerCase()){case"input":case"select":case"textarea":return}switch(e.which){case 37:n&&location.assign(n);break;case 39:i&&location.assign(i)}}}),document.addEventListener("keyup",function(t){o=o.filter(function(e){return e!==t.which})})}(document.querySelector('a[rel="prev"]'),document.querySelector('a[rel="next"]'))},finalize:function(){}},attachment_image:{init:function(){o(document.querySelector("div#image-header img")),o(document.querySelector("button#zoom-in")),o(document.querySelector("button#zoom-out"))},finalize:function(){}},attachment_video:{init:function(){!function(e,t){e&&t&&t.addEventListener("click",function(){!function(e){var t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullScreen;t&&t.call(e)}(e)})}(document.querySelector("video#fullscreen-element"),document.querySelector("button#fullscreen-toggler"))},finalize:function(){}},image_header_on:{init:function(){e(document.querySelector("div#image-header"))},finalize:function(){}}},u={fire:function(e,t,n){var i=a;t=void 0===t?"init":t,""!==e&&i[e]&&"function"==typeof i[e][t]&&i[e][t](n)},loadEvents:function(){u.fire("common");for(var e=document.body.className.replace(/-/g,"_").split(/\s+/),t=0;t<e.length;++t)u.fire(e[t])}};c=u.loadEvents,"interactive"===document.readyState||"complete"===document.readyState?c():document.addEventListener("DOMContentLoaded",c)}();
\ No newline at end of file
/* global Colcade */
/**
* Enhance media grid with Colcade
*/
(function(document, Colcade) {
function initMediaGrid() {
// Note: this selects only the first media grid on a page
var grid = document.querySelector('.media-grid');
if (grid) {
new Colcade(grid, {
columns: '.grid-column',
items: '.grid-item'
});
}
}
/**
* Vanilla JavaScript alternative to $(document).ready() from jQuery:
* http://beeker.io/jquery-document-ready-equivalent-vanilla-javascript
*
* @param {callback} callback
* @returns {undefined}
*/
var domReady = function(callback) {
document.readyState === "interactive" || document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);
};
// Load Events
domReady(initMediaGrid);
})(document, Colcade);
!function(t,n){var e;e=function(){var e=t.querySelector(".media-grid");e&&new n(e,{columns:".grid-column",items:".grid-item"})},"interactive"===t.readyState||"complete"===t.readyState?e():t.addEventListener("DOMContentLoaded",e)}(document,Colcade);
\ No newline at end of file
This diff is collapsed.
!function(I,g,u,p,h){function m(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function e(t){this.template=t,this.epsilon=t.getAttribute("data-epsilon")?parseFloat(t.getAttribute("data-epsilon")):.1,this.options=t.getAttribute("data-options")?t.getAttribute("data-options"):{},this.mediumBreakpoint=1024,this.largeBreakpoint=2048}m(e.prototype,{init:function(){for(var t=g.querySelectorAll("[data-gallery]"),e=0;e<t.length;++e)t[e].addEventListener("click",this.handleThumbnailClick.bind(this));g.querySelector("main").addEventListener("click",this.handleAnchorClick.bind(this));var i=function(){var t=I.location.hash.substring(1),e={};if(t.length<5)return e;for(var i=t.split("&"),a=0;a<i.length;a++)if(i[a]){var r=i[a].split("=");r.length<2||(e[r[0]]=r[1])}return e}();if(i.gid&&i.pid){var a=g.querySelector('.pswp-link[data-pid="'+i.pid+'"]');if(!a)return;var r=g.querySelector('[data-gallery="'+i.gid+'"]');if(!r)return;this.openGalleryFromLink(a,r)}},handleAnchorClick:function(t){var e=((t=t||I.event).target||t.srcElement).closest("a.photoswiped-link");e&&"pswp"in e&&this.openGalleryFromLink(e.pswp)&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},handleThumbnailClick:function(t){var e=((t=t||I.event).target||t.srcElement).closest("a.pswp-link");e&&this.openGalleryFromLink(e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},openGalleryFromLink:function(t,e){var i=t.closest(".pswp-item");if(!i)return!1;if(e){if(i.closest("[data-gallery]")!==e)return!1}else if(!(e=i.closest("[data-gallery]")))return!1;return this.openPhotoSwipe(e,parseInt(i.getAttribute("data-item-index"))),!0},openPhotoSwipe:function(t,e){var a=function(t){for(var e=[],i=t.getElementsByClassName("pswp-item"),a=i.length,r=0;r<a;++r){var n=i[r],l="figure"===n.tagName.toLowerCase()?n:n.firstElementChild,s=l.getElementsByClassName("pswp-link")[0],o="<strong>"+(s.getAttribute("data-title")?s.getAttribute("data-title"):s.getAttribute("title"))+"</strong>";if(o=I.b13r.content_with_svg_icon(o,"","long-arrow-right"),0<l.getElementsByClassName("pswp-detail").length)o='<a href="'+l.getElementsByClassName("pswp-detail")[0].getAttribute("href")+'">'+o+"</a>";else s.getAttribute("data-detail")&&(o='<a href="'+s.getAttribute("data-detail")+'">'+o+"</a>");if(0<l.getElementsByTagName("figcaption").length)o+="<br><span>"+l.getElementsByTagName("figcaption")[0].innerHTML+"</span>";else s.getAttribute("data-caption")&&(o+="<br><span>"+s.getAttribute("data-caption")+"</span>");for(var g={fullImage:{src:s.getAttribute("href")},pid:s.getAttribute("data-pid"),title:o},u=l.getElementsByTagName("meta"),p=0;p<u.length;++p){var h=u[p].getAttribute("itemprop"),m=u[p].getAttribute("content");"width"===h?g.fullImage.w=parseInt(m):"height"===h&&(g.fullImage.h=parseInt(m))}g.w||(g.fullImage.w=parseInt(s.getAttribute("data-width"))),g.h||(g.fullImage.h=parseInt(s.getAttribute("data-height")));var d=s.getElementsByTagName("img");1===d.length&&(g.thumb=d[0],g.msrc=d[0].getAttribute("src"));var c=s.getAttribute("data-medium-url"),f=parseInt(s.getAttribute("data-medium-width")),w=parseInt(s.getAttribute("data-medium-height"));c&&f&&w&&(g.mediumImage={src:c,w:f,h:w});var b=s.getAttribute("data-large-url"),v=parseInt(s.getAttribute("data-large-width")),y=parseInt(s.getAttribute("data-large-height"));b&&v&&y&&(g.largeImage={src:b,w:v,h:y}),e[parseInt(n.getAttribute("data-item-index"))]=g}return e}(t);if(0<=e&&e<a.length){m(this.options,{index:e,galleryPIDs:!0,galleryUID:t.getAttribute("data-gallery"),loop:!1});!function(t,e){for(var i=0;i<t.length;++i){var a=t[i];if(!a.thumb)return!1;if(u.abs(a.w/a.thumb.scrollWidth-a.h/a.thumb.scrollHeight)>e)return!1}return!0}(a,this.epsilon)?(this.options.showHideOpacity=!0,this.options.getThumbBoundsFn=!1,this.template.classList.add("pswp--no-placeholder")):(this.options.showHideOpacity=!1,this.options.getThumbBoundsFn=function(t){var e=I.pageYOffset||g.documentElement.scrollTop,i=a[t].thumb.getBoundingClientRect();return{x:i.left,y:i.top+e,w:i.width}},this.template.classList.remove("pswp--no-placeholder"));var i=new p(this.template,h,a,this.options),r=this.template.querySelector(".pswp__button--arrow--left"),n=this.template.querySelector(".pswp__button--arrow--right");i.listen("beforeChange",function(){r.style.display=this.options.loop||0<this.getCurrentIndex()?"":"none",n.style.display=this.options.loop||this.getCurrentIndex()<this.items.length-1?"":"none"});var l=this,s="full",o=!0;i.listen("beforeResize",function(){var t=i.viewportSize.x*I.devicePixelRatio,e=!1;s=t>l.largeBreakpoint?(e="full"!==s&&!o,"full"):t>l.mediumBreakpoint?(e="large"!==s&&!o,"large"):(e="medium"!==s&&!o,"medium"),e&&i.invalidateCurrItems(),o=!1}),i.listen("gettingData",function(t,e){"medium"===s&&e.mediumImage?(e.src=e.mediumImage.src,e.w=e.mediumImage.w,e.h=e.mediumImage.h):"large"===s&&e.largeImage?(e.src=e.largeImage.src,e.w=e.largeImage.w,e.h=e.largeImage.h):(e.src=e.fullImage.src,e.w=e.fullImage.w,e.h=e.fullImage.h)}),i.init()}}});var t;t=function(){var t=g.querySelector(".pswp");t&&new e(t).init()},"interactive"===g.readyState||"complete"===g.readyState?t():g.addEventListener("DOMContentLoaded",t)}(window,document,Math,PhotoSwipe,PhotoSwipeUI_Default);
\ No newline at end of file
/*!
* Colcade v0.2.0
* Lightweight masonry layout
* by David DeSandro
* MIT license
*/
/*jshint browser: true, undef: true, unused: true */
( function( window, factory ) {
// universal module definition
/*jshint strict: false */
/*global define: false, module: false */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( factory );
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS
module.exports = factory();
} else {
// browser global
window.Colcade = factory();
}
}( window, function factory() {
// -------------------------- Colcade -------------------------- //
function Colcade( element, options ) {
element = getQueryElement( element );
// do not initialize twice on same element
if ( element && element.colcadeGUID ) {
var instance = instances[ element.colcadeGUID ];
instance.option( options );
return instance;
}
this.element = element;
// options
this.options = {};
this.option( options );
// kick things off
this.create();
}
var proto = Colcade.prototype;
proto.option = function( options ) {
this.options = extend( this.options, options );
};
// globally unique identifiers
var GUID = 0;
// internal store of all Colcade intances
var instances = {};
proto.create = function() {
this.errorCheck();
// add guid for Colcade.data
var guid = this.guid = ++GUID;
this.element.colcadeGUID = guid;
instances[ guid ] = this; // associate via id
// update initial properties & layout
this.reload();
// events
this._windowResizeHandler = this.onWindowResize.bind( this );
this._loadHandler = this.onLoad.bind( this );
window.addEventListener( 'resize', this._windowResizeHandler );
this.element.addEventListener( 'load', this._loadHandler, true );
};
proto.errorCheck = function() {
var errors = [];
if ( !this.element ) {
errors.push( 'Bad element: ' + this.element );
}
if ( !this.options.columns ) {
errors.push( 'columns option required: ' + this.options.columns );
}
if ( !this.options.items ) {
errors.push( 'items option required: ' + this.options.items );
}
if ( errors.length ) {
throw new Error( '[Colcade error] ' + errors.join('. ') );
}
};
// update properties and do layout
proto.reload = function() {
this.updateColumns();
this.updateItems();
this.layout();
};
proto.updateColumns = function() {
this.columns = querySelect( this.options.columns, this.element );
};
proto.updateItems = function() {
this.items = querySelect( this.options.items, this.element );
};
proto.getActiveColumns = function() {
return this.columns.filter( function( column ) {
var style = getComputedStyle( column );
return style.display != 'none';
});
};
// ----- layout ----- //
// public, updates activeColumns
proto.layout = function() {
this.activeColumns = this.getActiveColumns();
this._layout();
};
// private, does not update activeColumns
proto._layout = function() {
// reset column heights
this.columnHeights = this.activeColumns.map( function() {
return 0;
});
// layout all items
this.layoutItems( this.items );
};
proto.layoutItems = function( items ) {
items.forEach( this.layoutItem, this );
};
proto.layoutItem = function( item ) {
// layout item by appending to column
var minHeight = Math.min.apply( Math, this.columnHeights );
var index = this.columnHeights.indexOf( minHeight );
this.activeColumns[ index ].appendChild( item );
// at least 1px, if item hasn't loaded
// Not exactly accurate, but it's cool
this.columnHeights[ index ] += item.offsetHeight || 1;
};
// ----- adding items ----- //
proto.append = function( elems ) {
var items = this.getQueryItems( elems );
// add items to collection
this.items = this.items.concat( items );
// lay them out
this.layoutItems( items );
};
proto.prepend = function( elems ) {
var items = this.getQueryItems( elems );
// add items to collection
this.items = items.concat( this.items );
// lay out everything
this._layout();
};
proto.getQueryItems = function( elems ) {
elems = makeArray( elems );
var fragment = document.createDocumentFragment();
elems.forEach( function( elem ) {
fragment.appendChild( elem );
});
return querySelect( this.options.items, fragment );
};
// ----- measure column height ----- //
proto.measureColumnHeight = function( elem ) {
var boundingRect = this.element.getBoundingClientRect();
this.activeColumns.forEach( function( column, i ) {
// if elem, measure only that column
// if no elem, measure all columns
if ( !elem || column.contains( elem ) ) {
var lastChildRect = column.lastElementChild.getBoundingClientRect();
// not an exact calculation as it includes top border, and excludes item bottom margin
this.columnHeights[ i ] = lastChildRect.bottom - boundingRect.top;
}
}, this );
};
// ----- events ----- //
proto.onWindowResize = function() {
clearTimeout( this.resizeTimeout );
this.resizeTimeout = setTimeout( function() {
this.onDebouncedResize();
}.bind( this ), 100 );
};
proto.onDebouncedResize = function() {
var activeColumns = this.getActiveColumns();
// check if columns changed
var isSameLength = activeColumns.length == this.activeColumns.length;
var isSameColumns = true;
this.activeColumns.forEach( function( column, i ) {
isSameColumns = isSameColumns && column == activeColumns[i];
});
if ( isSameLength && isSameColumns ) {
return;
}
// activeColumns changed
this.activeColumns = activeColumns;
this._layout();
};
proto.onLoad = function( event ) {
this.measureColumnHeight( event.target );
};
// ----- destroy ----- //
proto.destroy = function() {
// move items back to container
this.items.forEach( function( item ) {
this.element.appendChild( item );
}, this );
// remove events
window.removeEventListener( 'resize', this._windowResizeHandler );
this.element.removeEventListener( 'load', this._loadHandler, true );
// remove data
delete this.element.colcadeGUID;
delete instances[ this.guid ];
};
// -------------------------- HTML init -------------------------- //
docReady( function() {
var dataElems = querySelect('[data-colcade]');
dataElems.forEach( htmlInit );
});
function htmlInit( elem ) {
// convert attribute "foo: bar, qux: baz" into object
var attr = elem.getAttribute('data-colcade');
var attrParts = attr.split(',');
var options = {};
attrParts.forEach( function( part ) {
var pair = part.split(':');
var key = pair[0].trim();
var value = pair[1].trim();
options[ key ] = value;
});
new Colcade( elem, options );
}
Colcade.data = function( elem ) {
elem = getQueryElement( elem );
var id = elem && elem.colcadeGUID;
return id && instances[ id ];
};
// -------------------------- jQuery -------------------------- //
Colcade.makeJQueryPlugin = function( $ ) {
$ = $ || window.jQuery;
if ( !$ ) {
return;
}
$.fn.colcade = function( arg0 /*, arg1 */) {
// method call $().colcade( 'method', { options } )
if ( typeof arg0 == 'string' ) {
// shift arguments by 1
var args = Array.prototype.slice.call( arguments, 1 );
return methodCall( this, arg0, args );
}
// just $().colcade({ options })
plainCall( this, arg0 );
return this;
};
function methodCall( $elems, methodName, args ) {
var returnValue;
$elems.each( function( i, elem ) {
// get instance
var colcade = $.data( elem, 'colcade' );
if ( !colcade ) {
return;
}
// apply method, get return value
var value = colcade[ methodName ].apply( colcade, args );
// set return value if value is returned, use only first value
returnValue = returnValue === undefined ? value : returnValue;
});
return returnValue !== undefined ? returnValue : $elems;
}
function plainCall( $elems, options ) {
$elems.each( function( i, elem ) {
var colcade = $.data( elem, 'colcade' );
if ( colcade ) {
// set options & init
colcade.option( options );
colcade.layout();
} else {
// initialize new instance
colcade = new Colcade( elem, options );
$.data( elem, 'colcade', colcade );
}
});
}
};
// try making plugin
Colcade.makeJQueryPlugin();
// -------------------------- utils -------------------------- //
function extend( a, b ) {
for ( var prop in b ) {
a[ prop ] = b[ prop ];
}
return a;
}
// turn element or nodeList into an array
function makeArray( obj ) {
var ary = [];
if ( Array.isArray( obj ) ) {
// use object if already an array
ary = obj;
} else if ( obj && typeof obj.length == 'number' ) {
// convert nodeList to array
for ( var i=0; i < obj.length; i++ ) {
ary.push( obj[i] );
}
} else {
// array of single index
ary.push( obj );
}
return ary;
}
// get array of elements
function querySelect( selector, elem ) {
elem = elem || document;
var elems = elem.querySelectorAll( selector );
return makeArray( elems );
}
function getQueryElement( elem ) {
if ( typeof elem == 'string' ) {
elem = document.querySelector( elem );
}
return elem;
}
function docReady( onReady ) {
if ( document.readyState == 'complete' ) {
onReady();
return;
}
document.addEventListener( 'DOMContentLoaded', onReady );
}
// -------------------------- end -------------------------- //
return Colcade;
}));
/*! npm.im/object-fit-images 3.2.4 */
var objectFitImages=function(){"use strict";function t(t,e){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+t+"' height='"+e+"'%3E%3C/svg%3E"}function e(t){if(t.srcset&&!p&&window.picturefill){var e=window.picturefill._;t[e.ns]&&t[e.ns].evaled||e.fillImg(t,{reselect:!0}),t[e.ns].curSrc||(t[e.ns].supported=!1,e.fillImg(t,{reselect:!0})),t.currentSrc=t[e.ns].curSrc||t.src}}function i(t){for(var e,i=getComputedStyle(t).fontFamily,r={};null!==(e=u.exec(i));)r[e[1]]=e[2];return r}function r(e,i,r){var n=t(i||1,r||0);b.call(e,"src")!==n&&h.call(e,"src",n)}function n(t,e){t.naturalWidth?e(t):setTimeout(n,100,t,e)}function c(t){var c=i(t),o=t[l];if(c["object-fit"]=c["object-fit"]||"fill",!o.img){if("fill"===c["object-fit"])return;if(!o.skipTest&&f&&!c["object-position"])return}if(!o.img){o.img=new Image(t.width,t.height),o.img.srcset=b.call(t,"data-ofi-srcset")||t.srcset,o.img.src=b.call(t,"data-ofi-src")||t.src,h.call(t,"data-ofi-src",t.src),t.srcset&&h.call(t,"data-ofi-srcset",t.srcset),r(t,t.naturalWidth||t.width,t.naturalHeight||t.height),t.srcset&&(t.srcset="");try{s(t)}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}e(o.img),t.style.backgroundImage='url("'+(o.img.currentSrc||o.img.src).replace(/"/g,'\\"')+'")',t.style.backgroundPosition=c["object-position"]||"center",t.style.backgroundRepeat="no-repeat",t.style.backgroundOrigin="content-box",/scale-down/.test(c["object-fit"])?n(o.img,function(){o.img.naturalWidth>t.width||o.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"}):t.style.backgroundSize=c["object-fit"].replace("none","auto").replace("fill","100% 100%"),n(o.img,function(e){r(t,e.naturalWidth,e.naturalHeight)})}function s(t){var e={get:function(e){return t[l].img[e?e:"src"]},set:function(e,i){return t[l].img[i?i:"src"]=e,h.call(t,"data-ofi-"+i,e),c(t),e}};Object.defineProperty(t,"src",e),Object.defineProperty(t,"currentSrc",{get:function(){return e.get("currentSrc")}}),Object.defineProperty(t,"srcset",{get:function(){return e.get("srcset")},set:function(t){return e.set(t,"srcset")}})}function o(){function t(t,e){return t[l]&&t[l].img&&("src"===e||"srcset"===e)?t[l].img:t}d||(HTMLImageElement.prototype.getAttribute=function(e){return b.call(t(this,e),e)},HTMLImageElement.prototype.setAttribute=function(e,i){return h.call(t(this,e),e,String(i))})}function a(t,e){var i=!y&&!t;if(e=e||{},t=t||"img",d&&!e.skipTest||!m)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var r=0;r<t.length;r++)t[r][l]=t[r][l]||{skipTest:e.skipTest},c(t[r]);i&&(document.body.addEventListener("load",function(t){"IMG"===t.target.tagName&&a(t.target,{skipTest:e.skipTest})},!0),y=!0,t="img"),e.watchMQ&&window.addEventListener("resize",a.bind(null,t,{skipTest:e.skipTest}))}var l="bfred-it:object-fit-images",u=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,g="undefined"==typeof Image?{style:{"object-position":1}}:new Image,f="object-fit"in g.style,d="object-position"in g.style,m="background-size"in g.style,p="string"==typeof g.currentSrc,b=g.getAttribute,h=g.setAttribute,y=!1;return a.supportsObjectFit=f,a.supportsObjectPosition=d,o(),a}();
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>
\ No newline at end of file
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g<S.length;g++)c=S[g],c.onTap&&f.indexOf("pswp__"+c.name)>-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g<q.shareButtons.length;g++)a=q.shareButtons[g],c=q.getImageURLForShare(a),d=q.getPageURLForShare(a),e=q.getTextForShare(a),b=a.url.replace("{{url}}",encodeURIComponent(d)).replace("{{image_url}}",encodeURIComponent(c)).replace("{{raw_image_url}}",c).replace("{{text}}",encodeURIComponent(e)),f+='<a href="'+b+'" target="_blank" class="pswp__share--'+a.id+'"'+(a.download?"download":"")+">"+a.label+"</a>",q.parseShareButtonOut&&(f=q.parseShareButtonOut(a,f));i.children[0].innerHTML=f,i.children[0].onclick=G},I=function(a){for(var c=0;c<q.closeElClasses.length;c++)if(b.hasClass(a,"pswp__"+q.closeElClasses[c]))return!0},J=0,K=function(){clearTimeout(u),J=0,k&&v.setIdle(!1)},L=function(a){a=a?a:window.event;var b=a.relatedTarget||a.toElement;b&&"HTML"!==b.nodeName||(clearTimeout(u),u=setTimeout(function(){v.setIdle(!0)},q.timeToIdleOutside))},M=function(){q.fullscreenEl&&!b.features.isOldAndroid&&(c||(c=v.getFullscreenAPI()),c?(b.bind(document,c.eventK,v.updateFullscreen),v.updateFullscreen(),b.addClass(a.template,"pswp--supports-fs")):b.removeClass(a.template,"pswp--supports-fs"))},N=function(){q.preloaderEl&&(O(!0),l("beforeChange",function(){clearTimeout(o),o=setTimeout(function(){a.currItem&&a.currItem.loading?(!a.allowProgressiveImg()||a.currItem.img&&!a.currItem.img.naturalWidth)&&O(!1):O(!0)},q.loadingIndicatorDelay)}),l("imageLoadComplete",function(b,c){a.currItem===c&&O(!0)}))},O=function(a){n!==a&&(C(m,"preloader--active",!a),n=a)},P=function(a){var c=a.vGap;if(B()){var g=q.barsSize;if(q.captionEl&&"auto"===g.bottom)if(f||(f=b.createEl("pswp__caption pswp__caption--fake"),f.appendChild(b.createEl("pswp__caption__center")),d.insertBefore(f,e),b.addClass(d,"pswp__ui--fit")),q.addCaptionHTMLFn(a,f,!0)){var h=f.clientHeight;c.bottom=parseInt(h,10)||44}else c.bottom=g.top;else c.bottom="auto"===g.bottom?0:g.bottom;c.top=g.top}else c.top=c.bottom=0},Q=function(){q.timeToIdle&&l("mouseUsed",function(){b.bind(document,"mousemove",K),b.bind(document,"mouseout",L),t=setInterval(function(){J++,2===J&&v.setIdle(!0)},q.timeToIdle/2)})},R=function(){l("onVerticalDrag",function(a){x&&a<.95?v.hideControls():!x&&a>=.95&&v.showControls()});var a;l("onPinchClose",function(b){x&&b<.9?(v.hideControls(),a=!0):a&&!x&&b>.9&&v.showControls()}),l("zoomGestureEnded",function(){a=!1,a&&!x&&v.showControls()})},S=[{name:"caption",option:"captionEl",onInit:function(a){e=a}},{name:"share-modal",option:"shareEl",onInit:function(a){i=a},onTap:function(){F()}},{name:"button--share",option:"shareEl",onInit:function(a){h=a},onTap:function(){F()}},{name:"button--zoom",option:"zoomEl",onTap:a.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(a){g=a}},{name:"button--close",option:"closeEl",onTap:a.close},{name:"button--arrow--left",option:"arrowEl",onTap:a.prev},{name:"button--arrow--right",option:"arrowEl",onTap:a.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){c.isFullscreen()?c.exit():c.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(a){m=a}}],T=function(){var a,c,e,f=function(d){if(d)for(var f=d.length,g=0;g<f;g++){a=d[g],c=a.className;for(var h=0;h<S.length;h++)e=S[h],c.indexOf("pswp__"+e.name)>-1&&(q[e.option]?(b.removeClass(a,"pswp__element--disabled"),e.onInit&&e.onInit(a)):b.addClass(a,"pswp__element--disabled"))}};f(d.children);var g=b.getChildByClass(d,"pswp__top-bar");g&&f(g.children)};v.init=function(){b.extend(a.options,z,!0),q=a.options,d=b.getChildByClass(a.scrollWrap,"pswp__ui"),l=a.listen,R(),l("beforeChange",v.update),l("doubleTap",function(b){var c=a.currItem.initialZoomLevel;a.getZoomLevel()!==c?a.zoomTo(c,b,333):a.zoomTo(q.getDoubleTapZoom(!1,a.currItem),b,333)}),l("preventDragEvent",function(a,b,c){var d=a.target||a.srcElement;d&&d.getAttribute("class")&&a.type.indexOf("mouse")>-1&&(d.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(d.tagName))&&(c.prevent=!1)}),l("bindEvents",function(){b.bind(d,"pswpTap click",A),b.bind(a.scrollWrap,"pswpTap",v.onGlobalTap),a.likelyTouchDevice||b.bind(a.scrollWrap,"mouseover",v.onMouseOver)}),l("unbindEvents",function(){y||F(),t&&clearInterval(t),b.unbind(document,"mouseout",L),b.unbind(document,"mousemove",K),b.unbind(d,"pswpTap click",A),b.unbind(a.scrollWrap,"pswpTap",v.onGlobalTap),b.unbind(a.scrollWrap,"mouseover",v.onMouseOver),c&&(b.unbind(document,c.eventK,v.updateFullscreen),c.isFullscreen()&&(q.hideAnimationDuration=0,c.exit()),c=null)}),l("destroy",function(){q.captionEl&&(f&&d.removeChild(f),b.removeClass(e,"pswp__caption--empty")),i&&(i.children[0].onclick=null),b.removeClass(d,"pswp__ui--over-close"),b.addClass(d,"pswp__ui--hidden"),v.setIdle(!1)}),q.showAnimationDuration||b.removeClass(d,"pswp__ui--hidden"),l("initialZoomIn",function(){q.showAnimationDuration&&b.removeClass(d,"pswp__ui--hidden")}),l("initialZoomOut",function(){b.addClass(d,"pswp__ui--hidden")}),l("parseVerticalMargin",P),T(),q.shareEl&&h&&i&&(y=!0),D(),Q(),M(),N()},v.setIdle=function(a){k=a,C(d,"ui--idle",a)},v.update=function(){x&&a.currItem?(v.updateIndexIndicator(),q.captionEl&&(q.addCaptionHTMLFn(a.currItem,e),C(e,"caption--empty",!a.currItem.title)),w=!0):w=!1,y||F(),D()},v.updateFullscreen=function(d){d&&setTimeout(function(){a.setScrollOffset(0,b.getScrollY())},50),b[(c.isFullscreen()?"add":"remove")+"Class"](a.template,"pswp--fs")},v.updateIndexIndicator=function(){q.counterEl&&(g.innerHTML=a.getCurrentIndex()+1+q.indexIndicatorSep+q.getNumItemsFn())},v.onGlobalTap=function(c){c=c||window.event;var d=c.target||c.srcElement;if(!r)if(c.detail&&"mouse"===c.detail.pointerType){if(I(d))return void a.close();b.hasClass(d,"pswp__img")&&(1===a.getZoomLevel()&&a.getZoomLevel()<=a.currItem.fitRatio?q.clickToCloseNonZoomable&&a.close():a.toggleDesktopZoom(c.detail.releasePoint))}else if(q.tapToToggleControls&&(x?v.hideControls():v.showControls()),q.tapToClose&&(b.hasClass(d,"pswp__img")||I(d)))return void a.close()},v.onMouseOver=function(a){a=a||window.event;var b=a.target||a.srcElement;C(d,"ui--over-close",I(b))},v.hideControls=function(){b.addClass(d,"pswp__ui--hidden"),x=!1},v.showControls=function(){x=!0,w||v.update(),b.removeClass(d,"pswp__ui--hidden")},v.supportsFullscreen=function(){var a=document;return!!(a.exitFullscreen||a.mozCancelFullScreen||a.webkitExitFullscreen||a.msExitFullscreen)},v.getFullscreenAPI=function(){var b,c=document.documentElement,d="fullscreenchange";return c.requestFullscreen?b={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:d}:c.mozRequestFullScreen?b={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+d}:c.webkitRequestFullscreen?b={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+d}:c.msRequestFullscreen&&(b={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),b&&(b.enter=function(){return j=q.closeOnScroll,q.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?a.template[this.enterK]():void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},b.exit=function(){return q.closeOnScroll=j,document[this.exitK]()},b.isFullscreen=function(){return document[this.elementK]}),b}};return a});
\ No newline at end of file
......@@ -171,6 +171,7 @@ function mediaGrid(string $gallery, array $attachments, string $size = 'medium')
$output .= '<div class="grid-column grid-column--1"></div>';
$output .= '<div class="grid-column grid-column--2"></div>';
$output .= '<div class="grid-column grid-column--3"></div>';
$output .= '<div class="grid-column grid-column--4"></div>';
// Add item index (necessary for Colcade + PhotoSwipe integration)
$image_index = 0;
......