ruby on rails - Thumbnails with Zurb Foundation and RoR -
so started using zurb foundation, , following this documentation.
i have following code links designs in database.
<div> <div class="small-4 small-offset-4 rows"><h2>most downloaded</h2></div> <% @designs.each |design| %> <div><%= link_to design.title, design_path(design) %></div> <% end %> </div>
i wanted on creating thumbnails each link. gist of it, wanted use same picture thumbnails. used a.th class wrap image wanted learn how display more 1 (typically 3) thumbnails on each row.
so lets there 9 designs in total, wanted 3 rows of 3 thumbnails each. wasn't able find many tutorials/explanations tips helpful understand how works.
check out foundation's block grid: http://foundation.zurb.com/docs/components/block-grid.html.
i think you're after. 3 3 thumbnail grid like:
<div> <div class="small-4 small-offset-4 rows"><h2>most downloaded</h2></div> <div class="row"> <ul class="small-block-grid-3"> <% @designs.each |design| %> <li><%= link_to design.title, design_path(design), class: "th" %></li> <% end %> </ul> </div> </div>
Comments
Post a Comment