mardi 30 octobre 2018

How to style posts in bootstrap grid column

I have this code for posts that I want to show in bootstrap card column format.

%h4{:align => "center"} All Posts
%hr.my-3
- @posts.each do |post|
  %h4= link_to post.title, post
  %p= post.description
  %p= post.company

I want to show the first post in one card and the next in the other consistently across the whole page. Seems with the bootstrap code I need to manually input the individual posts. I would want it to be automated. Thanks

Aucun commentaire:

Enregistrer un commentaire