Masonry.js on category page

NodeBB Development
  • #1

    How can I apply masonry layout on category page? Consider that I am building my nodebb theme based on vanilla theme. So my category page looks like this http://screencast.com/t/LifqTQsa and that is not cool as you can see. 🙂
    I called masonry.js in plugin.json following the lavender theme example and copied the content of lavender.js file into mine. I tried to make it work by changing this code masonry = new Masonry('.row.home > div'

    into this

    masonry = new Masonry('.row.category > div'

    It didn't worked. Is that even possible to do with just changing lavender.js to affect on category page instead on homepage?

  • #2

    @Jelena You're not pointing at the good element. It's a few childs after :
    masonry = new Masonry('.row.category ul#topics-container li')
    btw the .row.category ul part is not needed 😉

  • #3

    @esiao That didn't worked, it looks like it doesn't even loads masonry.js for some reason. How can I see is the scirpt loaded and is it loaded correctly? Maybe some cmd command? I followed all instructions in setting up plugin.json and theme.json and I am pretty sure that I did it right. I can't figure out what can be the problem. Any other suggestions?
    Tnx anyway ^^


Suggested Topics


  • 0 Votes
    1 Posts
    63 Views

  • 0 Votes
    19 Posts
    6106 Views

  • 1 Votes
    1 Posts
    1076 Views

  • 0 Votes
    1 Posts
    1585 Views

  • 0 Votes
    12 Posts
    3317 Views

| | | |