Files
growstuff/app/views/home/_recent.html.haml
T

14 lines
743 B
Plaintext

-# What gardeners have just planted and are sharing, for people who have not signed in yet.
%section.home-recent
.home-recent-head
%h2= t('.title')
= link_to t('.see_all'), plantings_path
.home-recent-cards.index-cards
- Planting.homepage_records(6).select { |planting| planting.thumbnail_url.present? }.first(2).each do |planting|
= link_to planting_path(slug: planting.slug), class: 'home-recent-planting' do
= image_tag planting.thumbnail_url, alt: "Image of #{planting.display_name} by #{planting.owner_login_name}"
%span.home-recent-name= planting.crop_name
%span.home-recent-by= planting.owner_login_name
- Seed.homepage_records(3).each do |seed|
= render 'seeds/card', seed: seed