Browse Source

Update galleria to v1.6.1

pull/417/head
Simon Conseil 5 years ago
parent
commit
0610dd615f
  1. 111
      sigal/themes/galleria/static/galleria.js
  2. 15
      sigal/themes/galleria/static/galleria.min.js
  3. 31
      sigal/themes/galleria/static/plugins/history/galleria.history.js
  4. 11
      sigal/themes/galleria/static/plugins/history/galleria.history.min.js
  5. BIN
      sigal/themes/galleria/static/themes/classic/classic-loader.gif
  6. BIN
      sigal/themes/galleria/static/themes/classic/classic-map.png
  7. 14
      sigal/themes/galleria/static/themes/classic/galleria.classic.css
  8. 185
      sigal/themes/galleria/static/themes/classic/galleria.classic.js
  9. 2
      sigal/themes/galleria/static/themes/classic/galleria.classic.min.css
  10. 11
      sigal/themes/galleria/static/themes/classic/galleria.classic.min.js
  11. 4
      tests/sample/sigal.conf.py

111
sigal/themes/galleria/static/galleria.js

@ -1,14 +1,30 @@
/**
* Galleria v1.5.7 2017-05-10
* http://galleria.io
* Galleria v1.6.1
*
* 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 */
@ -16,12 +32,13 @@
var doc = window.document,
$doc = $( doc ),
$win = $( window ),
jQuery = $,
// native prototypes
protoArray = Array.prototype,
// internal constants
VERSION = 1.57,
VERSION = 1.61,
DEBUG = true,
TIMEOUT = 30000,
DUMMY = false,
@ -128,7 +145,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,
@ -885,7 +902,7 @@ var doc = window.document,
// If failed, tell the dev to download the latest theme
Galleria.raise( 'Theme CSS could not load after 20 sec. ' + ( Galleria.QUIRK ?
'Your browser is in Quirks Mode, please add a correct doctype.' :
'Please download the latest theme at http://galleria.io/customer/.' ), true );
'Please download the latest theme.' ), true );
},
timeout: 5000
});
@ -1866,8 +1883,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 );
}
}
});
@ -3873,22 +3896,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
@ -3950,6 +3988,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;
@ -4029,6 +4076,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 );
@ -6168,11 +6216,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 );
},
/**
@ -6340,7 +6399,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;
@ -6915,16 +6981,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 ) );
}));

15
sigal/themes/galleria/static/galleria.min.js vendored

File diff suppressed because one or more lines are too long

31
sigal/themes/galleria/static/plugins/history/galleria.history.js

@ -1,14 +1,30 @@
/**
* Galleria History Plugin 2016-09-03
* http://galleria.io
* Galleria History Plugin
*
* Copyright (c) 2010 - 2017 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT License.
*/
(function( $, window ) {
( 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 */
@ -143,5 +159,6 @@ Galleria.History = (function() {
};
}());
}( jQuery, this ));
return Galleria;
}));

11
sigal/themes/galleria/static/plugins/history/galleria.history.min.js vendored

