mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-14 03:47:59 -04:00
* Swap to CSS for truncation * Adjust styling on mobile * Contain more * Contain more * All badges clip * Adjust badges to truncate again * Adjust badges to truncate again * Apply suggestions from code review
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
- cache seed do
|
|
.card.seed-card
|
|
= link_to seed_path(slug: seed.slug) do
|
|
= image_tag(seed.thumbnail_url ? seed.thumbnail_url : placeholder_image, alt: seed.crop_name, class: 'img-card')
|
|
.text
|
|
%h4.card-title
|
|
= link_to seed.crop_name, seed_path(slug: seed.slug)
|
|
%h5
|
|
%span.text-muted seeds saved by
|
|
= seed.owner_login_name
|
|
.card-body
|
|
- if seed.owner_location
|
|
%h6.small.badge.badge-pill.badge-location{ title: seed.owner_location }
|
|
= icon 'fas', 'map-marker'
|
|
= truncate(seed.owner_location, length: 15, separator: ' ', omission: '... ')
|
|
%p
|
|
- if seed.quantity
|
|
.badge.badge-info #{seed.quantity} seeds
|
|
- if seed.organic != 'unknown'
|
|
.badge.badge-success.seedtitle--organic= seed.organic
|
|
- if seed.gmo != 'unknown'
|
|
.badge.badge-success.seedtitle--gmo= seed.gmo
|
|
- if seed.heirloom != 'unknown'
|
|
.badge.badge-success.seedtitle--heirloom= seed.heirloom
|
|
- if seed.tradable
|
|
.card-footer
|
|
.d-flex.w-100.justify-content-between
|
|
%small Will trade #{seed.tradable_to}
|
|
/ %a.btn.btn-sm{href: "#"} Request
|