Skip to content

Commit

Permalink
Build 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Ludwig committed Oct 14, 2019
1 parent 82d6d82 commit 36945e8
Show file tree
Hide file tree
Showing 60 changed files with 1,122 additions and 1,177 deletions.
17 changes: 11 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ Galleria
This is the open source repository for the Galleria core, the Classic theme, plugins and everything else that comes bundled with the free download.
Feel free to post issues - but keep them code related please. You may also do pull requests, but make sure you include some comments and/or tests.

Info, demos, docs and everything else: http://galleria.io

Updates via twitter: http://twitter.com/galleriajs
Info, demos, docs and everything else: https://galleria.io

Documentation
=============

http://docs.galleria.io
https://docs.galleria.io


FAQ
=============

https://docs.galleria.io/references/faq.html


Installation
============
Expand All @@ -34,13 +39,13 @@ bower

$ bower install galleria

http://bower.io/search/?q=galleria
https://bower.io/search/?q=galleria


CDN
---
::

<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/galleria.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.6.0/galleria.min.js"></script>

https://cdnjs.com/libraries/galleria
107 changes: 83 additions & 24 deletions dist/galleria.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,46 @@
/**
* Galleria v1.5.7 2017-05-10
* Galleria v1.6.0 2019-10-13
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/

(function( $, window, Galleria, undef ) {
( function( window, factory ) {
if ( typeof define == 'function' && define.amd ) {
define( [ 'jquery' ], function( jQuery ) {
return factory( window, jQuery );
});
} else if ( typeof module == 'object' && module.exports ) {
module.exports = factory(
window,
require('jquery')
);
} else {
// browser global
window.Galleria = factory(
window,
window.jQuery
);
}

}( window, function factory( window, $, Galleria, undef ) {

/*global jQuery, navigator, Image, module, define */

// some references
var doc = window.document,
$doc = $( doc ),
$win = $( window ),
jQuery = $,

// native prototypes
protoArray = Array.prototype,

// internal constants
VERSION = 1.57,
VERSION = 1.60,
DEBUG = true,
TIMEOUT = 30000,
DUMMY = false,
Expand Down Expand Up @@ -128,7 +147,7 @@ var doc = window.document,
return PROT + '//img.youtube.com/vi/'+this.id+'/default.jpg';
},
get_image: function( data ) {
return PROT + '//img.youtube.com/vi/'+this.id+'/hqdefault.jpg'; }
return PROT + '//img.youtube.com/vi/'+this.id+'/maxresdefault.jpg'; }
},
vimeo: {
reg: /https?:\/\/(?:www\.)?(vimeo\.com)\/(?:hd#)?([0-9]+)/i,
Expand Down Expand Up @@ -1866,8 +1885,14 @@ Galleria = function() {
var image = self._controls.getActive().image;
if ( image ) {
$( image ).width( big.image.width ).height( big.image.height )
.attr( 'style', $( big.image ).attr('style') )
.attr( 'src', big.image.src );
.attr( 'style', $( big.image ).attr('style') );
if (big.image.src.srcset) {
$( image ).attr( 'srcset', big.image.src.srcset );
}
if (big.image.src.sizes) {
$( image ).attr( 'sizes', big.image.src.sizes );
}
$( image ).attr( 'src', big.image.src );
}
}
});
Expand Down Expand Up @@ -3873,22 +3898,37 @@ Galleria.prototype = {
} else if( href && elem.hasClass('iframe') ) {
data.iframe = href;
} else {
data.image = data.big = href;
data.image = href;
}

if ( rel ) {
data.big = rel;
}

