Fixed undesired “collage” of tagged stories

This commit is contained in:
Tobi Schäfer 2015-01-06 13:16:02 +01:00
parent f899a12fb0
commit 7e2fd74e1e
3 changed files with 18 additions and 18 deletions

View file

@ -4,19 +4,19 @@
@import (inline) "node_modules/codemirror/lib/codemirror.css";
.av-gallery {
.av-gallery-wrapper {
.av-tagged {
.av-tagged-image {
opacity: 0;
}
img {
display: inline-block;
margin: 0;
padding: 0;
vertical-align: bottom;
opacity: 1;
}
.Caption_Content {
color: #fff;
padding: 10px;
img {
display: inline-block;
margin: 0;
padding: 0;
vertical-align: bottom;
opacity: 1;
}
.Caption_Content {
color: #fff;
padding: 10px;
}
}
}

View file

@ -19,7 +19,7 @@
</tr>
<% #tagged %>
<div class='av-gallery-wrapper' data-caption='<% image.description default=<% image.fileName %> %>'>
<div class='av-tagged-image' data-caption='<% image.description default=<% image.fileName %> %>'>
<% image.render | image.link %>
</div>

View file

@ -15,7 +15,7 @@
<% tag.skin $Tag#controls prefix=<div> suffix="</div><br />" %>
%>
<% %>
<div class='av-gallery'>
<div class='av-tagged'>
<% list.render skin="$TagHub#main" %>
</div>
<ul class='uk-pagination uk-text-left'>
@ -26,9 +26,9 @@
(function () {
$(function() {
var resizeTimer = null;
$('.av-gallery').collageCaption();
$('.av-tagged').collageCaption();
$(window).bind('resize', function() {
$('.av-gallery-wrapper').css('opacity', 0);
$('.av-tagged-image').css('opacity', 0);
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(collage, 200);
});
@ -38,7 +38,7 @@
collage();
function collage() {
$('.av-gallery').removeWhitespace().collagePlus({
$('.av-tagged').removeWhitespace().collagePlus({
allowPartialLastRow: true,
fadeSpeed: 'slow'
});