Help with Ruby template?

Hi.

I am using the Ruby template and am happy with it except for one aspect: I would like all images on the front page to appear at the size of the images in the Featured posts. For instance, if you look here:

You’ll see that the first and third images (Annette Peacock and Wayne Shorter) are closer to full-size than the second and forth.

Of course, I could make all entries Featured, but when I do that, I lose the text beneath the title (“Cover and record in great shape. Inner sleeve has small splits.” on the second (Smiths) entry.)

I’ve messed around with a bunch of the code and have changed a lot of things to my liking, but I can’t seem to figure this out.

Any suggestions?

Thank you.

You’ll need to update this block:

Since you want the featured post look for all posts, you need to get rid of the if block, so it will simplify to:

        <img
            class="post-image u-object-fit"
            src="{{img_url feature_image}}"
            alt="{{title}}"
            loading="lazy"
        >

Hi. Thank you for your response. I had tried that earlier and it seems to mess up the whole page for reasons I don’t understand. I’ve done it again so you can see.

Ahh that definitely looks weird :smiley:

Try updating the first line to this:

<article class="{{post_class}} featured u-shadow"{{#if primary_tag.accent_color}} style="--tag-color: {{primary_tag.accent_color}};"{{/if}}>

(the change is adding the featured class)

That worked. Thanks!

The only issue now is the text between the title and the price has now disappeared. Not sure how to get that back.

Thank you for your help.

Try adding this style:

<style>
.post-feed .featured .post-wrapper {
  flex-direction: column;
  justify-content: flex-end;
}

.post-feed .featured .post-excerpt {
  /* The excerpt is hidden by default on featured posts. We don't want to do that */
  display: unset;
}
</style>
1 Like

That worked! Thank you very much, Vikas!

1 Like

Yay! Happy to help :slight_smile:

2 Likes

off topic:
Love the way you work that theme and site! :raised_hands:t2:

1 Like

Thank you, Cowgirl! I appreciate it!