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"; @import (inline) "node_modules/codemirror/lib/codemirror.css";
.av-gallery { .av-tagged {
.av-gallery-wrapper { .av-tagged-image {
opacity: 0; opacity: 0;
} img {
img { display: inline-block;
display: inline-block; margin: 0;
margin: 0; padding: 0;
padding: 0; vertical-align: bottom;
vertical-align: bottom; opacity: 1;
opacity: 1; }
} .Caption_Content {
.Caption_Content { color: #fff;
color: #fff; padding: 10px;
padding: 10px; }
} }
} }

View file

@ -19,7 +19,7 @@
</tr> </tr>
<% #tagged %> <% #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 %> <% image.render | image.link %>
</div> </div>

View file

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