forked from Kris-B/nanoGALLERY
-
Notifications
You must be signed in to change notification settings - Fork 0
/
performances.html
160 lines (127 loc) · 8.2 KB
/
performances.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!--
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
-->
<title>nanoGALLERY</title>
<style>
* {font-family: sans-serif; color:#fff;}
a, h1, h2, h3, h4, h5 {text-align:center; color:#eee;}
body {background:#333;}
</style>
<!-- nanoGALLERY -->
<!-- Plugin for jQuery by Christophe Brisbois -->
<!-- Demo & doc: http://nanogallery.brisbois.fr -->
<!-- Sources: https://github.com/Kris-B/nanoGALLERY -->
<!-- License: For personal, non-profit organizations, or open source projects, you may use nanoGALLERY for free. -->
<!-- -------- ALL OTHER USES REQUIRE THE PURCHASE OF A PROFESSIONAL LICENSE. -->
<!-- #################################################################################################################### -->
<!-- nanoGALLERY CSS files -->
<!-- only include the css file corresponding to the selected theme -->
<!-- include 'nanogallery.css' if no theme is specified -->
<!-- -->
<!-- nanoGALLERY - default theme css file -->
<link href="css/nanogallery.css" rel="stylesheet" type="text/css">
<!-- nanoGALLERY - css file for the theme 'clean' -->
<link href="css/themes/clean/nanogallery_clean.css" rel="stylesheet" type="text/css">
<!-- nanoGALLERY - css file for the theme 'light' -->
<link href="css/themes/light/nanogallery_light.css" rel="stylesheet" type="text/css">
<!-- #################################################################################################################### -->
<!-- #################################################################################################################### -->
<!-- jQuery -->
<!-- -->
<script type="text/javascript" src="third.party/jquery-1.7.1.min.js"></script>
<!-- #################################################################################################################### -->
<!--
<script type="text/javascript" src="third.party/shifty.min.js"></script>
-->
<!-- #################################################################################################################### -->
<!-- nanoGALLERY javascript -->
<!-- -->
<script type="text/javascript" src="jquery.nanogallery.js"></script>
<!-- -->
<!-- #################################################################################################################### -->
<!--
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery.transit/0.9.9/jquery.transit.min.js"></script>
-->
<!--
<script type="text/javascript" src="http://julian.com/research/velocity/build/jquery.velocity.min.js"></script>
-->
<script>
$(document).ready(function () {
// ##################################################################################################################
// ##### Multi-level navigation (API method) #####
// ##################################################################################################################
jQuery('#btnRefresh').on('click', function() {
// alert(n);
jQuery("#nanoGallery").nanoGallery('destroy');
DisplayGallery();
});
DisplayGallery();
//console.dir($('head meta[name=viewport]')[0].content);
function cloneObject(obj) {
if (obj === null || typeof obj !== 'object') {
return obj;
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
}
return temp;
}
function DisplayGallery() {
var nb = $('#nbThumbs').val();
var contentGallery = [];
var sources=[
{ src: 'demonstration/image_01.jpg', srct: 'demonstration/image_01t.jpg', title: 'image 01', imgtWidth:320, imgtHeight:213, albumID:0, customData:{v1:1, v2:2} },
{ src: 'demonstration/image_02.jpg', srct: 'demonstration/image_02t.jpg', title: 'image 02', imgtWidth:320, imgtHeight:213, albumID:0 },
{ src: 'demonstration/image_03.jpg', srct: 'demonstration/image_03t.jpg', title: 'image 03', imgtWidth:320, imgtHeight:213, albumID:0 },
{ src: 'demonstration/image_01.jpg', srct: 'demonstration/image_01ts.jpg', title: 'image 01', imgtWidth:160, imgtHeight:160, albumID:0 },
{ src: 'demonstration/image_02.jpg', srct: 'demonstration/image_02ts.jpg', title: 'image 02', imgtWidth:160, imgtHeight:160, albumID:0 },
{ src: 'demonstration/image_03.jpg', srct: 'demonstration/image_03ts.jpg', title: 'image 03', imgtWidth:160, imgtHeight:160, albumID:0 }
];
for( var i=0; i<nb; i++ ) {
contentGallery.push(cloneObject(sources[Math.floor(Math.random()*6)]));
contentGallery[i].ID=i+1;
}
jQuery("#nanoGallery").nanoGallery({ thumbnailWidth:'auto', thumbnailHeight:120,
items:contentGallery,
//paginationMaxItemsPerPage:3,
//paginationMaxLinesPerPage:1,
thumbnailHoverEffect:'imageInvisible,imageScale150,borderLighter',
//thumbnailHoverEffect:'labelAppear75',
//thumbnailHoverEffect:'imageScale150',
viewerDisplayLogo:true,
locationHash:false,
thumbnailDisplayInterval: 5,
//imageTransition: 'fade',
thumbnailDisplayTransition: true,
thumbnailLabel : { position : 'overImageOnBottom', display : true, displayDescription : true, titleMaxLength : 0, descriptionMaxLength : 0, hideIcons : false, title : '', itemsCount : '' },
//breadcrumbAutoHideTopLevel:true,
//maxItemsPerLine:5,
//itemsSelectable:true,
//showCheckboxes: true,
galleryRenderStep: 50,
//debugMode: true,
paginationDots : true,
galleryFullpageButton:true
});
}
});
</script>
</head>
<!-- <body style="background-color:#fff;"> -->
<body>
<div style="color:#fff;text-align:center;font-size:4.0em;"><span style="color:#fff;">nano</span><span style="color:#6e6;">GALLERY</span></div>
<div style="color:#eee;text-align:center;font-size:.9em;"><br>Full nanoGALLERY documentation: <a href="http://www.nanogallery.brisbois.fr">www.nanogallery.brisbois.fr</a></div>
<br><br>
<h2 style="background:#555;">----- Performance test -----</h2><br>
Number of thumbnails: <input id="nbThumbs"type="text" value="100" style="color:#000;"/>
<button id="btnRefresh" "type="button" style="color:#000;padding:4px;">Refresh</button>
<br>
<div id="nanoGallery"></div>
<br><br><br><br><br><br><br><br><br>
<br><br><h5>by <a href="https://plus.google.com/111186676244625461692?rel=author">Christophe Brisbois</a></h5>
</body>
</html>