included gallery
few new style elements fixed background placed kontact
This commit is contained in:
parent
38ef2f99e4
commit
5fa1ec24ec
@ -14,25 +14,79 @@ body{
|
|||||||
}
|
}
|
||||||
|
|
||||||
#main{
|
#main{
|
||||||
background-color: goldenrod;
|
|
||||||
width: 1300px;
|
width: 1300px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
height: 730px;
|
height: 730px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: 3px 3px 3px #000;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#static {
|
#static {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content {
|
#frame_content {
|
||||||
|
float: left;
|
||||||
|
background: url(http://mojotrollz.eu/web/friseurteam/api.php?call=files&cat=page&id=mainframe_background_overlay.png) ;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
width: 1250px;
|
||||||
|
text-shadow: #62005a 3px 3px 5px;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 3px 3px 3px #000;
|
||||||
|
}
|
||||||
|
#content{
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#menu {
|
||||||
|
width: 550px;
|
||||||
|
/* position: absolute;
|
||||||
|
left: 100px;
|
||||||
|
top: 100px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
#info {
|
||||||
|
width: 25%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu {
|
#menu_1{
|
||||||
position: absolute;
|
margin-left: 75px;
|
||||||
left: 100px;
|
background: white;
|
||||||
top: 100px;
|
border-radius: 10px;
|
||||||
|
padding: 3px;
|
||||||
|
width: 100px;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
#menu_2{
|
||||||
|
margin-left: 50px;
|
||||||
|
background: greenyellow;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 3px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
#menu_3{
|
||||||
|
margin-left: 3px;
|
||||||
|
background: darkviolet;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 3px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
#menu_4{
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 3px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
#logo {
|
||||||
|
float: left;
|
||||||
|
width: 70%;
|
||||||
|
background: url(http://mojotrollz.eu/web/friseurteam/api.php?call=files&cat=page&id=style_overlay.png);
|
||||||
|
}
|
||||||
|
#galleria {
|
||||||
|
float: right;
|
||||||
|
padding-right: 20px;
|
||||||
|
height: 400px;
|
||||||
|
width: 400px;
|
||||||
}
|
}
|
||||||
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
class default_page extends SYSTEM\PAGE\Page {
|
class default_page extends SYSTEM\PAGE\Page {
|
||||||
public static function js(){
|
public static function js(){
|
||||||
return '<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PLIB(),'jquery/jquery-1.9.1.min.js').'"></script>
|
return '<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PLIB(),'jquery/jquery-1.9.1.min.js').'"></script>'.
|
||||||
<script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script>
|
// <script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script>
|
||||||
<script type="text/javascript" src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
|
// <script type="text/javascript" src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
|
||||||
<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/default_page.js').'"></script>';
|
'<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/js/galleria/galleria-1.2.9.min.js').'"></script>'.
|
||||||
|
' <script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/default_page.js').'"></script>';
|
||||||
}
|
}
|
||||||
public function html() {
|
public function html() {
|
||||||
$vars = array();
|
$vars = array();
|
||||||
|
|||||||
@ -7,20 +7,33 @@
|
|||||||
${css}
|
${css}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="body_frame">
|
||||||
<div id="logo"><img src="./api.php?call=files&cat=page&id=header_friseurteam.png"></div>
|
<div id="logo"><img src="./api.php?call=files&cat=page&id=header_friseurteam.png"></div>
|
||||||
<div id="menu">
|
<div id="info"><font face="Verdana" color="white">${friseurteam_kontakt_info}</font></div>
|
||||||
<a href="">Friseur-Team</a><br/>
|
|
||||||
<a href="">Das Team</a><br/>
|
|
||||||
<a href="">Galerie</a><br/>
|
|
||||||
<a href="">Preise</a>
|
|
||||||
</div>
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div id="content">abcd</div>
|
<div id="menu">
|
||||||
<div id="static">
|
<font face="arial">
|
||||||
<div id="contact">${friseurteam_info}</div>
|
<div id="menu_1"><a href="#">Friseur-Team</a></div>
|
||||||
<div id="gallery">${default_gallery}</div>
|
<div id="menu_2"><a href="#">Das Team</a></div>
|
||||||
|
<div id="menu_3"><a href="#">Galerie</a></div>
|
||||||
|
<div id="menu_4"><a href="#">Preise</a></div>
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
<div id="frame_content">
|
||||||
|
<div id="content">
|
||||||
|
<font color="white" face="verdana">
|
||||||
|
<h4>Willkommen</h4>
|
||||||
|
<p>Herzlich Willkommen auf der Webseite des Fiseurteams Angelika Gabriel.</p>
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
<div id="galleria">${default_gallery}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer"><p>Friseur Team, © <a href="http://www.webcraft-media.de" target="_blank">WebCraft Media</a> 2014</p></div>
|
<div id="footer"><p>Friseur Team, © <a href="http://www.webcraft-media.de" target="_blank">WebCraft Media</a> 2014</p></div>
|
||||||
</body>
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
21
friseurteam/page/default_page/js/galleria/LICENSE
Normal file
21
friseurteam/page/default_page/js/galleria/LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2012 Aino http://aino.se
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
6121
friseurteam/page/default_page/js/galleria/galleria-1.2.9.js
Normal file
6121
friseurteam/page/default_page/js/galleria/galleria-1.2.9.js
Normal file
File diff suppressed because it is too large
Load Diff
3
friseurteam/page/default_page/js/galleria/galleria-1.2.9.min.js
vendored
Normal file
3
friseurteam/page/default_page/js/galleria/galleria-1.2.9.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Galleria Flickr Plugin</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>
|
||||||
|
|
||||||
|
<!-- load jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||||||
|
|
||||||
|
<!-- load Galleria -->
|
||||||
|
<script src="../../galleria-1.2.9.min.js"></script>
|
||||||
|
|
||||||
|
<!-- load flickr plugin -->
|
||||||
|
<script src="galleria.flickr.min.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="content">
|
||||||
|
<h1>Galleria Flickr Plugin Demo</h1>
|
||||||
|
<p>Demonstrating a basic gallery example with a Flickr search.</p>
|
||||||
|
|
||||||
|
<!-- Adding gallery images. This is just a container for the dynamic flickr images -->
|
||||||
|
|
||||||
|
<div id="galleria"></div>
|
||||||
|
|
||||||
|
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
|
||||||
|
<a href="#" id="close">cloase</a>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Load the classic theme
|
||||||
|
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
|
||||||
|
|
||||||
|
// Initialize Galleria
|
||||||
|
Galleria.run('#galleria', {
|
||||||
|
|
||||||
|
// search flickr for "galleria"
|
||||||
|
flickr: 'search:galleria',
|
||||||
|
|
||||||
|
flickrOptions: {
|
||||||
|
// sort by interestingness
|
||||||
|
sort: 'interestingness-desc'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,383 @@
|
|||||||
|
/**
|
||||||
|
* Galleria Flickr Plugin 2012-09-04
|
||||||
|
* http://galleria.io
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license
|
||||||
|
* https://raw.github.com/aino/galleria/master/LICENSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
/*global jQuery, Galleria, window */
|
||||||
|
|
||||||
|
Galleria.requires(1.25, 'The Flickr Plugin requires Galleria version 1.2.5 or later.');
|
||||||
|
|
||||||
|
// The script path
|
||||||
|
var PATH = Galleria.utils.getScriptPath();
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
@class
|
||||||
|
@constructor
|
||||||
|
|
||||||
|
@example var flickr = new Galleria.Flickr();
|
||||||
|
|
||||||
|
@author http://aino.se
|
||||||
|
|
||||||
|
@requires jQuery
|
||||||
|
@requires Galleria
|
||||||
|
|
||||||
|
@param {String} [api_key] Flickr API key to be used, defaults to the Galleria key
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
Galleria.Flickr = function( api_key ) {
|
||||||
|
|
||||||
|
this.api_key = api_key || '2a2ce06c15780ebeb0b706650fc890b2';
|
||||||
|
|
||||||
|
this.options = {
|
||||||
|
max: 30, // photos to return
|
||||||
|
imageSize: 'medium', // photo size ( thumb,small,medium,big,original )
|
||||||
|
thumbSize: 'thumb', // thumbnail size ( thumb,small,medium,big,original )
|
||||||
|
sort: 'interestingness-desc', // sort option ( date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, relevance )
|
||||||
|
description: false, // set this to true to get description as caption
|
||||||
|
complete: function(){}, // callback to be called inside the Galleria.prototype.load
|
||||||
|
backlink: false // set this to true if you want to pass a link back to the original image
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
Galleria.Flickr.prototype = {
|
||||||
|
|
||||||
|
// bring back the constructor reference
|
||||||
|
|
||||||
|
constructor: Galleria.Flickr,
|
||||||
|
|
||||||
|
/**
|
||||||
|
Search for anything at Flickr
|
||||||
|
|
||||||
|
@param {String} phrase The string to search for
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
search: function( phrase, callback ) {
|
||||||
|
return this._find({
|
||||||
|
text: phrase
|
||||||
|
}, callback );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Search for anything at Flickr by tag
|
||||||
|
|
||||||
|
@param {String} tag The tag(s) to search for
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
tags: function( tag, callback ) {
|
||||||
|
return this._find({
|
||||||
|
tags: tag
|
||||||
|
}, callback);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get a user's public photos
|
||||||
|
|
||||||
|
@param {String} username The username as shown in the URL to fetch
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get photos from a photoset by ID
|
||||||
|
|
||||||
|
@param {String|Number} photoset_id The photoset id to fetch
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
set: function( photoset_id, callback ) {
|
||||||
|
return this._find({
|
||||||
|
photoset_id: photoset_id,
|
||||||
|
method: 'flickr.photosets.getPhotos'
|
||||||
|
}, callback);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get photos from a gallery by ID
|
||||||
|
|
||||||
|
@param {String|Number} gallery_id The gallery id to fetch
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
gallery: function( gallery_id, callback ) {
|
||||||
|
return this._find({
|
||||||
|
gallery_id: gallery_id,
|
||||||
|
method: 'flickr.galleries.getPhotos'
|
||||||
|
}, callback);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Search groups and fetch photos from the first group found
|
||||||
|
Useful if you know the exact name of a group and want to show the groups photos.
|
||||||
|
|
||||||
|
@param {String} group The group name to search for
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
groupsearch: function( group, callback ) {
|
||||||
|
return this._call({
|
||||||
|
text: group,
|
||||||
|
method: 'flickr.groups.search'
|
||||||
|
}, function( data ) {
|
||||||
|
this.group( data.groups.group[0].nsid, callback );
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get photos from a group by ID
|
||||||
|
|
||||||
|
@param {String} group_id The group id to fetch
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
group: function ( group_id, callback ) {
|
||||||
|
return this._find({
|
||||||
|
group_id: group_id,
|
||||||
|
method: 'flickr.groups.pools.getPhotos'
|
||||||
|
}, callback );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set flickr options
|
||||||
|
|
||||||
|
@param {Object} options The options object to blend
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
setOptions: function( options ) {
|
||||||
|
$.extend(this.options, options);
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// call Flickr and raise errors
|
||||||
|
|
||||||
|
_call: function( params, callback ) {
|
||||||
|
|
||||||
|
var url = 'http://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;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// "hidden" way of getting a big image (~1024) from flickr
|
||||||
|
|
||||||
|
_getBig: function( photo ) {
|
||||||
|
|
||||||
|
if ( photo.url_l ) {
|
||||||
|
return photo.url_l;
|
||||||
|
} else if ( parseInt( photo.width_o, 10 ) > 1280 ) {
|
||||||
|
|
||||||
|
return 'http://farm'+photo.farm + '.static.flickr.com/'+photo.server +
|
||||||
|
'/' + photo.id + '_' + photo.secret + '_b.jpg';
|
||||||
|
}
|
||||||
|
|
||||||
|
return photo.url_o || photo.url_z || photo.url_m;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// get image size by option name
|
||||||
|
|
||||||
|
_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;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// ask flickr for photos, parse the result and call the callback with the galleria-ready data array
|
||||||
|
|
||||||
|
_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 ? 'http://flickr.com/photos/' + photo.owner + '/' + photo.id : ''
|
||||||
|
});
|
||||||
|
}
|
||||||
|
callback.call( this, gallery );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Galleria modifications
|
||||||
|
We fake-extend the load prototype to make Flickr integration as simple as possible
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// save the old prototype in a local variable
|
||||||
|
|
||||||
|
var load = Galleria.prototype.load;
|
||||||
|
|
||||||
|
|
||||||
|
// fake-extend the load prototype using the flickr data
|
||||||
|
|
||||||
|
Galleria.prototype.load = function() {
|
||||||
|
|
||||||
|
// pass if no data is provided or flickr option not found
|
||||||
|
if ( arguments.length || typeof this._options.flickr !== 'string' ) {
|
||||||
|
load.apply( this, Galleria.utils.array( arguments ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// define some local vars
|
||||||
|
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: 0.7,
|
||||||
|
background:'#000 url('+PATH+'loader.gif) no-repeat 50% 50%'
|
||||||
|
});
|
||||||
|
|
||||||
|
if ( flickr.length ) {
|
||||||
|
|
||||||
|
// validate the method
|
||||||
|
if ( typeof Galleria.Flickr.prototype[ flickr[0] ] !== 'function' ) {
|
||||||
|
Galleria.raise( flickr[0] + ' method not found in Flickr plugin' );
|
||||||
|
return load.apply( this, args );
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate the argument
|
||||||
|
if ( !flickr[1] ) {
|
||||||
|
Galleria.raise( 'No flickr argument found' );
|
||||||
|
return load.apply( this, args );
|
||||||
|
}
|
||||||
|
|
||||||
|
// apply the preloader
|
||||||
|
window.setTimeout(function() {
|
||||||
|
self.$( 'target' ).append( loader );
|
||||||
|
},100);
|
||||||
|
|
||||||
|
// create the instance
|
||||||
|
f = new Galleria.Flickr();
|
||||||
|
|
||||||
|
// apply Flickr options
|
||||||
|
if ( typeof self._options.flickrOptions === 'object' ) {
|
||||||
|
f.setOptions( self._options.flickrOptions );
|
||||||
|
}
|
||||||
|
|
||||||
|
// call the flickr method and trigger the DATA event
|
||||||
|
f[ flickr[0] ]( flickr[1], function( data ) {
|
||||||
|
|
||||||
|
self._data = data;
|
||||||
|
loader.remove();
|
||||||
|
self.trigger( Galleria.DATA );
|
||||||
|
f.options.complete.call(f, data);
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// if flickr array not found, pass
|
||||||
|
load.apply( this, args );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}( jQuery ) );
|
||||||
1
friseurteam/page/default_page/js/galleria/plugins/flickr/galleria.flickr.min.js
vendored
Normal file
1
friseurteam/page/default_page/js/galleria/plugins/flickr/galleria.flickr.min.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
(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="http://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"http://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?"http://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);
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,146 @@
|
|||||||
|
/**
|
||||||
|
* Galleria History Plugin 2012-04-04
|
||||||
|
* http://galleria.io
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license
|
||||||
|
* https://raw.github.com/aino/galleria/master/LICENSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function( $, window ) {
|
||||||
|
|
||||||
|
/*global jQuery, Galleria, 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
// always remove support if IE < 8
|
||||||
|
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 ));
|
||||||
|
|
||||||
1
friseurteam/page/default_page/js/galleria/plugins/history/galleria.history.min.js
vendored
Normal file
1
friseurteam/page/default_page/js/galleria/plugins/history/galleria.history.min.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
(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);
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Galleria History Plugin</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>
|
||||||
|
|
||||||
|
<!-- load jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||||||
|
|
||||||
|
<!-- load Galleria -->
|
||||||
|
<script src="../../galleria-1.2.9.min.js"></script>
|
||||||
|
|
||||||
|
<!-- load the History plugin, no need for further scripting -->
|
||||||
|
<script src="galleria.history.min.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="content">
|
||||||
|
<h1>Galleria History Plugin</h1>
|
||||||
|
<p>Demonstrating a basic history example. Supports most browsers, including FF 3.0+ and IE 7+</p>
|
||||||
|
|
||||||
|
<!-- Adding gallery images. We use resized thumbnails here for better performance, but it’s not necessary -->
|
||||||
|
|
||||||
|
<div id="galleria">
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Locomotives-Roundhouse2.jpg/800px-Locomotives-Roundhouse2.jpg">
|
||||||
|
<img title="Locomotives Roundhouse"
|
||||||
|
alt="Steam locomotives of the Chicago & North Western Railway."
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Locomotives-Roundhouse2.jpg/100px-Locomotives-Roundhouse2.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Icebergs_in_the_High_Arctic_-_20050907.jpg/1000px-Icebergs_in_the_High_Arctic_-_20050907.jpg">
|
||||||
|
<img title="Icebergs in the High Arctic"
|
||||||
|
alt="”The debris loading isn't particularly extensive, but the color is usual.”"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Icebergs_in_the_High_Arctic_-_20050907.jpg/100px-Icebergs_in_the_High_Arctic_-_20050907.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg/1000px-Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg">
|
||||||
|
<img title="Araña"
|
||||||
|
alt="Xysticus cristatus, A Estrada, Galicia, Spain"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg/100px-Ara%C3%B1a._A_Estrada%2C_Galiza._02.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg/1000px-9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg">
|
||||||
|
<img title="Museo storia naturale"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg/100px-9104_-_Milano_-_Museo_storia_naturale_-_Fluorite_-_Foto_Giovanni_Dall%27Orto_22-Apr-2007.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg/1000px-Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg">
|
||||||
|
<img title="Grjótagjá caves in summer 2009"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg/100px-Grj%C3%B3tagj%C3%A1_caves_in_summer_2009_%282%29.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg/1000px-20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg">
|
||||||
|
<img title="Thermes"
|
||||||
|
alt="Xanthi hot-spa springs, Xanthi Prefecture, Greece"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg/100px-20091128_Loutra_Thermes_Xanthi_Thrace_Greece_2.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Polish_Army_Ko%C5%82obrzeg_077.JPG/1024px-Polish_Army_Ko%C5%82obrzeg_077.JPG">
|
||||||
|
<img title="Polish Army Kołobrzeg"
|
||||||
|
alt="A display of the Polish Army. Both the soldier, and the vehicle belong to the 7th Pomeranian Coastal Defence Brigade, a part of the Szczecin-based 12th Mechanized Division ”Bolesław Krzywousty”"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Polish_Army_Ko%C5%82obrzeg_077.JPG/100px-Polish_Army_Ko%C5%82obrzeg_077.JPG">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/20100213_Zlatograd_Bulgaria_3.jpg/1024px-20100213_Zlatograd_Bulgaria_3.jpg">
|
||||||
|
<img title="Zlatograd Bulgaria"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/20100213_Zlatograd_Bulgaria_3.jpg/100px-20100213_Zlatograd_Bulgaria_3.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg/1024px-FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg">
|
||||||
|
<img title="09-28-2001 in New York City"
|
||||||
|
alt="New York, NY, September 28, 2001 -- Debris on surrounding roofs at the site of the World Trade Center. Photo by Andrea Booher/ FEMA News Photo"
|
||||||
|
src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg/100px-FEMA_-_5399_-_Photograph_by_Andrea_Booher_taken_on_09-28-2001_in_New_York.jpg">
|
||||||
|
</a>
|
||||||
|
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/1024px-Antennae%2C_Hubble_images.jpg">
|
||||||
|
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Antennae%2C_Hubble_images.jpg/100px-Antennae%2C_Hubble_images.jpg">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Load the classic theme
|
||||||
|
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
|
||||||
|
|
||||||
|
// Initialize Galleria
|
||||||
|
Galleria.run('#galleria');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,320 @@
|
|||||||
|
/**
|
||||||
|
* Galleria Picasa Plugin 2012-04-04
|
||||||
|
* http://galleria.io
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license
|
||||||
|
* https://raw.github.com/aino/galleria/master/LICENSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
/*global jQuery, Galleria, window */
|
||||||
|
|
||||||
|
Galleria.requires(1.25, 'The Picasa Plugin requires Galleria version 1.2.5 or later.');
|
||||||
|
|
||||||
|
// The script path
|
||||||
|
var PATH = Galleria.utils.getScriptPath();
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
@class
|
||||||
|
@constructor
|
||||||
|
|
||||||
|
@example var picasa = new Galleria.Picasa();
|
||||||
|
|
||||||
|
@author http://aino.se
|
||||||
|
|
||||||
|
@requires jQuery
|
||||||
|
@requires Galleria
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
Galleria.Picasa = function() {
|
||||||
|
|
||||||
|
this.options = {
|
||||||
|
max: 30, // photos to return
|
||||||
|
imageSize: 'medium', // photo size ( thumb,small,medium,big,original ) or a number
|
||||||
|
thumbSize: 'thumb', // thumbnail size ( thumb,small,medium,big,original ) or a number
|
||||||
|
complete: function(){} // callback to be called inside the Galleria.prototype.load
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
Galleria.Picasa.prototype = {
|
||||||
|
|
||||||
|
// bring back the constructor reference
|
||||||
|
|
||||||
|
constructor: Galleria.Picasa,
|
||||||
|
|
||||||
|
/**
|
||||||
|
Search for anything at Picasa
|
||||||
|
|
||||||
|
@param {String} phrase The string to search for
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
search: function( phrase, callback ) {
|
||||||
|
return this._call( 'search', 'all', {
|
||||||
|
q: phrase
|
||||||
|
}, callback );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get a user's public photos
|
||||||
|
|
||||||
|
@param {String} username The username to fetch photos from
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
user: function( username, callback ) {
|
||||||
|
return this._call( 'user', 'user/' + username, callback );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get photos from an album
|
||||||
|
|
||||||
|
@param {String} username The username that owns the album
|
||||||
|
@param {String} album The album ID
|
||||||
|
@param {Function} [callback] The callback to be called when the data is ready
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
useralbum: function( username, album, callback ) {
|
||||||
|
return this._call( 'useralbum', 'user/' + username + '/album/' + album, callback );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set picasa options
|
||||||
|
|
||||||
|
@param {Object} options The options object to blend
|
||||||
|
|
||||||
|
@returns Instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
setOptions: function( options ) {
|
||||||
|
$.extend(this.options, options);
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// call Picasa
|
||||||
|
|
||||||
|
_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;
|
||||||
|
});
|
||||||
|
|
||||||
|
// since Picasa throws 404 when the call is malformed, we must set a timeout here:
|
||||||
|
|
||||||
|
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: 5000
|
||||||
|
});
|
||||||
|
|
||||||
|
$.getJSON( url, function( result ) {
|
||||||
|
data = result;
|
||||||
|
});
|
||||||
|
|
||||||
|
return self;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// parse image sizes and return an array of three
|
||||||
|
|
||||||
|
_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 the result and call the callback with the galleria-ready data array
|
||||||
|
|
||||||
|
_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 );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Galleria modifications
|
||||||
|
We fake-extend the load prototype to make Picasa integration as simple as possible
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// save the old prototype in a local variable
|
||||||
|
|
||||||
|
var load = Galleria.prototype.load;
|
||||||
|
|
||||||
|
|
||||||
|
// fake-extend the load prototype using the picasa data
|
||||||
|
|
||||||
|
Galleria.prototype.load = function() {
|
||||||
|
|
||||||
|
// pass if no data is provided or picasa option not found
|
||||||
|
if ( arguments.length || typeof this._options.picasa !== 'string' ) {
|
||||||
|
load.apply( this, Galleria.utils.array( arguments ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// define some local vars
|
||||||
|
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: 0.7,
|
||||||
|
background:'#000 url('+PATH+'loader.gif) no-repeat 50% 50%'
|
||||||
|
});
|
||||||
|
|
||||||
|
if ( picasa.length ) {
|
||||||
|
|
||||||
|
// validate the method
|
||||||
|
if ( typeof Galleria.Picasa.prototype[ picasa[0] ] !== 'function' ) {
|
||||||
|
Galleria.raise( picasa[0] + ' method not found in Picasa plugin' );
|
||||||
|
return load.apply( this, args );
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate the argument
|
||||||
|
if ( !picasa[1] ) {
|
||||||
|
Galleria.raise( 'No picasa argument found' );
|
||||||
|
return load.apply( this, args );
|
||||||
|
}
|
||||||
|
|
||||||
|
// apply the preloader
|
||||||
|
window.setTimeout(function() {
|
||||||
|
self.$( 'target' ).append( loader );
|
||||||
|
},100);
|
||||||
|
|
||||||
|
// create the instance
|
||||||
|
p = new Galleria.Picasa();
|
||||||
|
|
||||||
|
// apply Flickr options
|
||||||
|
if ( typeof self._options.picasaOptions === 'object' ) {
|
||||||
|
p.setOptions( self._options.picasaOptions );
|
||||||
|
}
|
||||||
|
|
||||||
|
// call the picasa method and trigger the DATA event
|
||||||
|
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 {
|
||||||
|
|
||||||
|
// if flickr array not found, pass
|
||||||
|
load.apply( this, args );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}( jQuery ) );
|
||||||
1
friseurteam/page/default_page/js/galleria/plugins/picasa/galleria.picasa.min.js
vendored
Normal file
1
friseurteam/page/default_page/js/galleria/plugins/picasa/galleria.picasa.min.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
(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);
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Galleria Flickr Plugin</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>
|
||||||
|
|
||||||
|
<!-- load jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||||||
|
|
||||||
|
<!-- load Galleria -->
|
||||||
|
<script src="../../galleria-1.2.9.min.js"></script>
|
||||||
|
|
||||||
|
<!-- load picasa plugin -->
|
||||||
|
<script src="galleria.picasa.min.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="content">
|
||||||
|
<h1>Galleria Picasa Plugin Demo</h1>
|
||||||
|
<p>Demonstrating a basic gallery example with photos from a Picasa album.</p>
|
||||||
|
|
||||||
|
<!-- Adding gallery images. This is just a container for the dynamic picasa images -->
|
||||||
|
|
||||||
|
<div id="galleria"></div>
|
||||||
|
|
||||||
|
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Load the classic theme
|
||||||
|
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
|
||||||
|
|
||||||
|
Galleria.run('#galleria', {
|
||||||
|
// The user & album. This example fetches the album "Demo" from the user "galleriajs"
|
||||||
|
picasa: 'useralbum:galleriajs/Demo'
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -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>
|
||||||
|
|
||||||
|
<!-- load jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||||||
|
|
||||||
|
<!-- load Galleria -->
|
||||||
|
<script src="../../galleria-1.2.9.min.js"></script>
|
||||||
|
|
||||||
|
</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 it’s 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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="cred">Made by <a href="http://galleria.aino.se">Galleria</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Load the classic theme
|
||||||
|
Galleria.loadTheme('galleria.classic.min.js');
|
||||||
|
|
||||||
|
// Initialize Galleria
|
||||||
|
Galleria.run('#galleria');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,217 @@
|
|||||||
|
/* Galleria Classic Theme 2012-08-07 | https://raw.github.com/aino/galleria/master/LICENSE | (c) Aino */
|
||||||
|
|
||||||
|
#galleria-loader{height:1px!important}
|
||||||
|
|
||||||
|
.galleria-container {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
.galleria-container img {
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-o-user-select: none;
|
||||||
|
}
|
||||||
|
.galleria-stage {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
bottom: 60px;
|
||||||
|
left: 10px;
|
||||||
|
right: 10px;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.galleria-thumbnails-container {
|
||||||
|
height: 50px;
|
||||||
|
bottom: 0;
|
||||||
|
position: absolute;
|
||||||
|
left: 10px;
|
||||||
|
right: 10px;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.galleria-carousel .galleria-thumbnails-list {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
.galleria-thumbnails .galleria-image {
|
||||||
|
height: 40px;
|
||||||
|
width: 60px;
|
||||||
|
background: #000;
|
||||||
|
margin: 0 5px 0 0;
|
||||||
|
border: 1px solid #000;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.galleria-counter {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 10px;
|
||||||
|
text-align: right;
|
||||||
|
color: #fff;
|
||||||
|
font: normal 11px/1 arial,sans-serif;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.galleria-loader {
|
||||||
|
background: #000;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
z-index: 2;
|
||||||
|
display: none;
|
||||||
|
background: url(classic-loader.gif) no-repeat 2px 2px;
|
||||||
|
}
|
||||||
|
.galleria-info {
|
||||||
|
width: 50%;
|
||||||
|
top: 15px;
|
||||||
|
left: 15px;
|
||||||
|
z-index: 2;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.galleria-info-text {
|
||||||
|
background-color: #000;
|
||||||
|
padding: 12px;
|
||||||
|
display: none;
|
||||||
|
/* IE7 */ zoom:1;
|
||||||
|
}
|
||||||
|
.galleria-info-title {
|
||||||
|
font: bold 12px/1.1 arial,sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
|
.galleria-info-description {
|
||||||
|
font: italic 12px/1.4 georgia,serif;
|
||||||
|
margin: 0;
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
.galleria-info-close {
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
background-position: -753px -11px;
|
||||||
|
opacity: .5;
|
||||||
|
filter: alpha(opacity=50);
|
||||||
|
cursor: pointer;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.notouch .galleria-info-close:hover{
|
||||||
|
opacity:1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.touch .galleria-info-close:active{
|
||||||
|
opacity:1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.galleria-info-link {
|
||||||
|
background-position: -669px -5px;
|
||||||
|
opacity: .7;
|
||||||
|
filter: alpha(opacity=70);
|
||||||
|
position: absolute;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
.notouch .galleria-info-link:hover {
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.touch .galleria-info-link:active {
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.galleria-image-nav {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -62px;
|
||||||
|
width: 100%;
|
||||||
|
height: 62px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.galleria-image-nav-left,
|
||||||
|
.galleria-image-nav-right {
|
||||||
|
opacity: .3;
|
||||||
|
filter: alpha(opacity=30);
|
||||||
|
cursor: pointer;
|
||||||
|
width: 62px;
|
||||||
|
height: 124px;
|
||||||
|
position: absolute;
|
||||||
|
left: 10px;
|
||||||
|
z-index: 2;
|
||||||
|
background-position: 0 46px;
|
||||||
|
}
|
||||||
|
.galleria-image-nav-right {
|
||||||
|
left: auto;
|
||||||
|
right: 10px;
|
||||||
|
background-position: -254px 46px;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.notouch .galleria-image-nav-left:hover,
|
||||||
|
.notouch .galleria-image-nav-right:hover {
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.touch .galleria-image-nav-left:active,
|
||||||
|
.touch .galleria-image-nav-right:active {
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.galleria-thumb-nav-left,
|
||||||
|
.galleria-thumb-nav-right {
|
||||||
|
cursor: pointer;
|
||||||
|
display: none;
|
||||||
|
background-position: -495px 5px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 40px;
|
||||||
|
width: 23px;
|
||||||
|
z-index: 3;
|
||||||
|
opacity: .8;
|
||||||
|
filter: alpha(opacity=80);
|
||||||
|
}
|
||||||
|
.galleria-thumb-nav-right {
|
||||||
|
background-position: -578px 5px;
|
||||||
|
border-right: none;
|
||||||
|
right: 0;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
.galleria-thumbnails-container .disabled {
|
||||||
|
opacity: .2;
|
||||||
|
filter: alpha(opacity=20);
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.notouch .galleria-thumb-nav-left:hover,
|
||||||
|
.notouch .galleria-thumb-nav-right:hover {
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
background-color: #111;
|
||||||
|
}
|
||||||
|
.touch .galleria-thumb-nav-left:active,
|
||||||
|
.touch .galleria-thumb-nav-right:active {
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
background-color: #111;
|
||||||
|
}
|
||||||
|
.notouch .galleria-thumbnails-container .disabled:hover {
|
||||||
|
opacity: .2;
|
||||||
|
filter: alpha(opacity=20);
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.galleria-carousel .galleria-thumb-nav-left,
|
||||||
|
.galleria-carousel .galleria-thumb-nav-right {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.galleria-thumb-nav-left,
|
||||||
|
.galleria-thumb-nav-right,
|
||||||
|
.galleria-info-link,
|
||||||
|
.galleria-info-close,
|
||||||
|
.galleria-image-nav-left,
|
||||||
|
.galleria-image-nav-right {
|
||||||
|
background-image: url(classic-map.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
/**
|
||||||
|
* Galleria Classic Theme 2012-08-08
|
||||||
|
* http://galleria.io
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license
|
||||||
|
* https://raw.github.com/aino/galleria/master/LICENSE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
/*global jQuery, Galleria */
|
||||||
|
|
||||||
|
Galleria.addTheme({
|
||||||
|
name: 'classic',
|
||||||
|
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.28, 'This version of Classic theme requires Galleria 1.2.8 or later');
|
||||||
|
|
||||||
|
// add some elements
|
||||||
|
this.addElement('info-link','info-close');
|
||||||
|
this.append({
|
||||||
|
'info' : ['info-link','info-close']
|
||||||
|
});
|
||||||
|
|
||||||
|
// cache some stuff
|
||||||
|
var info = this.$('info-link,info-close,info-text'),
|
||||||
|
touch = Galleria.TOUCH,
|
||||||
|
click = touch ? 'touchstart' : 'click';
|
||||||
|
|
||||||
|
// 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, function() {
|
||||||
|
info.toggle();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
info.show();
|
||||||
|
this.$('info-link, info-close').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.bind('loadstart', function(e) {
|
||||||
|
if (!e.cached) {
|
||||||
|
this.$('loader').show().fadeTo(200, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$('info').toggle( this.hasInfo() );
|
||||||
|
|
||||||
|
$(e.thumbTarget).css('opacity',1).parent().siblings().children().css('opacity', 0.6);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.bind('loadfinish', function(e) {
|
||||||
|
this.$('loader').fadeOut(200);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}(jQuery));
|
||||||
1
friseurteam/page/default_page/js/galleria/themes/classic/galleria.classic.min.js
vendored
Normal file
1
friseurteam/page/default_page/js/galleria/themes/classic/galleria.classic.min.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
(function($){Galleria.addTheme({name:"classic",author:"Galleria",css:"galleria.classic.css",defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:true},init:function(options){Galleria.requires(1.28,"This version of Classic theme requires Galleria 1.2.8 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,click=touch?"touchstart":"click";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,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)}});this.bind("loadstart",function(e){if(!e.cached){this.$("loader").show().fadeTo(200,.4)}this.$("info").toggle(this.hasInfo());$(e.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)});this.bind("loadfinish",function(e){this.$("loader").fadeOut(200)})}})})(jQuery);
|
||||||
@ -18,7 +18,7 @@ class saimod_webcraft_gallery extends \SYSTEM\SAI\SaiModule {
|
|||||||
$result = '';
|
$result = '';
|
||||||
while($img = $gallery->next()){
|
while($img = $gallery->next()){
|
||||||
$result .= '<img class="carousel-img" src="./api.php?call=files&cat='.$img['file_cat'].'&id='.$img['file_id'].'" alt="">';}
|
$result .= '<img class="carousel-img" src="./api.php?call=files&cat='.$img['file_cat'].'&id='.$img['file_id'].'" alt="">';}
|
||||||
$result .= '<script>Galleria.loadTheme(\'rhein/page/default_page/js/galleria/themes/classic/galleria.classic.min.js\');Galleria.run(\'#galleria\');</script>';
|
$result .= '<script>Galleria.loadTheme(\'friseurteam/page/default_page/js/galleria/themes/classic/galleria.classic.min.js\');Galleria.run(\'#galleria\');</script>';
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user