闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
694 B

  1. # frozen_string_literal: true
  2. object @stream_entry
  3. node(:type) { 'rich' }
  4. node(:version) { '1.0' }
  5. node(:title, &:title)
  6. node(:author_name) { |entry| entry.account.display_name.blank? ? entry.account.username : entry.account.display_name }
  7. node(:author_url) { |entry| account_url(entry.account) }
  8. node(:provider_name) { Rails.configuration.x.local_domain }
  9. node(:provider_url) { root_url }
  10. node(:cache_age) { 86_400 }
  11. node(:html) { |entry| "<iframe src=\"#{embed_account_stream_entry_url(entry.account, entry)}\" style=\"width: 100%; overflow: hidden\" frameborder=\"0\" width=\"#{@width}\" height=\"#{@height}\" scrolling=\"no\"></iframe>" }
  12. node(:width) { @width }
  13. node(:height) { @height }