• Resolved grosbouff

    (@grosbouff)


    Hi Anders Noren and thanks for this great theme !!!

    Could you please change

    <div class="posts">

    to

    <div class="posts masonry">

    and

    $blocks.masonry({
    			itemSelector: '.post-container'
    		});

    to

    if ($blocks.hasClass( "masonry" )){
                        $blocks.masonry({
                                itemSelector: '.post-container'
                        });
                    }

    ?
    It would be easier to build templates (and child themes) who don’t need to have masonry enabled.

    BTW, you should put your theme on Github, so people could collaborate !

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter grosbouff

    (@grosbouff)

    I guess it would rather be

    $blocks.each(function() {
        if ($(this).hasClass('masonry')){
            $(this).masonry({
                itemSelector: '.post-container'
            });
        }
    });

    or the .posts block should have an ID instead of a class. (maybe it would even be more logical)

    Theme Author Anders Norén

    (@anlino)

    Hi grosbouff,

    Thanks for your input! I’ll make a note of it for the next time I use Masonry in a theme (since people have already created child themes/custom CSS for Baskerville, I can’t edit the attribute classes in updates). No current plans to add Baskerville on Github, unfortunately.

    — Anders

    Thread Starter grosbouff

    (@grosbouff)

    since people have already created child themes/custom CSS for Baskerville, I can’t edit the attribute classes in updates

    That’s maybe true…
    Another option could be to disable masonery with a class, eg. “masonery-disabled” > so it does not interfer with your current theme and child themes made by people, but allows us to disable it when needed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add .masonry class github ?’ is closed to new replies.