// alternative extraction from HTML5 data attribute, added in 1.2.7
$.each( 'big title description link layer image'.split(' '), function( i, val ) {
data.imagesrcset = parent.data( 'srcset' );
data.imagesizes = parent.data( 'sizes' );
data.thumbsizes = elem.attr( 'sizes' );
data.thumbsrcset = elem.attr( 'srcset' );

// alternative extraction from HTML5 data attribute
$.each( 'big bigsrcset bigsizes title description link layer image imagesrcset imagesizes'.split(' '), function( i, val ) {
if ( elem.data(val) ) {
data[ val ] = elem.data(val).toString();
}
});

if (elem.data('srcset')) {
data.imagesrcset = elem.data('srcset');
}

if (elem.data('sizes')) {
data.imagesizes = elem.data('sizes');
}

if ( !data.big ) {
data.big = data.image;
data.bigsrcset = data.imagesrcset;
data.bigsizes = data.imagesizes;
}

// mix default extractions with the hrefs and config
Expand Down Expand Up @@ -3950,6 +3990,15 @@ Galleria.prototype = {

current = self._data[ i ];

// q&d hack to attach srcset & sizes to src
$.each( 'big image thumb'.split(' '), function( i, val ) {
if ( data[ val] ) {
data[val] = new String(data[val]);
data[val].srcset = data [val + 'srcset'];
data[val].sizes = data [val + 'sizes'];
}
});

// copy image as thumb if no thumb exists
if ( 'thumb' in data === false ) {
current.thumb = data.image;
Expand Down Expand Up @@ -4029,6 +4078,7 @@ Galleria.prototype = {
this.clearTimer();
Utils.removeFromArray( _instances, this );
Utils.removeFromArray( _galleries, this );
_video._inst = [];
if ( Galleria._waiters !== undefined && Galleria._waiters.length ) {
$.each( Galleria._waiters, function( i, w ) {
if ( w ) window.clearTimeout( w );
Expand Down Expand Up @@ -6168,11 +6218,22 @@ Galleria.Picture.prototype = {
*/

preload: function( src ) {
$( new Image() ).on( 'load', (function(src, cache) {
var $image = $( new Image() ).on( 'load', (function(src, cache) {
return function() {
cache[ src ] = src;
};
}( src, this.cache ))).attr( 'src', src );
}( src, this.cache )));

// due to a bug in safari, need to set srcset first
if (src.srcset) {
$image.attr( 'srcset', src.srcset );
}

if (src.sizes) {
$image.attr( 'sizes', src.sizes );
}

$image.attr( 'src', src );
},

/**
Expand Down Expand Up @@ -6340,7 +6401,14 @@ Galleria.Picture.prototype = {
});

// begin load and insert in cache when done
$image.on( 'load', onload ).on( 'error', onerror ).attr( 'src', src );
$image.on( 'load', onload ).on( 'error', onerror );
if (src.srcset) {
$image.attr( 'srcset', src.srcset );
}
if (src.sizes) {
$image.attr( 'sizes', src.sizes );
}
$image.attr( 'src', src );

// return the container
return this.container;
Expand Down Expand Up @@ -6915,16 +6983,7 @@ $.fn.galleria = function( options ) {

};

// export as AMD or CommonJS
if ( typeof module === "object" && module && typeof module.exports === "object" ) {
module.exports = Galleria;
} else {
window.Galleria = Galleria;
if ( typeof define === "function" && define.amd ) {
define( "galleria", ['jquery'], function() { return Galleria; } );
}
}

// phew
return Galleria;

}( jQuery, this ) );
}));
11 changes: 6 additions & 5 deletions dist/galleria.min.js

Large diffs are not rendered by default.

File renamed without changes.
Binary file removed dist/plugins/flickr/flickr-loader.gif
Binary file not shown.
30 changes: 25 additions & 5 deletions dist/plugins/flickr/galleria.flickr.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
/**
* Galleria Flickr Plugin 2016-09-03
* Galleria Flickr Plugin 2019-10-13
* http://galleria.io
*
* Copyright (c) 2010 - 2017 worse is better UG
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/

(function($) {

( function( window, factory ) {
if ( typeof define == 'function' && define.amd ) {
define( ['../galleria', 'jquery' ], function( Galleria, jQuery ) {
return factory( window, Galleria, jQuery );
});
} else if ( typeof module == 'object' && module.exports ) {
module.exports = factory(
window,
require('galleria'),
require('jquery')
);
} else {
factory(
window,
window.Galleria,
window.jQuery
);
}
}( window, function factory( window, Galleria, $ ) {

/*global jQuery, Galleria, window */

Expand Down Expand Up @@ -335,7 +354,7 @@ Galleria.prototype.load = function() {
width: 48,
height: 48,
opacity: 0.7,
background:'#000 url('+PATH+'loader.gif) no-repeat 50% 50%'
background:"#000 url('data:image/gif;base64,R0lGODlhEAAQAPQAAAAAAP///w4ODnR0dB4eHri4uISEhP///6amptra2lJSUkBAQOrq6mJiYvr6+sjIyJaWlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAgg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dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAAKAAcALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkEAAoACAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAAKAAkALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==') no-repeat 50% 50%"
});

if ( flickr.length ) {
Expand Down Expand Up @@ -381,4 +400,5 @@ Galleria.prototype.load = function() {
}
};

}( jQuery ) );
return Galleria;
}));
Loading

0 comments on commit 36945e8

Please sign in to comment.