We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Why a masonry layout for front pages, e.g. Mercury, but not for the galleries ?

  • #9830
    Avatar photo[anonymous]

    Dear Publii developers,

    from a design perspective, wouldn’t it be more consistent, when front page and gallery have the same layout, namely masonry ?

    Thinking of the Art (!) Gallery template, I would be disappointed, if my landscape images were cut into portrait to fit the photoswipe approach.

    Cheers, Michael

    Avatar photo[anonymous]

    Hi Michael,

    A fellow Publii user, Yaroslav, wrote a tutorial on implementing masonry gallery using Photoswipe that Publii also uses.
    You might want to check it out:

    And if I’m not wrong here it where he implemented it here:

    Hope this helps.


    Avatar photo[anonymous]

    Hi, Shaun,

    thanks a lot for your answer. Have you ever tried his solution? If I copy his CSS to main.css in the Mercury theme, there are no changes to the gallery…

    Cheers, Michael

    Avatar photo[anonymous]

    I have not tried his solution.

    Perhaps you could inspect the style.css file on his website to see if there’s anything else pertaining to gallery or gallery__item

    Good luck.

    Avatar photo[anonymous]

    Hey I followed shaun2k’s guidance, and was able to get the masonry working on my Mercury site.

    Here is my gist with code snippets and explanations:

    Avatar photo[anonymous]

    Thanks a lot to the both of you, I got the masonry design working 🙂