Simplify the og:image and og:description code in stream_entries/show (#1934)
parent
dce20ec3f5
commit
a3a4fe2163
@ -0,0 +1,4 @@
|
|||||||
|
- if activity.is_a?(Status) && activity.spoiler_text?
|
||||||
|
%meta{ property: 'og:description', content: activity.spoiler_text }/
|
||||||
|
- else
|
||||||
|
%meta{ property: 'og:description', content: activity.content }/
|
@ -0,0 +1,6 @@
|
|||||||
|
- if activity.is_a?(Status) && activity.non_sensitive_with_media?
|
||||||
|
%meta{ property: 'og:image', content: full_asset_url(activity.media_attachments.first.file.url(:small)) }/
|
||||||
|
- else
|
||||||
|
%meta{ property: 'og:image', content: full_asset_url(account.avatar.url(:original)) }/
|
||||||
|
%meta{ property: 'og:image:width', content: '120' }/
|
||||||
|
%meta{ property: 'og:image:height', content: '120' }/
|
Loading…
Reference in new issue