mirror of https://github.com/saimn/sigal.git
11 changed files with 230 additions and 154 deletions
File diff suppressed because one or more lines are too long
@ -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}); |
||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
@ -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; |
||||
})); |
||||
|
||||
File diff suppressed because one or more lines are too long
@ -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}); |
||||
Loading…
Reference in new issue