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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Luxagraf | Photos | {{object.set_title}}</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="false">
<meta name="description" content="">
<meta name="keywords" content="">
<style>
html {
/* Moz */
height: 100%;
}
.wrapper {
width: 960px;
margin: 0 auto;
}
/* BEGIN GALLERIA STYLE */
.galleria{list-style:none;width:200px}
.galleria li{display:block;width:80px;height:80px;overflow:hidden;float:left;margin:0 6px 10px 0;border: 3px #2a2a2a solid;}
.galleria li a{display:none}
.galleria li div{position:absolute;display:none;top:0;left:180px}
.galleria li div img{cursor:pointer}
.galleria li.active {border: 3px #b6b6b6 solid;}
.galleria li.active div img,.galleria li.active div{display:block}
.galleria li img.thumb{cursor:pointer;top:auto;left:auto;display:block;width:auto;height:auto}
.galleria li .caption{display:block;padding-top:.5em}
* html .galleria li div span{width:400px} /* MSIE bug */
*{margin:0;padding:0}
body{padding:20px;text-align:center;background:black;color:#bba;font:80%/140% georgia,serif;}
h1{font-family:Georgia,"Times New Roman",Times,Serif;text-transform:uppercase;font-size:15px;font-weight: normal}
h2 a {font-family:Georgia,"Times New Roman",Times,Serif;font-size:12px;font-weight: normal; font-style:italic; color: #b6b6b6; text-decoration: none;}
a:hover{color:#b53a04;}
.caption{font-family:Georgia,"Times New Roman",Times,Serif;font-style:italic;color:#887;}
.demo{position:relative;margin-top:2em;}
/*.gallery_show{width:702px;margin:0 auto;}*/
.gallery_show{height:90px;margin:0;}
.gallery_show li{width:75px;height:75px;border:3px double #111;margin: 2px;background:#000;}
.gallery_show li div{left:240px}
.gallery_show li div .caption{font:italic 0.7em/1.4 georgia,serif;}
#main_image{margin:0 auto 20px auto;height:640px;width:960px;}
#main_image img{margin-bottom:1px;}
.nav{padding-bottom:10px;text-align:center;clear:both;font:80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
/* Menu
---------------------------- */
.clearit {
margin: 0;
padding: 0;
height: 0;
clear: both;
}
/* start jcarousel */
/**
* This <div> element is wrapped by jCarousel around the list
* and has the classname "jcarousel-container".
*/
.jcarousel-container {
position: relative;
}
.jcarousel-clip {
z-index: 2;
padding: 0;
margin: 0;
overflow: hidden;
position: relative;
}
.jcarousel-list {
z-index: 1;
overflow: hidden;
position: relative;
top: 0;
left: 0;
margin: 0;
padding: 0;
}
.jcarousel-item {
float: left;
list-style: none;
/* We set the width/height explicitly. No width/height causes infinite loops. */
width: 75px;
height: 75px;
}
/**
* The buttons are added dynamically by jCarousel before
* the <ul> list (inside the <div> described above) and
* have the classnames "jcarousel-next" and "jcarousel-prev".
*/
.jcarousel-next {
z-index: 3;
display: none;
}
.jcarousel-prev {
z-index: 3;
display: none;
}
/* end jcarousel */
/* start tango jcarousel */
.jcarousel-skin-tango.jcarousel-container {
-moz-border-radius: 5px;
margin: 0 auto;
}
.jcarousel-skin-tango.jcarousel-container-horizontal {
width: 960px;
padding: 10px 40px;
}
.jcarousel-skin-tango.jcarousel-container-vertical {
width: 75px;
height: 245px;
padding: 40px 20px;
}
.jcarousel-skin-tango .jcarousel-clip-horizontal {
width: 960px;
height: 75px;
}
.jcarousel-skin-tango .jcarousel-clip-vertical {
width: 75px;
height: 245px;
}
.jcarousel-skin-tango .jcarousel-item {
width: 65px;
height: 65px;
border: 3px #2a2a2a solid;
}
.jcarousel-skin-tango .jcarousel-item-horizontal {
margin-right: 8px;
}
.jcarousel-skin-tango .jcarousel-item-vertical {
margin-bottom: 10px;
}
.jcarousel-skin-tango .jcarousel-item-placeholder {
background: #000;
color: #fff;
}
/**
* Horizontal Buttons
*/
.jcarousel-skin-tango .jcarousel-next-horizontal {
position: absolute;
top: 22px;
right: 10px;
width: 20px;
height: 53px;
cursor: pointer;
background: url({{media_url}}img/slideshow-arrow-right.png) no-repeat 0 0;
}
.jcarousel-skin-tango .jcarousel-next-horizontal:hover {
background-position: -20px 0;
}
.jcarousel-skin-tango .jcarousel-prev-horizontal {
position: absolute;
top: 22px;
left: 10px;
width: 20px;
height: 53px;
cursor: pointer;
background: url({{media_url}}img/slideshow-arrow-left.png) no-repeat -20px 0;
}
.jcarousel-skin-tango .jcarousel-prev-horizontal:hover {
background-position: 0 0;
}
#controls {width: 60px; margin: 5px auto 0;}
.play {
width: 57px;
height: 32px;
background: url({{media_url}}img/play.png) 0 0 no-repeat;
}
.play:hover { background: url({{media_url}}img/play.png) -57px 0 no-repeat; }
.pause {
width: 57px;
height: 32px;
background: url({{media_url}}img/pause.png) 0 0 no-repeat;;
}
.pause:hover {
background: url({{media_url}}img/pause.png) -57px 0 no-repeat;
}
</style>
<script type="text/javascript" src="http://media.luxagraf.net/js/jquery.js"></script>
<script type="text/javascript" src="http://media.luxagraf.net/js/combo.pack.js"></script>
</head>
<body>
<h1>Luxagraf, photos from: {{object.set_title}}</h1>
<h2><a href="/photos/1/">« Back to galleries</a></h2>
<div id="controls">
<div id="toggle" class="pause"></div>
</div>
<div id="wrapper">
<div id="main_image"></div>
<div id="images" style="height:90px; white-space:nowrap;">
<ul id="mycarousel" class="jcarousel-skin-tango">
{%for photo in object.photos.all reversed %}
<li><img src="{{photo.get_local_slideshow_url}}" alt="{{photo.title}}" title="{%ifequal photo.description 'None' %}{%else%}{{photo.description|striptags}}{%endifequal%}"></li>
{% endfor %}
</ul>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
$('.jcarousel-skin-tango').addClass('gallery_show'); // adds new class name to maintain degradability
$('ul.gallery_show').galleria({
history : true, // activates the history object for bookmarking, back-button etc.
clickNext : true, // helper for making the image clickable
insert : '#main_image', // the containing selector for our main image
onImage : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
// fade in the image & caption
image.css('display','none').fadeIn(200);
caption.css('display','none').fadeIn(200);
// fetch the thumbnail container
var _li = thumb.parents('li');
// fade out inactive thumbnail
_li.siblings().children('img.selected').fadeTo(100,0.6);
// fade in active thumbnail
thumb.fadeTo('fast',1).addClass('selected');
// add a title for the clickable image
image.attr('title','Next image >>');
$('#main_image').trigger('img_change');
},
onThumb : function(thumb) { // thumbnail effects goes here
// fetch the thumbnail container
var _li = thumb.parents('li');
// if thumbnail is active, fade all the way.
var _fadeTo = _li.is('.active') ? '1' : '0.6';
// fade in the thumbnail when finished loading
thumb.css({display:'none',opacity:_fadeTo}).fadeIn(500);
// hover effects
thumb.hover(
function() { thumb.fadeTo('fast',1); },
function() { _li.not('.active').children('img').fadeTo('fast',0.6); } // don't fade out if the parent is active
)
}
});
//
jQuery('#mycarousel').jcarousel({
scroll: 12,
initCallback: mycarousel_initCallback
});
$.hotkeys.add('left', function(){$.galleria.prev();});
$.hotkeys.add('right', function(){$.galleria.next();});
$(function() {
var firstItem = $('ul.galleria li:first').addClass('active').find('img').addClass('selected');
$.galleria.activate(firstItem.attr('src'));
$('ul.galleria li:first').remove()
var active = false;
var gal = jQuery('#controls');
$(function() {
if (!active) {
active = !active;
gal.everyTime('5s', 'slideshow', function() {
$.galleria.next();
});
}
})
$('#toggle').bind("click", function() {
var gal = jQuery('#controls');
if ($(this).attr("class") == "play") {
$(this).attr("class", "pause");
if (!active) {
active = !active;
$.galleria.next();
gal.everyTime('5s', 'slideshow', function() {
$.galleria.next();
});
}
} else {
$(this).attr("class", "play");
if (active) {
active = !active;
gal.stopTime('slideshow');
}
}
});
});
});
function mycarousel_initCallback(carousel) {
jQuery('#main_image').bind('img_change',function() {
var num = parseInt((jQuery('.caption').text()).split(":",1)[0])-1;
var ntext = (jQuery('.caption').text()).split(":")[1];
if (ntext == 'undefined') {
ntext=''
}
jQuery('.caption').text(ntext);
carousel.scroll(num);
return false;
});
};
//]]>
</script>
</body>
</html>
|