Tidy up photo display (line up)

This commit is contained in:
Brenda Wallace
2019-07-03 08:25:23 +12:00
parent b90f6d5ff6
commit 8c02ea943a
3 changed files with 6 additions and 7 deletions

View File

@@ -85,7 +85,7 @@ h3 {
flex-wrap: wrap;
.card {
margin: 1em;
margin: 1em 1em 1em 0;
width: 200px;
}
}

View File

@@ -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/

View File

@@ -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