From aed25932b528f16861c4e016cbeb7a3de6231fe7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Dec 2016 15:20:39 +0100 Subject: Add OEmbed iframe HTML, convert emojis on public pages, increase size of attachment thumbnails --- app/views/api/oembed/show.json.rabl | 4 ++-- app/views/layouts/embedded.html.haml | 8 ++++++++ app/views/stream_entries/embed.html.haml | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 app/views/layouts/embedded.html.haml create mode 100644 app/views/stream_entries/embed.html.haml (limited to 'app/views') diff --git a/app/views/api/oembed/show.json.rabl b/app/views/api/oembed/show.json.rabl index e035bc13c..2bec9165e 100644 --- a/app/views/api/oembed/show.json.rabl +++ b/app/views/api/oembed/show.json.rabl @@ -9,6 +9,6 @@ node(:author_url) { |entry| account_url(entry.account) } node(:provider_name) { Rails.configuration.x.local_domain } node(:provider_url) { root_url } node(:cache_age) { 86_400 } -node(:html, &:content) +node(:html) { |entry| "
" } node(:width) { @width } -node(:height) { @height } +node(:height) { nil } diff --git a/app/views/layouts/embedded.html.haml b/app/views/layouts/embedded.html.haml new file mode 100644 index 000000000..adbf0a287 --- /dev/null +++ b/app/views/layouts/embedded.html.haml @@ -0,0 +1,8 @@ +!!! 5 +%html{:lang => 'en'} + %head + %meta{:charset => 'utf-8'}/ + = stylesheet_link_tag 'application', media: 'all' + = javascript_include_tag 'application_public' + %body.embed + = yield diff --git a/app/views/stream_entries/embed.html.haml b/app/views/stream_entries/embed.html.haml new file mode 100644 index 000000000..4a733d428 --- /dev/null +++ b/app/views/stream_entries/embed.html.haml @@ -0,0 +1,2 @@ +.activity-stream.activity-stream-headless + = render partial: @type, locals: { @type.to_sym => @stream_entry.activity } -- cgit