mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 03:09:06 -04:00
33 lines
1.4 KiB
Plaintext
33 lines
1.4 KiB
Plaintext
-# A seed packet: tall, papery, a printed band and a torn top edge, with the
|
|
-# small print along the bottom the way a real packet carries it.
|
|
- cache seed do
|
|
.card.seed-card
|
|
.seed-card-tear{'aria-hidden' => 'true'}
|
|
.seed-card-window
|
|
= link_to seed_path(slug: seed.slug) do
|
|
= image_tag(seed.thumbnail_url || placeholder_image, alt: seed.crop_name, class: 'img-card')
|
|
-# The year stamp a saved-seed packet carries.
|
|
- if seed.saved_at
|
|
%span.seed-card-year saved #{seed.saved_at.year}
|
|
.seed-card-band
|
|
%h4.card-title= link_to seed.crop_name, seed_path(slug: seed.slug)
|
|
%h5 seeds saved by #{seed.owner_login_name}
|
|
-# Always rendered, so every packet has the same shape, with whatever it has.
|
|
%ul.seed-card-print
|
|
- if seed.quantity
|
|
%li approx. #{pluralize seed.quantity, 'seed'}
|
|
- if seed.plant_before
|
|
%li sow before #{seed.plant_before.year}
|
|
- if seed.organic != 'unknown'
|
|
%li.seedtitle--organic= seed.organic
|
|
- if seed.gmo != 'unknown'
|
|
%li.seedtitle--gmo= seed.gmo
|
|
- if seed.heirloom != 'unknown'
|
|
%li.seedtitle--heirloom= seed.heirloom
|
|
- if seed.tradable
|
|
%li will trade #{seed.tradable_to}
|
|
- if seed.owner_location
|
|
%li{title: seed.owner_location}
|
|
= icon 'fas', 'map-marker'
|
|
= truncate(seed.owner_location, length: 15, separator: ' ', omission: '... ')
|