mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-28 11:41:31 -04:00
@@ -533,7 +533,7 @@ GEM
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (1.6.1)
|
||||
unicorn (5.5.2)
|
||||
unicorn (5.5.3)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
uniform_notifier (1.13.0)
|
||||
|
||||
@@ -19,6 +19,10 @@ module PhotosHelper
|
||||
photo_or_placeholder(garden)
|
||||
end
|
||||
|
||||
def post_image_path(post)
|
||||
photo_or_placeholder(post)
|
||||
end
|
||||
|
||||
def planting_image_path(planting)
|
||||
photo_or_placeholder(planting)
|
||||
end
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
= content_for :title, "#{@garden.owner}'s #{@garden}"
|
||||
|
||||
- content_for :opengraph do
|
||||
- @garden.photos.each do |photo|
|
||||
= tag("meta", property: "og:image", content: photo.fullsize_url)
|
||||
= tag("meta", property: "og:image", content: garden_image_path(@garden))
|
||||
- if @garden.description
|
||||
= tag("meta", property: "og:description", content: og_description(@garden.description))
|
||||
= tag("meta", property: "og:title", content: "#{@garden.owner}'s #{@garden}")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
= content_for :title, "#{@harvest.crop} harvested by #{@harvest.owner}"
|
||||
- content_for :opengraph do
|
||||
- @harvest.photos.each do |photo|
|
||||
= tag("meta", property: "og:image", content: photo.fullsize_url)
|
||||
= tag("meta", property: "og:image", content: harvest_image_path(@harvest))
|
||||
= tag("meta", property: "og:image:user_generated", content: "true")
|
||||
= tag("meta", property: "og:title", content: "#{@harvest.crop} harvested by #{@harvest.owner}")
|
||||
= tag("meta", property: "og:type", content: "website")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
= content_for :title, "#{@planting.crop} in #{@planting.location}"
|
||||
- content_for :opengraph do
|
||||
- @planting.crop.photos.limit(3).each do |photo|
|
||||
= tag("meta", property: "og:image", content: photo.fullsize_url)
|
||||
= tag("meta", property: "og:image", content: planting_image_path(@planting))
|
||||
= tag("meta", property: "og:title", content: "#{@planting.crop} in #{@planting.location}")
|
||||
- if @planting.description
|
||||
= tag("meta", property: "og:description", content: og_description(@planting.description))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
= content_for :title, @post.subject
|
||||
- content_for :opengraph do
|
||||
= tag("meta", property: "og:image", content: post_image_path(@post))
|
||||
= tag("meta", property: "og:image", content: avatar_uri(@post.author, 200))
|
||||
= tag("meta", property: "og:description", content: og_description(@post.body))
|
||||
= tag("meta", property: "og:title", content: @post.subject)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
- content_for :title, "#{@seed.owner}'s #{@seed.crop} seeds"
|
||||
- content_for :opengraph do
|
||||
- @seed.crop.photos.each do |photo|
|
||||
= tag("meta", property: "og:image", content: photo.fullsize_url)
|
||||
= tag("meta", property: "og:image", content: seed_image_path(@seed))
|
||||
- if @seed.description
|
||||
= tag("meta", property: "og:description", content: og_description(@seed.description))
|
||||
= tag("meta", property: "og:image", content: "#{@seed.owner}'s #{@seed.crop} seeds")
|
||||
|
||||
Reference in New Issue
Block a user