@ -1,11 +1,10 @@
/**
* Galleria - v1.5.7 2017-05-10
* https://galleria.io
* Galleria - v1.6.1 2019-10-17
*
*
* 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(a,b){Galleria.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later."),Galleria.History=function(){var c,d=[],e=!1,f=b.location,g=b.document,h=Galleria.IE,i="onhashchange"in b&&(void 0===g.mode||g.mode>7),j=function(a){return a=c&&!i&&Galleria.IE?a||c.location:f,parseInt(a.hash.substr(2),10)},k=j(f),l=[],m=function(){a.each(l,function(a,c){c.call(b,j())})},n=function(){a.each(d,function(a,b){b()}),e=!0},o=function(a){return"/"+a};return i&&h<8&&(i=!1),i?n():a(function(){b.setInterval(function(){var a=j();isNaN(a)||a==k||(k=a,f.hash=o(a),m())},50);h?a('<iframe tabindex="-1" title="empty">').hide().attr("src","about:blank").one("load",function(){c=this.contentWindow,n()}).insertAfter(g.body):n()}),{change:function(a){l.push(a),i&&(b.onhashchange=m)},set:function(a){isNaN(a)||(!i&&h&&this.ready(function(){var b=c.document;b.open(),b.close(),c.location.hash=o(a)}),f.hash=o(a))},ready:function(a){e?a():d.push(a)}}}()}(jQuery,this);
!function(a,b){"function"==typeof define&&define.amd?define(["../galleria","jquery"],function(c,d){return b(a,c,d)}):"object"==typeof module&&module.exports?module.exports=b(a,require("galleria"),require("jquery")):b(a,a.Galleria,a.jQuery)}(window,function(a,b,c){return b.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later."),b.History=function(){var d,e=[],f=!1,g=a.location,h=a.document,i=b.IE,j="onhashchange"in a&&(void 0===h.mode||h.mode>7),k=function(a){return a=d&&!j&&b.IE?a||d.location:g,parseInt(a.hash.substr(2),10)},l=k(g),m=[],n=function(){c.each(m,function(b,c){c.call(a,k())})},o=function(){c.each(e,function(a,b){b()}),f=!0},p=function(a){return"/"+a};return j&&i<8&&(j=!1),j?o():c(function(){a.setInterval(function(){var a=k();isNaN(a)||a==l||(l=a,g.hash=p(a),n())},50);i?c('<iframe tabindex="-1" title="empty">').hide().attr("src","about:blank").one("load",function(){d=this.contentWindow,o()}).insertAfter(h.body):o()}),{change:function(b){m.push(b),j&&(a.onhashchange=n)},set:function(a){isNaN(a)||(!j&&i&&this.ready(function(){var b=d.document;b.open(),b.close(),d.location.hash=p(a)}),g.hash=p(a))},ready:function(a){f?a():e.push(a)}}}(),b});

BIN
sigal/themes/galleria/static/themes/classic/classic-loader.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
sigal/themes/galleria/static/themes/classic/classic-map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

14
sigal/themes/galleria/static/themes/classic/galleria.classic.css

@ -1,13 +1,3 @@
/**
* Galleria Classic Theme 2017-02-13
* http://galleria.io
*
* Copyright (c) 2010 - 2017 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
#galleria-loader{height:1px!important}
.galleria-theme-classic {
@ -67,7 +57,7 @@
right: 10px;
z-index: 2;
display: none;
background: url(classic-loader.gif) no-repeat 2px 2px;
background: url('data:image/gif;base64,R0lGODlhEAAQAPQAAAAAAP///w4ODnR0dB4eHri4uISEhP///6amptra2lJSUkBAQOrq6mJiYvr6+sjIyJaWlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAAKAAEALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQACgACACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQACgADACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkEAAoABAAsAAAAABAAEAAABWwgIAICaRh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A3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==') no-repeat 2px 2px;
}
.galleria-theme-classic .galleria-info {
width: 50%;
@ -220,7 +210,7 @@
.galleria-theme-classic .galleria-info-close,
.galleria-theme-classic .galleria-image-nav-left,
.galleria-theme-classic .galleria-image-nav-right {
background-image: url(classic-map.png);
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA/gAAAAfCAYAAABTcmYwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29t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vQP05rg/D5Q/9MWMwrxrLa/fT/nOqcQy1Os3+ldVz/TvQcB3lHmiIwa/Qm0x28mGwrGJudfcycidy2SiGOh+ZSn9eMrs78i5yyIigfao7+Mo90ATWMpi/pNoVNTdWvrxD/zyyNf3+Om0u948jayM3I0eNCtqlU3kgdrQVaILPyU4+zFVSMcc6y+/e5+P5l4xiqOmBz7r8HL+vUu7vRU4aE7RP3sHPD775eM8W5R5okOpO/vvIHmsbSmnx2W8s5ldDVyPr0q/L9fJz6QdjGap6/8xMKjbvcrnPO/ffjQfaWfDzu047I18i2zwAAw0r+W8iGyKvIruMBAVVQTW/2snFvlv+mYv+18h6Y1mwvHP/sCz33yLbIx+NBdopLwQXUvEbv/wAPGEkQINMlGvbTLnWQdsoo+a5EuRCny/WO1z+/Y6RLNh45Eal3K9JxTF9r6ZBiwv+rciBVBzjOZ3cWgo0w+VyTfternG3jASlFHOstf7x/GdGseBy33/n/nYqdu7dPwMK/k+PUvFbUyUfaFq5P1yucaCcYn711a38nMvpOSOZV75FPx/Lz6fU8m35x1NxLL9bKfnXjAnaW/CVfEC5ByUVc/tfvlZ+zu/h3zWSeeVb9E9Frqfitvz+hXr9b5LJpyDOGBO08EOr1/vj/pj95aK6KnLF4gAo9wCMwOYyk0YBsHwFX8kHlHsAAFhhOnP8u+P6gHIPAAANKPhKPqDcAwBAQwq+kg8o9wAA0JCCr+QDyj0AADSk4Cv5gHIPAAANKfhKPqDcAwBAjc31NXnzqX6F3sHIA2MERuRA5L5yDwAAy1Pw+yV/PHLRCIERm4i8UO4BAGB5Cj4AAABQIz8EGAC+MAY7hAP2pgAAAABJRU5ErkJggg==');
background-repeat: no-repeat;
}
.galleria-theme-classic.galleria-container.videoplay .galleria-info,

185
sigal/themes/galleria/static/themes/classic/galleria.classic.js

@ -1,102 +1,117 @@
/**
* Galleria Classic Theme 2017-02-13
* http://galleria.io
* Galleria Classic Theme
*
* Copyright (c) 2010 - 2017 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
* Copyright (c) 2010 - 2019 worse is better UG
* Licensed under the MIT License.
*/
(function($) {
/*global window, jQuery, Galleria */
Galleria.addTheme({
name: 'classic',
version: 1.5,
author: 'Galleria',
css: 'galleria.classic.css',
defaults: {
transition: 'slide',
thumbCrop: 'height',
// set this to false if you want to show the caption all the time:
_toggleInfo: true
},
init: function(options) {
Galleria.requires(1.4, 'This version of Classic theme requires Galleria 1.4 or later');
// add some elements
this.addElement('info-link','info-close');
this.append({
'info' : ['info-link','info-close']
( function( window, factory ) {
if ( typeof define == 'function' && define.amd ) {
define( ['../galleria', 'jquery' ], function( Galleria, jQuery ) {
return factory( window, Galleria, jQuery );
});
// cache some stuff
var info = this.$('info-link,info-close,info-text'),
touch = Galleria.TOUCH;
// show loader & counter with opacity
this.$('loader,counter').show().css('opacity', 0.4);
// some stuff for non-touch browsers
if (! touch ) {
this.addIdleState( this.get('image-nav-left'), { left:-50 });
this.addIdleState( this.get('image-nav-right'), { right:-50 });
this.addIdleState( this.get('counter'), { opacity:0 });
}
// toggle info
if ( options._toggleInfo === true ) {
info.bind( 'click:fast', function() {
info.toggle();
} 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, $ ) {
Galleria.addTheme({
name: 'classic',
version: 1.6,
author: 'Galleria',
css: 'galleria.classic.css',
defaults: {
transition: 'slide',
thumbCrop: 'height',
// set this to false if you want to show the caption all the time:
_toggleInfo: true
},
init: function(options) {
Galleria.requires(1.4, 'This version of Classic theme requires Galleria 1.4 or later');
// add some elements
this.addElement('info-link','info-close');
this.append({
'info' : ['info-link','info-close']
});
} else {
info.show();
this.$('info-link, info-close').hide();
}
// bind some stuff
this.bind('thumbnail', function(e) {
// cache some stuff
var info = this.$('info-link,info-close,info-text'),
touch = Galleria.TOUCH;
// show loader & counter with opacity
this.$('loader,counter').show().css('opacity', 0.4);
// some stuff for non-touch browsers
if (! touch ) {
// fade thumbnails
$(e.thumbTarget).css('opacity', 0.6).parent().hover(function() {
$(this).not('.active').children().stop().fadeTo(100, 1);
}, function() {
$(this).not('.active').children().stop().fadeTo(400, 0.6);
});
this.addIdleState( this.get('image-nav-left'), { left:-50 });
this.addIdleState( this.get('image-nav-right'), { right:-50 });
this.addIdleState( this.get('counter'), { opacity:0 });
}
if ( e.index === this.getIndex() ) {
$(e.thumbTarget).css('opacity',1);
}
} else {
$(e.thumbTarget).css('opacity', this.getIndex() ? 1 : 0.6).bind('click:fast', function() {
$(this).css( 'opacity', 1 ).parent().siblings().children().css('opacity', 0.6);
// toggle info
if ( options._toggleInfo === true ) {
info.bind( 'click:fast', function() {
info.toggle();
});
} else {
info.show();
this.$('info-link, info-close').hide();
}
});
var activate = function(e) {
$(e.thumbTarget).css('opacity',1).parent().siblings().children().css('opacity', 0.6);
};
// bind some stuff
this.bind('thumbnail', function(e) {
if (! touch ) {
// fade thumbnails
$(e.thumbTarget).css('opacity', 0.6).parent().hover(function() {
$(this).not('.active').children().stop().fadeTo(100, 1);
}, function() {
$(this).not('.active').children().stop().fadeTo(400, 0.6);
});
if ( e.index === this.getIndex() ) {
$(e.thumbTarget).css('opacity',1);
}
} else {
$(e.thumbTarget).css('opacity', this.getIndex() ? 1 : 0.6).bind('click:fast', function() {
$(this).css( 'opacity', 1 ).parent().siblings().children().css('opacity', 0.6);
});
}
});
this.bind('loadstart', function(e) {
if (!e.cached) {
this.$('loader').show().fadeTo(200, 0.4);
}
window.setTimeout(function() {
activate(e);
}, touch ? 300 : 0);
this.$('info').toggle( this.hasInfo() );
});
var activate = function(e) {
$(e.thumbTarget).css('opacity',1).parent().siblings().children().css('opacity', 0.6);
};
this.bind('loadfinish', function(e) {
this.$('loader').fadeOut(200);
});
}
});
this.bind('loadstart', function(e) {
if (!e.cached) {
this.$('loader').show().fadeTo(200, 0.4);
}
window.setTimeout(function() {
activate(e);
}, touch ? 300 : 0);
this.$('info').toggle( this.hasInfo() );
});
this.bind('loadfinish', function(e) {
this.$('loader').fadeOut(200);
});
}
});
}(jQuery));
return Galleria;
}));

2
sigal/themes/galleria/static/themes/classic/galleria.classic.min.css vendored

File diff suppressed because one or more lines are too long

11
sigal/themes/galleria/static/themes/classic/galleria.classic.min.js vendored

@ -1,11 +1,10 @@
/**
* Galleria - v1.5.7 2017-05-10
* https://galleria.io
* Galleria - v1.6.1 2019-10-17
*
*
* 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(a){Galleria.addTheme({name:"classic",version:1.5,author:"Galleria",css:"galleria.classic.css",defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:!0},init:function(b){Galleria.requires(1.4,"This version of Classic theme requires Galleria 1.4 or later"),this.addElement("info-link","info-close"),this.append({info:["info-link","info-close"]});var c=this.$("info-link,info-close,info-text"),d=Galleria.TOUCH;this.$("loader,counter").show().css("opacity",.4),d||(this.addIdleState(this.get("image-nav-left"),{left:-50}),this.addIdleState(this.get("image-nav-right"),{right:-50}),this.addIdleState(this.get("counter"),{opacity:0})),b._toggleInfo===!0?c.bind("click:fast",function(){c.toggle()}):(c.show(),this.$("info-link, info-close").hide()),this.bind("thumbnail",function(b){d?a(b.thumbTarget).css("opacity",this.getIndex()?1:.6).bind("click:fast",function(){a(this).css("opacity",1).parent().siblings().children().css("opacity",.6)}):(a(b.thumbTarget).css("opacity",.6).parent().hover(function(){a(this).not(".active").children().stop().fadeTo(100,1)},function(){a(this).not(".active").children().stop().fadeTo(400,.6)}),b.index===this.getIndex()&&a(b.thumbTarget).css("opacity",1))});var e=function(b){a(b.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)};this.bind("loadstart",function(a){a.cached||this.$("loader").show().fadeTo(200,.4),window.setTimeout(function(){e(a)},d?300:0),this.$("info").toggle(this.hasInfo())}),this.bind("loadfinish",function(a){this.$("loader").fadeOut(200)})}})}(jQuery);
!function(a,b){"function"==typeof define&&define.amd?define(["../galleria","jquery"],function(c,d){return b(a,c,d)}):"object"==typeof module&&module.exports?module.exports=b(a,require("galleria"),require("jquery")):b(a,a.Galleria,a.jQuery)}(window,function(a,b,c){return b.addTheme({name:"classic",version:1.6,author:"Galleria",css:"galleria.classic.css",defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:!0},init:function(d){b.requires(1.4,"This version of Classic theme requires Galleria 1.4 or later"),this.addElement("info-link","info-close"),this.append({info:["info-link","info-close"]});var e=this.$("info-link,info-close,info-text"),f=b.TOUCH;this.$("loader,counter").show().css("opacity",.4),f||(this.addIdleState(this.get("image-nav-left"),{left:-50}),this.addIdleState(this.get("image-nav-right"),{right:-50}),this.addIdleState(this.get("counter"),{opacity:0})),!0===d._toggleInfo?e.bind("click:fast",function(){e.toggle()}):(e.show(),this.$("info-link, info-close").hide()),this.bind("thumbnail",function(a){f?c(a.thumbTarget).css("opacity",this.getIndex()?1:.6).bind("click:fast",function(){c(this).css("opacity",1).parent().siblings().children().css("opacity",.6)}):(c(a.thumbTarget).css("opacity",.6).parent().hover(function(){c(this).not(".active").children().stop().fadeTo(100,1)},function(){c(this).not(".active").children().stop().fadeTo(400,.6)}),a.index===this.getIndex()&&c(a.thumbTarget).css("opacity",1))});var g=function(a){c(a.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)};this.bind("loadstart",function(b){b.cached||this.$("loader").show().fadeTo(200,.4),a.setTimeout(function(){g(b)},f?300:0),this.$("info").toggle(this.hasInfo())}),this.bind("loadfinish",function(a){this.$("loader").fadeOut(200)})}}),b});

4
tests/sample/sigal.conf.py

@ -33,6 +33,6 @@ rss_feed = {'feed_url': 'http://127.0.0.1:8000/feed.rss', 'nb_items': 10}
atom_feed = {'feed_url': 'http://127.0.0.1:8000/feed.atom', 'nb_items': 10}
# theme = 'photoswipe'
# theme = 'galleria'
# thumb_size = (280, 210)
theme = 'galleria'
thumb_size = (280, 210)
# show_map = True

Loading…
Cancel
Save