Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Tumblr: NewDayDate + Masonry

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #161017
    dorman
    Participant

    Hello!

    I’m trying to create a template for tumblr. You can look it here. So I want divide posts by NewDayDate and use masonry to arrange them. I looked at this tutorial and that’s fine. But how you can see something is wrong. The date div doesn’t appear in block.

    In short this is my code:

    CSS:

    .post { width:880px; } .date { width:880px; border-bottom: 1px solid #000; display: block; height:40px; } .post.author1post { width: 400px; float:left; } .post.author2post { width: 400px; float:right; }

    BODY:

    — div class post {block:Posts} {block:NewDayDate}

    — div class date {Month} {DayOfMonth}

    {/block:NewDayDate}

    — div class **mas**

    — div class author{PostAuthorName}post {block:Regular} {block:Title}{Title}{/block:Title} {Body} {/block:Regular} (…)

    {/block:Posts}

    SCRIPT:

    $(window).load(function () { var $tumblelog = $(‘.mas‘);

        function (newElements) {
            var $newElems = $(newElements).css({
                opacity: 0
            });
            $newElems.imagesLoaded(function () {
                $newElems.animate({
                    opacity: 1
                });
                $tumblelog.masonry('appended', $newElems);
            });
        });
        $tumblelog.imagesLoaded(function () {
            $tumblelog.masonry({
                columnWidth: function (containerWidth) {
                    return containerWidth / 100;
                }
            });
        });
    })();
    

    Can you help me please? Thanks.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.