diff --git a/app/assets/images/placeholder.xcf b/app/assets/images/placeholder.xcf new file mode 100644 index 000000000..53d8513d8 Binary files /dev/null and b/app/assets/images/placeholder.xcf differ diff --git a/app/assets/images/placeholder_150.png b/app/assets/images/placeholder_150.png deleted file mode 100644 index af43242af..000000000 Binary files a/app/assets/images/placeholder_150.png and /dev/null differ diff --git a/app/assets/images/placeholder_600.png b/app/assets/images/placeholder_600.png new file mode 100644 index 000000000..10dcb8e95 Binary files /dev/null and b/app/assets/images/placeholder_600.png differ diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png deleted file mode 100644 index 284baefb7..000000000 Binary files a/app/assets/images/rails.png and /dev/null differ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 818e0f4ca..fc958cd69 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -13,6 +13,7 @@ @import 'members'; @import 'harvests'; @import 'seeds'; +@import 'posts'; @import 'crops'; @import 'homepage'; diff --git a/app/assets/stylesheets/posts.scss b/app/assets/stylesheets/posts.scss new file mode 100644 index 000000000..d7f80d0aa --- /dev/null +++ b/app/assets/stylesheets/posts.scss @@ -0,0 +1,5 @@ +.post-content { + img { + max-width: 100%; + } +} diff --git a/app/helpers/photos_helper.rb b/app/helpers/photos_helper.rb index b61edcf84..9e1053820 100644 --- a/app/helpers/photos_helper.rb +++ b/app/helpers/photos_helper.rb @@ -35,6 +35,6 @@ module PhotosHelper end def placeholder_image - 'placeholder_150.png' + 'placeholder_600.png' end end diff --git a/app/views/plantings/_form.html.haml b/app/views/plantings/_form.html.haml index 6b0057a73..b2f651f5e 100644 --- a/app/views/plantings/_form.html.haml +++ b/app/views/plantings/_form.html.haml @@ -28,7 +28,7 @@ .row .col-md-8 - = f.collection_radio_buttons(:garden_id, @planting.owner.gardens, + = f.collection_radio_buttons(:garden_id, @planting.owner.gardens.active, :id, :name, required: true, label: 'Where did you plant it?') = link_to "Add a garden.", new_garden_path diff --git a/app/views/posts/show.html.haml b/app/views/posts/show.html.haml index f73a8aecf..34f94da9b 100644 --- a/app/views/posts/show.html.haml +++ b/app/views/posts/show.html.haml @@ -39,7 +39,7 @@ = @post.subject = render 'posts/actions', post: @post .card-body - = render 'posts/single', post: @post + .post-content= render 'posts/single', post: @post .card-footer = render 'posts/likes', post: @post diff --git a/spec/helpers/photos_helper_spec.rb b/spec/helpers/photos_helper_spec.rb index cace0e120..efc6ef07e 100644 --- a/spec/helpers/photos_helper_spec.rb +++ b/spec/helpers/photos_helper_spec.rb @@ -16,7 +16,7 @@ describe PhotosHelper do describe "crops" do subject { crop_image_path(crop) } - it { is_expected.to eq 'placeholder_150.png' } + it { is_expected.to eq 'placeholder_600.png' } describe "with a planting" do before { planting.photos << planting_photo } @@ -46,7 +46,7 @@ describe PhotosHelper do describe "gardens" do subject { garden_image_path(garden) } - it { is_expected.to eq 'placeholder_150.png' } + it { is_expected.to eq 'placeholder_600.png' } describe "uses garden's own photo" do before { garden.photos << garden_photo } @@ -58,7 +58,7 @@ describe PhotosHelper do describe 'plantings' do subject { planting_image_path(planting) } - it { is_expected.to eq 'placeholder_150.png' } + it { is_expected.to eq 'placeholder_600.png' } describe "uses planting's own photo" do before { planting.photos << planting_photo } @@ -69,7 +69,7 @@ describe PhotosHelper do describe 'harvests' do subject { harvest_image_path(harvest) } - it { is_expected.to eq 'placeholder_150.png' } + it { is_expected.to eq 'placeholder_600.png' } describe "uses harvest's own photo" do before { harvest.photos << harvest_photo } @@ -80,7 +80,7 @@ describe PhotosHelper do describe 'seeds' do subject { seed_image_path(seed) } - it { is_expected.to eq 'placeholder_150.png' } + it { is_expected.to eq 'placeholder_600.png' } describe "uses seed's own photo" do before { seed.photos << seed_photo }