home and lightbox
This commit is contained in:
commit
1d2f940f40
|
@ -303,7 +303,8 @@ color:#FFb400;
|
||||||
font-family:Arial, Helvetica, 'DejaVu Sans', sans-serif;
|
font-family:Arial, Helvetica, 'DejaVu Sans', sans-serif;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
line-height:14px;
|
line-height:14px;
|
||||||
font-weight:bold;}
|
font-weight:bold;
|
||||||
|
display:none;}
|
||||||
|
|
||||||
.moreTab:hover
|
.moreTab:hover
|
||||||
{text-decoration:underline;
|
{text-decoration:underline;
|
||||||
|
|
|
@ -37,11 +37,13 @@ $('#listLeft ul li a').live("click", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.lightboxNext').live("click", function(e) {
|
$('.lightboxNext').live("click", function(e) {
|
||||||
$(this).data("image").click();
|
var $i = $(this).data("image");
|
||||||
|
$i.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.lightboxPrev').live("click", function(e) {
|
$('.lightboxPrev').live("click", function(e) {
|
||||||
$(this).data("image").click();
|
var $i = $(this).data("image");
|
||||||
|
$i.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.thumbsDetails').live("click", function(e) {
|
$('.thumbsDetails').live("click", function(e) {
|
||||||
|
@ -52,11 +54,11 @@ $('.thumbsDetails').live("click", function(e) {
|
||||||
|
|
||||||
if (thisIndex < (totalImages - 1)) {
|
if (thisIndex < (totalImages - 1)) {
|
||||||
var hasNext = true;
|
var hasNext = true;
|
||||||
var nextImage = $(this).parent().find(".thumbsDetail").eq(thisIndex + 1);
|
var nextImage = $(this).parent().find(".thumbsDetails").eq(thisIndex + 1);
|
||||||
}
|
}
|
||||||
if (thisIndex > 0 && totalImages > 1) {
|
if (thisIndex > 0 && totalImages > 1) {
|
||||||
var hasPrev = true;
|
var hasPrev = true;
|
||||||
var prevImage = $(this).parent().find(".thumbsDetail").eq(thisIndex - 1);
|
var prevImage = $(this).parent().find(".thumbsDetails").eq(thisIndex - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
var bigImage = $(this).attr("data-bigimage");
|
var bigImage = $(this).attr("data-bigimage");
|
||||||
|
@ -64,14 +66,15 @@ $('.thumbsDetails').live("click", function(e) {
|
||||||
showLightbox($img);
|
showLightbox($img);
|
||||||
var title = $(this).hasAttr("title") ? $(this).attr("title") : '';
|
var title = $(this).hasAttr("title") ? $(this).attr("title") : '';
|
||||||
var $c = $('#lightboxContent');
|
var $c = $('#lightboxContent');
|
||||||
|
var $cont = $('.lightboxContainer').appendTo($c);
|
||||||
if (title != '') {
|
if (title != '') {
|
||||||
var $caption = $('<div />').addClass("lightboxCaption").text(title).appendTo($c);
|
var $caption = $('<div />').addClass("lightboxCaption").text(title).appendTo($cont);
|
||||||
}
|
}
|
||||||
if (hasNext) {
|
if (hasNext) {
|
||||||
var $next = $('<div />').addClass("lightboxNext").text("NEXT").data("image", nextImage).appendTo($c);
|
var $next = $('<div />').addClass("lightboxNext").text("next").data("image", nextImage).appendTo($cont);
|
||||||
}
|
}
|
||||||
if (hasPrev) {
|
if (hasPrev) {
|
||||||
var $prev = $('<div />').addClass("lightboxPrev").text("PREV").data("image", prevImage).appendTo($c);
|
var $prev = $('<div />').addClass("lightboxPrev").text("prev").data("image", prevImage).appendTo($cont);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -240,8 +240,13 @@ str.replace(/[\r\t\n]/g, " ")
|
||||||
<div class="tabText">
|
<div class="tabText">
|
||||||
{% load thumbnail %}
|
{% load thumbnail %}
|
||||||
{% for i in data.imagegallery %}
|
{% for i in data.imagegallery %}
|
||||||
<a href="{% thumbnail i.file 600x500 quality=60 %}" title="{{i.title}}" class="thickbox" rel="gall">
|
{% thumbnail i.file "600x500" crop="center" as bigimage %}
|
||||||
<img src="{% thumbnail i.file 100x100 autocrop crop %}" />
|
|
||||||
|
<a href="{{ bigimage.url }}" title="{{i.title}}" class="thickbox" rel="gall">
|
||||||
|
{% endthumbnail %}
|
||||||
|
{% thumbnail i.file "100x100" crop="center" as thumb %}
|
||||||
|
<img src="{{ thumb.url }}" />
|
||||||
|
{% endthumbnail %}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user