Lyra Theme - Changing Postcard Views on Homepage

I’m testing out the Lyra Theme for Ghost 3. Can someone direct me to how I can change the layout. Right now, its displaying as follow:

1 Post


3 Posts


2 Post


1 Posts


3 Posts


2 Posts


I just want to change this to the following:

1 Post


3 Posts


3 Posts


3 Posts


3 Posts


I’m not too particular about how the last row displays, as it depends on the number of posts. But I feel by reducing the size of thumbnail (with 3 Post layouts) - the page could load faster in Lyra.

Thanks in advance.

Anyone?

Hi!

According to the documentation (Ghost Handlebars Theme Helpers: has), you have to simply change the foreach settings in partials/post-card.hbs file:

from:

<article class="post-card {{post_class}} {{#unless feature_image}}no-image{{else}}{{#is "home"}}{{#has index="nth:6"}}post-card-large{{/has}}{{/is}}{{/unless}}">

to:

<article class="post-card {{post_class}} {{#unless feature_image}}no-image{{else}}{{#is "home"}}{{#has number="1"}}post-card-large{{/has}}{{/is}}{{/unless}}">

It means only the first post will get the post-card-large css class.

4 Likes

Hi Vilagosg,

I am new to code. I don’t know code but I know it works!

Exactly what I needed. Thank you! :blush:

1 Like