mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 05:29:31 -04:00
Tidy up photo display (line up)
This commit is contained in:
@@ -85,7 +85,7 @@ h3 {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.card {
|
||||
margin: 1em;
|
||||
margin: 1em 1em 1em 0;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
%h2 #{photo_icon} Photos
|
||||
- [Planting, Harvest, Seed].each do |model_name|
|
||||
- if photos.by_model(model_name).size.positive?
|
||||
.crop-photos
|
||||
%h3 #{@crop.name.capitalize} #{t("activerecord.models.#{model_name.to_s.downcase}.other")}
|
||||
.index-cards
|
||||
= render 'photos/gallery', photos: photos.by_model(model_name).limit(8)
|
||||
%h3 #{@crop.name.capitalize} #{t("activerecord.models.#{model_name.to_s.downcase}.other")}
|
||||
= render 'photos/gallery', photos: photos.by_model(model_name).limit(8)
|
||||
|
||||
= link_to 'more photos »', crop_photos_path(@crop), class: 'btn'
|
||||
%hr/
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
- photos.each do |photo|
|
||||
.photo-grid-item= render 'photos/card', photo: photo
|
||||
.index-cards
|
||||
- photos.each do |photo|
|
||||
.photo-grid-item= render 'photos/card', photo: photo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user