1
0
Fork 0

Modifs pour faire marcher les galeries

This commit is contained in:
Matthieu Dubuget 2016-10-16 11:52:29 +02:00
parent 60b4b0754b
commit 797b870eb0
20 changed files with 227 additions and 89 deletions

View File

@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2013 Aino http://aino.se
Copyright (c) 2016 worse is better UG http://wib.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,10 @@
/**
* Galleria v 1.4.2 2014-08-07
* Galleria v1.4.7 2016-09-17
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/aino/galleria/master/LICENSE
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
@ -20,13 +21,13 @@ var doc = window.document,
protoArray = Array.prototype,
// internal constants
VERSION = 1.41,
VERSION = 1.47,
DEBUG = true,
TIMEOUT = 30000,
DUMMY = false,
NAV = navigator.userAgent.toLowerCase(),
HASH = window.location.hash.replace(/#\//, ''),
PROT = window.location.protocol,
PROT = window.location.protocol == "file:" ? "http:" : window.location.protocol,
M = Math,
F = function(){},
FALSE = function() { return false; },
@ -117,25 +118,18 @@ var doc = window.document,
youtube: {
reg: /https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&(?:amp;)?)*v(?:<[A-Z]+>)?=([0-9a-zA-Z\-\_]+))/i,
embed: function() {
return 'http://www.youtube.com/embed/' + this.id;
return PROT + '//www.youtube.com/embed/' + this.id;
},
getUrl: function() {
return PROT + '//gdata.youtube.com/feeds/api/videos/' + this.id + '?v=2&alt=json-in-script&callback=?';
get_thumb: function( data ) {
return PROT + '//img.youtube.com/vi/'+this.id+'/default.jpg';
},
get_thumb: function(data) {
return data.entry.media$group.media$thumbnail[2].url;
},
get_image: function(data) {
if ( data.entry.yt$hd ) {
return PROT + '//img.youtube.com/vi/'+this.id+'/maxresdefault.jpg';
}
return data.entry.media$group.media$thumbnail[3].url;
}
get_image: function( data ) {
return PROT + '//img.youtube.com/vi/'+this.id+'/hqdefault.jpg'; }
},
vimeo: {
reg: /https?:\/\/(?:www\.)?(vimeo\.com)\/(?:hd#)?([0-9]+)/i,
embed: function() {
return 'http://player.vimeo.com/video/' + this.id;
return PROT + '//player.vimeo.com/video/' + this.id;
},
getUrl: function() {
return PROT + '//vimeo.com/api/v2/video/' + this.id + '.json?callback=?';
@ -182,13 +176,19 @@ var doc = window.document,
$.extend( this, _video[type] );
$.getJSON( this.getUrl(), function(data) {
_videoThumbs = function(data) {
self.data = data;
$.each( self.readys, function( i, fn ) {
fn( self.data );
});
self.readys = [];
});
};
if ( this.hasOwnProperty('getUrl') ) {
$.getJSON( this.getUrl(), _videoThumbs);
} else {
window.setTimeout(_videoThumbs, 400);
}
this.getMedia = function( type, callback, fail ) {
fail = fail || F;
@ -869,7 +869,7 @@ var doc = window.document,
Utils.wait({
until: function() {
return $loader.height() == 1;
return $loader.height() > 0;
},
success: function() {
$loader.remove();
@ -1141,7 +1141,7 @@ $win.on( 'orientationchange', function() {
@example var gallery = new Galleria();
@author http://aino.se
@author http://wib.io
@requires jQuery
@ -5690,7 +5690,7 @@ Galleria.addTheme = function( theme ) {
}
var css = false,
reg;
reg, reg2;
if ( typeof theme.css === 'string' ) {
@ -5724,8 +5724,8 @@ Galleria.addTheme = function( theme ) {
$('script').each(function (i, script) {
// look for the theme script
reg = new RegExp('galleria\\.' + theme.name.toLowerCase() + '\\.');
if (reg.test(script.src)) {
reg2 = new RegExp('galleria\\.io\\/theme\\/' + theme.name.toLowerCase() + '\\/(\\d*\\.*)?(\\d*\\.*)?(\\d*\\/)?js');
if (reg.test(script.src) || reg2.test(script.src)) {
// we have a match
css = script.src.replace(/[^\/]*$/, '') + theme.css;

3
galleria/galleria-1.4.7.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="../../galleria-1.4.2.min.js"></script>
<script src="../../galleria-1.4.7.min.js"></script>
<!-- load flickr plugin -->
<script src="galleria.flickr.min.js"></script>
@ -38,11 +38,11 @@
<div id="galleria"></div>
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
<a href="#" id="close">cloase</a>
</div>
<script>
$(function() {
// Load the classic theme
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
@ -57,6 +57,7 @@
sort: 'interestingness-desc'
}
});
});
</script>
</body>
</html>

View File

@ -1,9 +1,10 @@
/**
* Galleria Flickr Plugin 2012-09-04
* Galleria Flickr Plugin 2016-09-03
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/aino/galleria/master/LICENSE
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/

View File

@ -1 +1 @@
!function(t){Galleria.requires(1.25,"The Flickr Plugin requires Galleria version 1.2.5 or later.");var i=Galleria.utils.getScriptPath();Galleria.Flickr=function(t){this.api_key=t||"2a2ce06c15780ebeb0b706650fc890b2";this.options={max:30,imageSize:"medium",thumbSize:"thumb",sort:"interestingness-desc",description:false,complete:function(){},backlink:false}};Galleria.Flickr.prototype={constructor:Galleria.Flickr,search:function(t,i){return this._find({text:t},i)},tags:function(t,i){return this._find({tags:t},i)},user:function(t,i){return this._call({method:"flickr.urls.lookupUser",url:"flickr.com/photos/"+t},function(t){this._find({user_id:t.user.id,method:"flickr.people.getPublicPhotos"},i)})},set:function(t,i){return this._find({photoset_id:t,method:"flickr.photosets.getPhotos"},i)},gallery:function(t,i){return this._find({gallery_id:t,method:"flickr.galleries.getPhotos"},i)},groupsearch:function(t,i){return this._call({text:t,method:"flickr.groups.search"},function(t){this.group(t.groups.group[0].nsid,i)})},group:function(t,i){return this._find({group_id:t,method:"flickr.groups.pools.getPhotos"},i)},setOptions:function(i){t.extend(this.options,i);return this},_call:function(i,e){var r="https://api.flickr.com/services/rest/?";var o=this;i=t.extend({format:"json",jsoncallback:"?",api_key:this.api_key},i);t.each(i,function(t,i){r+="&"+t+"="+i});t.getJSON(r,function(t){if(t.stat==="ok"){e.call(o,t)}else{Galleria.raise(t.code.toString()+" "+t.stat+": "+t.message,true)}});return o},_getBig:function(t){if(t.url_l){return t.url_l}else if(parseInt(t.width_o,10)>1280){return"https://farm"+t.farm+".static.flickr.com/"+t.server+"/"+t.id+"_"+t.secret+"_b.jpg"}return t.url_o||t.url_z||t.url_m},_getSize:function(t,i){var e;switch(i){case"thumb":e=t.url_t;break;case"small":e=t.url_s;break;case"big":e=this._getBig(t);break;case"original":e=t.url_o?t.url_o:this._getBig(t);break;default:e=t.url_z||t.url_m;break}return e},_find:function(i,e){i=t.extend({method:"flickr.photos.search",extras:"url_t,url_m,url_o,url_s,url_l,url_z,description",sort:this.options.sort,per_page:Math.min(this.options.max,500)},i);return this._call(i,function(t){var i=[],r=t.photos?t.photos.photo:t.photoset.photo,o=r.length,s,l;for(l=0;l<o;l++){s=r[l];i.push({thumb:this._getSize(s,this.options.thumbSize),image:this._getSize(s,this.options.imageSize),big:this._getBig(s),title:r[l].title,description:this.options.description&&r[l].description?r[l].description._content:"",link:this.options.backlink?"https://flickr.com/photos/"+s.owner+"/"+s.id:""})}e.call(this,i)})}};var e=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||typeof this._options.flickr!=="string"){e.apply(this,Galleria.utils.array(arguments));return}var r=this,o=Galleria.utils.array(arguments),s=this._options.flickr.split(":"),l,n=t.extend({},r._options.flickrOptions),a=typeof n.loader!=="undefined"?n.loader:t("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+i+"loader.gif) no-repeat 50% 50%"});if(s.length){if(typeof Galleria.Flickr.prototype[s[0]]!=="function"){Galleria.raise(s[0]+" method not found in Flickr plugin");return e.apply(this,o)}if(!s[1]){Galleria.raise("No flickr argument found");return e.apply(this,o)}window.setTimeout(function(){r.$("target").append(a)},100);l=new Galleria.Flickr;if(typeof r._options.flickrOptions==="object"){l.setOptions(r._options.flickrOptions)}l[s[0]](s[1],function(t){r._data=t;a.remove();r.trigger(Galleria.DATA);l.options.complete.call(l,t)})}else{e.apply(this,o)}}}(jQuery);
(function($){Galleria.requires(1.25,"The Flickr Plugin requires Galleria version 1.2.5 or later.");var PATH=Galleria.utils.getScriptPath();Galleria.Flickr=function(api_key){this.api_key=api_key||"2a2ce06c15780ebeb0b706650fc890b2";this.options={max:30,imageSize:"medium",thumbSize:"thumb",sort:"interestingness-desc",description:false,complete:function(){},backlink:false}};Galleria.Flickr.prototype={constructor:Galleria.Flickr,search:function(phrase,callback){return this._find({text:phrase},callback)},tags:function(tag,callback){return this._find({tags:tag},callback)},user:function(username,callback){return this._call({method:"flickr.urls.lookupUser",url:"flickr.com/photos/"+username},function(data){this._find({user_id:data.user.id,method:"flickr.people.getPublicPhotos"},callback)})},set:function(photoset_id,callback){return this._find({photoset_id:photoset_id,method:"flickr.photosets.getPhotos"},callback)},gallery:function(gallery_id,callback){return this._find({gallery_id:gallery_id,method:"flickr.galleries.getPhotos"},callback)},groupsearch:function(group,callback){return this._call({text:group,method:"flickr.groups.search"},function(data){this.group(data.groups.group[0].nsid,callback)})},group:function(group_id,callback){return this._find({group_id:group_id,method:"flickr.groups.pools.getPhotos"},callback)},setOptions:function(options){$.extend(this.options,options);return this},_call:function(params,callback){var url="https://api.flickr.com/services/rest/?";var scope=this;params=$.extend({format:"json",jsoncallback:"?",api_key:this.api_key},params);$.each(params,function(key,value){url+="&"+key+"="+value});$.getJSON(url,function(data){if(data.stat==="ok"){callback.call(scope,data)}else{Galleria.raise(data.code.toString()+" "+data.stat+": "+data.message,true)}});return scope},_getBig:function(photo){if(photo.url_l){return photo.url_l}else if(parseInt(photo.width_o,10)>1280){return"https://farm"+photo.farm+".static.flickr.com/"+photo.server+"/"+photo.id+"_"+photo.secret+"_b.jpg"}return photo.url_o||photo.url_z||photo.url_m},_getSize:function(photo,size){var img;switch(size){case"thumb":img=photo.url_t;break;case"small":img=photo.url_s;break;case"big":img=this._getBig(photo);break;case"original":img=photo.url_o?photo.url_o:this._getBig(photo);break;default:img=photo.url_z||photo.url_m;break}return img},_find:function(params,callback){params=$.extend({method:"flickr.photos.search",extras:"url_t,url_m,url_o,url_s,url_l,url_z,description",sort:this.options.sort,per_page:Math.min(this.options.max,500)},params);return this._call(params,function(data){var gallery=[],photos=data.photos?data.photos.photo:data.photoset.photo,len=photos.length,photo,i;for(i=0;i<len;i++){photo=photos[i];gallery.push({thumb:this._getSize(photo,this.options.thumbSize),image:this._getSize(photo,this.options.imageSize),big:this._getBig(photo),title:photos[i].title,description:this.options.description&&photos[i].description?photos[i].description._content:"",link:this.options.backlink?"https://flickr.com/photos/"+photo.owner+"/"+photo.id:""})}callback.call(this,gallery)})}};var load=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||typeof this._options.flickr!=="string"){load.apply(this,Galleria.utils.array(arguments));return}var self=this,args=Galleria.utils.array(arguments),flickr=this._options.flickr.split(":"),f,opts=$.extend({},self._options.flickrOptions),loader=typeof opts.loader!=="undefined"?opts.loader:$("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+PATH+"loader.gif) no-repeat 50% 50%"});if(flickr.length){if(typeof Galleria.Flickr.prototype[flickr[0]]!=="function"){Galleria.raise(flickr[0]+" method not found in Flickr plugin");return load.apply(this,args)}if(!flickr[1]){Galleria.raise("No flickr argument found");return load.apply(this,args)}window.setTimeout(function(){self.$("target").append(loader)},100);f=new Galleria.Flickr;if(typeof self._options.flickrOptions==="object"){f.setOptions(self._options.flickrOptions)}f[flickr[0]](flickr[1],function(data){self._data=data;loader.remove();self.trigger(Galleria.DATA);f.options.complete.call(f,data)})}else{load.apply(this,args)}}})(jQuery);

View File

@ -1,9 +1,10 @@
/**
* Galleria History Plugin 2012-04-04
* Galleria History Plugin 2016-09-03
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/aino/galleria/master/LICENSE
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/

View File

@ -1 +1 @@
!function(n,e){Galleria.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later.");Galleria.History=function(){var i=[],t=false,a=e.location,o=e.document,r=Galleria.IE,s="onhashchange"in e&&(o.mode===undefined||o.mode>7),u,c=function(n){if(u&&!s&&Galleria.IE){n=n||u.location}else{n=a}return parseInt(n.hash.substr(2),10)},f=c(a),l=[],h=function(){n.each(l,function(n,i){i.call(e,c())})},d=function(){n.each(i,function(n,e){e()});t=true},y=function(n){return"/"+n};if(s&&r<8){s=false}if(!s){n(function(){var i=e.setInterval(function(){var n=c();if(!isNaN(n)&&n!=f){f=n;a.hash=y(n);h()}},50);if(r){n('<iframe tabindex="-1" title="empty">').hide().attr("src","about:blank").one("load",function(){u=this.contentWindow;d()}).insertAfter(o.body)}else{d()}})}else{d()}return{change:function(n){l.push(n);if(s){e.onhashchange=h}},set:function(n){if(isNaN(n)){return}if(!s&&r){this.ready(function(){var e=u.document;e.open();e.close();u.location.hash=y(n)})}a.hash=y(n)},ready:function(n){if(!t){i.push(n)}else{n()}}}}()}(jQuery,this);
(function($,window){Galleria.requires(1.25,"The History Plugin requires Galleria version 1.2.5 or later.");Galleria.History=function(){var onloads=[],init=false,loc=window.location,doc=window.document,ie=Galleria.IE,support="onhashchange"in window&&(doc.mode===undefined||doc.mode>7),iframe,get=function(winloc){if(iframe&&!support&&Galleria.IE){winloc=winloc||iframe.location}else{winloc=loc}return parseInt(winloc.hash.substr(2),10)},saved=get(loc),callbacks=[],onchange=function(){$.each(callbacks,function(i,fn){fn.call(window,get())})},ready=function(){$.each(onloads,function(i,fn){fn()});init=true},setHash=function(val){return"/"+val};if(support&&ie<8){support=false}if(!support){$(function(){var interval=window.setInterval(function(){var hash=get();if(!isNaN(hash)&&hash!=saved){saved=hash;loc.hash=setHash(hash);onchange()}},50);if(ie){$('<iframe tabindex="-1" title="empty">').hide().attr("src","about:blank").one("load",function(){iframe=this.contentWindow;ready()}).insertAfter(doc.body)}else{ready()}})}else{ready()}return{change:function(fn){callbacks.push(fn);if(support){window.onhashchange=onchange}},set:function(val){if(isNaN(val)){return}if(!support&&ie){this.ready(function(){var idoc=iframe.document;idoc.open();idoc.close();iframe.location.hash=setHash(val)})}loc.hash=setHash(val)},ready:function(fn){if(!init){onloads.push(fn)}else{fn()}}}}()})(jQuery,this);

View File

@ -23,7 +23,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="../../galleria-1.4.2.min.js"></script>
<script src="../../galleria-1.4.7.min.js"></script>
<!-- load the History plugin, no need for further scripting -->
<script src="galleria.history.min.js"></script>
@ -84,17 +84,17 @@
</a>
</div>
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
</div>
<script>
$(function() {
// Load the classic theme
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
// Initialize Galleria
Galleria.run('#galleria');
});
</script>
</body>
</html>

View File

@ -1,9 +1,10 @@
/**
* Galleria Picasa Plugin 2012-04-04
* Galleria Picasa Plugin 2016-09-03
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/aino/galleria/master/LICENSE
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
@ -23,7 +24,7 @@ var PATH = Galleria.utils.getScriptPath();
@example var picasa = new Galleria.Picasa();
@author http://aino.se
@author http://wib.io
@requires jQuery
@requires Galleria

View File

@ -1 +1 @@
!function(i){Galleria.requires(1.25,"The Picasa Plugin requires Galleria version 1.2.5 or later.");var e=Galleria.utils.getScriptPath();Galleria.Picasa=function(){this.options={max:30,imageSize:"medium",thumbSize:"thumb",complete:function(){}}};Galleria.Picasa.prototype={constructor:Galleria.Picasa,search:function(i,e){return this._call("search","all",{q:i},e)},user:function(i,e){return this._call("user","user/"+i,e)},useralbum:function(i,e,t){return this._call("useralbum","user/"+i+"/album/"+e,t)},setOptions:function(e){i.extend(this.options,e);return this},_call:function(e,t,a,s){t="https://picasaweb.google.com/data/feed/api/"+t+"?";if(typeof a=="function"){s=a;a={}}var r=this;a=i.extend({kind:"photo",access:"public","max-results":this.options.max,thumbsize:this._getSizes().join(","),alt:"json-in-script",callback:"?"},a);i.each(a,function(i,e){t+="&"+i+"="+e});var l=false;Galleria.utils.wait({until:function(){return l},success:function(){r._parse.call(r,l.feed.entry,s)},error:function(){var i="";if(e=="user"){i="user not found."}else if(e=="useralbum"){i="album or user not found."}Galleria.raise("Picasa request failed"+(i?": "+i:"."))},timeout:5e3});i.getJSON(t,function(i){l=i});return r},_getSizes:function(){var e=this,t={small:"72c",thumb:"104u",medium:"640u",big:"1024u",original:"1600u"},a=e.options,s={},r,l=[32,48,64,72,94,104,110,128,144,150,160,200,220,288,320,400,512,576,640,720,800,912,1024,1152,1280,1440,1600];i(["thumbSize","imageSize"]).each(function(){if(a[this]in t){s[this]=t[a[this]]}else{r=Galleria.utils.parseValue(a[this]);if(r>1600){r=1600}else{i.each(l,function(i){if(r<this){r=l[i-1];return false}})}s[this]=r}});return[s.thumbSize,s.imageSize,"1280u"]},_parse:function(e,t){var a=this,s=[],r;i.each(e,function(){r=this.media$group.media$thumbnail;s.push({thumb:r[0].url,image:r[1].url,big:r[2].url,title:this.summary.$t})});t.call(this,s)}};var t=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||typeof this._options.picasa!=="string"){t.apply(this,Galleria.utils.array(arguments));return}var a=this,s=Galleria.utils.array(arguments),r=this._options.picasa.split(":"),l,n=i.extend({},a._options.picasaOptions),u=typeof n.loader!=="undefined"?n.loader:i("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+e+"loader.gif) no-repeat 50% 50%"});if(r.length){if(typeof Galleria.Picasa.prototype[r[0]]!=="function"){Galleria.raise(r[0]+" method not found in Picasa plugin");return t.apply(this,s)}if(!r[1]){Galleria.raise("No picasa argument found");return t.apply(this,s)}window.setTimeout(function(){a.$("target").append(u)},100);l=new Galleria.Picasa;if(typeof a._options.picasaOptions==="object"){l.setOptions(a._options.picasaOptions)}var o=[];if(r[0]=="useralbum"){o=r[1].split("/");if(o.length!=2){Galleria.raise("Picasa useralbum not correctly formatted (should be [user]/[album])");return}}else{o.push(r[1])}o.push(function(i){a._data=i;u.remove();a.trigger(Galleria.DATA);l.options.complete.call(l,i)});l[r[0]].apply(l,o)}else{t.apply(this,s)}}}(jQuery);
(function($){Galleria.requires(1.25,"The Picasa Plugin requires Galleria version 1.2.5 or later.");var PATH=Galleria.utils.getScriptPath();Galleria.Picasa=function(){this.options={max:30,imageSize:"medium",thumbSize:"thumb",complete:function(){}}};Galleria.Picasa.prototype={constructor:Galleria.Picasa,search:function(phrase,callback){return this._call("search","all",{q:phrase},callback)},user:function(username,callback){return this._call("user","user/"+username,callback)},useralbum:function(username,album,callback){return this._call("useralbum","user/"+username+"/album/"+album,callback)},setOptions:function(options){$.extend(this.options,options);return this},_call:function(type,url,params,callback){url="https://picasaweb.google.com/data/feed/api/"+url+"?";if(typeof params=="function"){callback=params;params={}}var self=this;params=$.extend({kind:"photo",access:"public","max-results":this.options.max,thumbsize:this._getSizes().join(","),alt:"json-in-script",callback:"?"},params);$.each(params,function(key,value){url+="&"+key+"="+value});var data=false;Galleria.utils.wait({until:function(){return data},success:function(){self._parse.call(self,data.feed.entry,callback)},error:function(){var msg="";if(type=="user"){msg="user not found."}else if(type=="useralbum"){msg="album or user not found."}Galleria.raise("Picasa request failed"+(msg?": "+msg:"."))},timeout:5e3});$.getJSON(url,function(result){data=result});return self},_getSizes:function(){var self=this,norm={small:"72c",thumb:"104u",medium:"640u",big:"1024u",original:"1600u"},op=self.options,t={},n,sz=[32,48,64,72,94,104,110,128,144,150,160,200,220,288,320,400,512,576,640,720,800,912,1024,1152,1280,1440,1600];$(["thumbSize","imageSize"]).each(function(){if(op[this]in norm){t[this]=norm[op[this]]}else{n=Galleria.utils.parseValue(op[this]);if(n>1600){n=1600}else{$.each(sz,function(i){if(n<this){n=sz[i-1];return false}})}t[this]=n}});return[t.thumbSize,t.imageSize,"1280u"]},_parse:function(data,callback){var self=this,gallery=[],img;$.each(data,function(){img=this.media$group.media$thumbnail;gallery.push({thumb:img[0].url,image:img[1].url,big:img[2].url,title:this.summary.$t})});callback.call(this,gallery)}};var load=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||typeof this._options.picasa!=="string"){load.apply(this,Galleria.utils.array(arguments));return}var self=this,args=Galleria.utils.array(arguments),picasa=this._options.picasa.split(":"),p,opts=$.extend({},self._options.picasaOptions),loader=typeof opts.loader!=="undefined"?opts.loader:$("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+PATH+"loader.gif) no-repeat 50% 50%"});if(picasa.length){if(typeof Galleria.Picasa.prototype[picasa[0]]!=="function"){Galleria.raise(picasa[0]+" method not found in Picasa plugin");return load.apply(this,args)}if(!picasa[1]){Galleria.raise("No picasa argument found");return load.apply(this,args)}window.setTimeout(function(){self.$("target").append(loader)},100);p=new Galleria.Picasa;if(typeof self._options.picasaOptions==="object"){p.setOptions(self._options.picasaOptions)}var arg=[];if(picasa[0]=="useralbum"){arg=picasa[1].split("/");if(arg.length!=2){Galleria.raise("Picasa useralbum not correctly formatted (should be [user]/[album])");return}}else{arg.push(picasa[1])}arg.push(function(data){self._data=data;loader.remove();self.trigger(Galleria.DATA);p.options.complete.call(p,data)});p[picasa[0]].apply(p,arg)}else{load.apply(this,args)}}})(jQuery);

View File

@ -23,7 +23,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="../../galleria-1.4.2.min.js"></script>
<script src="../../galleria-1.4.7.min.js"></script>
<!-- load picasa plugin -->
<script src="galleria.picasa.min.js"></script>
@ -38,10 +38,10 @@
<div id="galleria"></div>
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
</div>
<script>
$(function() {
// Load the classic theme
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
@ -49,7 +49,7 @@
// The user & album. This example fetches the album "Demo" from the user "galleriajs"
picasa: 'useralbum:galleriajs/Demo'
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Galleria Classic Theme</title>
<style>
/* Demo styles */
html,body{background:#222;margin:0;}
body{border-top:4px solid #000;}
.content{color:#777;font:12px/1.4 "helvetica neue",arial,sans-serif;width:620px;margin:20px auto;}
h1{font-size:12px;font-weight:normal;color:#ddd;margin:0;}
p{margin:0 0 20px}
a {color:#22BCB9;text-decoration:none;}
.cred{margin-top:20px;font-size:11px;}
/* This rule is read by Galleria to define the gallery height: */
#galleria{height:320px}
</style>
</head>
<body>
<div class="content">
<h1>Galleria Classic Theme</h1>
<p>Demonstrating a basic gallery example.</p>
<!-- Adding gallery images. We use resized thumbnails here for better performance, but its not necessary -->
<div id="galleria">
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Biandintz_eta_zaldiak_-_modified2.jpg/800px-Biandintz_eta_zaldiak_-_modified2.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Biandintz_eta_zaldiak_-_modified2.jpg/100px-Biandintz_eta_zaldiak_-_modified2.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Biandintz_eta_zaldiak_-_modified2.jpg/1280px-Biandintz_eta_zaldiak_-_modified2.jpg"
data-title="Biandintz eta zaldiak"
data-description="Horses on Bianditz mountain, in Navarre, Spain."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/800px-Athabasca_Rail_at_Brule_Lake.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/100px-Athabasca_Rail_at_Brule_Lake.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/1280px-Athabasca_Rail_at_Brule_Lake.jpg"
data-title="Athabasca Rail"
data-description="The Athabasca River railroad track at the mouth of Brulé Lake in Alberta, Canada."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Back-scattering_crepuscular_rays_panorama_1.jpg/1280px-Back-scattering_crepuscular_rays_panorama_1.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Back-scattering_crepuscular_rays_panorama_1.jpg/100px-Back-scattering_crepuscular_rays_panorama_1.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Back-scattering_crepuscular_rays_panorama_1.jpg/1400px-Back-scattering_crepuscular_rays_panorama_1.jpg"
data-title="Back-scattering crepuscular rays"
data-description="Picture of the day on Wikimedia Commons 26 September 2010."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Interior_convento_3.jpg/800px-Interior_convento_3.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Interior_convento_3.jpg/120px-Interior_convento_3.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Interior_convento_3.jpg/1400px-Interior_convento_3.jpg"
data-title="Interior convento"
data-description="Interior view of Yuriria Convent, founded in 1550."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg/800px-Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg/100px-Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg/1280px-Oxbow_Bend_outlook_in_the_Grand_Teton_National_Park.jpg"
data-title="Oxbow Bend outlook"
data-description="View over the Snake River to the Mount Moran with the Skillet Glacier."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Hazy_blue_hour_in_Grand_Canyon.JPG/800px-Hazy_blue_hour_in_Grand_Canyon.JPG">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Hazy_blue_hour_in_Grand_Canyon.JPG/100px-Hazy_blue_hour_in_Grand_Canyon.JPG",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Hazy_blue_hour_in_Grand_Canyon.JPG/1280px-Hazy_blue_hour_in_Grand_Canyon.JPG"
data-title="Hazy blue hour"
data-description="Hazy blue hour in Grand Canyon. View from the South Rim."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/2909_vallon_moy_res.jpg/800px-2909_vallon_moy_res.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/2909_vallon_moy_res.jpg/100px-2909_vallon_moy_res.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/2909_vallon_moy_res.jpg/1280px-2909_vallon_moy_res.jpg"
data-title="Haute Severaisse valley"
data-description="View of Haute Severaisse valley and surrounding summits from the slopes of Les Vernets."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bohinjsko_jezero_2.jpg/800px-Bohinjsko_jezero_2.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bohinjsko_jezero_2.jpg/100px-Bohinjsko_jezero_2.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bohinjsko_jezero_2.jpg/1280px-Bohinjsko_jezero_2.jpg"
data-title="Bohinj lake"
data-description="Bohinj lake (Triglav National Park, Slovenia) in the morning."
>
</a>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Bowling_Balls_Beach_2_edit.jpg/800px-Bowling_Balls_Beach_2_edit.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Bowling_Balls_Beach_2_edit.jpg/100px-Bowling_Balls_Beach_2_edit.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Bowling_Balls_Beach_2_edit.jpg/1280px-Bowling_Balls_Beach_2_edit.jpg"
data-title="Bowling Balls"
data-description="Mendocino county, California, USA."
>
</a>
<a href="https://vimeo.com/25750735">
<span class="video">Works for vimeo too.</span>
</a>
<a href="https://www.youtube.com/watch?v=gAeYCJZ_meY">
<span class="video">Works for youtube too.</span>
</a>
</div>
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
</div>
<!-- load jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.4.7/galleria.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/galleria/1.4.7/themes/classic/galleria.classic.min.js"></script>
<script>
$(function() {
Galleria.run('#galleria');
});
</script>
</body>
</html>

View File

@ -23,7 +23,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="../../galleria-1.4.2.min.js"></script>
<script src="../../galleria-1.4.7.min.js"></script>
</head>
<body>
@ -106,19 +106,25 @@
data-description="Mendocino county, California, USA."
>
</a>
</div>
<a href="https://vimeo.com/25750735">
<span class="video">Works for vimeo too.</span>
</a>
<a href="https://www.youtube.com/watch?v=gAeYCJZ_meY">
<span class="video">Works for youtube too.</span>
</a>
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
</div>
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
</div>
<script>
$(function() {
// Load the classic theme
Galleria.loadTheme('galleria.classic.min.js');
// Initialize Galleria
Galleria.run('#galleria');
});
</script>
</body>
</html>

View File

@ -1,4 +1,12 @@
/* Galleria Classic Theme 2012-08-07 | https://raw.github.com/aino/galleria/master/LICENSE | (c) Aino */
/**
* Galleria Classic Theme 2016-09-03
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
#galleria-loader{height:1px!important}

View File

@ -1,9 +1,10 @@
/**
* Galleria Classic Theme 2012-08-08
* Galleria Classic Theme 2016-09-03
* http://galleria.io
*
* Copyright (c) 2010 - 2016 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/aino/galleria/master/LICENSE
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/

View File

@ -1 +1 @@
!function(i){Galleria.addTheme({name:"classic",author:"Galleria",css:"galleria.classic.css",defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:true},init:function(t){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 e=this.$("info-link,info-close,info-text"),s=Galleria.TOUCH;this.$("loader,counter").show().css("opacity",.4);if(!s){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(t._toggleInfo===true){e.bind("click:fast",function(){e.toggle()})}else{e.show();this.$("info-link, info-close").hide()}this.bind("thumbnail",function(t){if(!s){i(t.thumbTarget).css("opacity",.6).parent().hover(function(){i(this).not(".active").children().stop().fadeTo(100,1)},function(){i(this).not(".active").children().stop().fadeTo(400,.6)});if(t.index===this.getIndex()){i(t.thumbTarget).css("opacity",1)}}else{i(t.thumbTarget).css("opacity",this.getIndex()?1:.6).bind("click:fast",function(){i(this).css("opacity",1).parent().siblings().children().css("opacity",.6)})}});var n=function(t){i(t.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)};this.bind("loadstart",function(i){if(!i.cached){this.$("loader").show().fadeTo(200,.4)}window.setTimeout(function(){n(i)},s?300:0);this.$("info").toggle(this.hasInfo())});this.bind("loadfinish",function(i){this.$("loader").fadeOut(200)})}})}(jQuery);
(function($){Galleria.addTheme({name:"classic",author:"Galleria",css:"galleria.classic.css",defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:true},init:function(options){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 info=this.$("info-link,info-close,info-text"),touch=Galleria.TOUCH;this.$("loader,counter").show().css("opacity",.4);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})}if(options._toggleInfo===true){info.bind("click:fast",function(){info.toggle()})}else{info.show();this.$("info-link, info-close").hide()}this.bind("thumbnail",function(e){if(!touch){$(e.thumbTarget).css("opacity",.6).parent().hover(function(){$(this).not(".active").children().stop().fadeTo(100,1)},function(){$(this).not(".active").children().stop().fadeTo(400,.6)});if(e.index===this.getIndex()){$(e.thumbTarget).css("opacity",1)}}else{$(e.thumbTarget).css("opacity",this.getIndex()?1:.6).bind("click:fast",function(){$(this).css("opacity",1).parent().siblings().children().css("opacity",.6)})}});var activate=function(e){$(e.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)};this.bind("loadstart",function(e){if(!e.cached){this.$("loader").show().fadeTo(200,.4)}window.setTimeout(function(){activate(e)},touch?300:0);this.$("info").toggle(this.hasInfo())});this.bind("loadfinish",function(e){this.$("loader").fadeOut(200)})}})})(jQuery);

View File

@ -25,7 +25,8 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="site_69553_1_29.css">
<!-- DE QUOI AFFICHER LES PHOTOS -->
<script src="galleria/galleria-1.4.2.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="galleria/galleria-1.4.7.min.js"></script>
<style>
.galleria{ width:100% }
.galleria-theme-classic { background: #aaaaaa}
@ -33,8 +34,6 @@
</head>
<body class="">
<script src="jquery-3.1.1.min.js"></script>
<!-- BANDEAU DE TITRE -->
<header class="bk-header">

4
jquery-3.1.1.min.js vendored

File diff suppressed because one or more lines are too long