about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-18 15:20:39 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-18 15:20:39 +0100
commitaed25932b528f16861c4e016cbeb7a3de6231fe7 (patch)
tree08da19d028a3b238ecd472ff65ab4092a1e4c454 /app/views
parent6de079a5af328d26d7cbc8daf3367d16c311fddb (diff)
Add OEmbed iframe HTML, convert emojis on public pages, increase size of attachment thumbnails
Diffstat (limited to 'app/views')
-rw-r--r--app/views/api/oembed/show.json.rabl4
-rw-r--r--app/views/layouts/embedded.html.haml8
-rw-r--r--app/views/stream_entries/embed.html.haml2
3 files changed, 12 insertions, 2 deletions
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| "<div style=\"position: relative; height: 0; overflow: hidden; padding-top: 30px; padding-bottom: 56.25%\"><iframe src=\"#{embed_account_stream_entry_url(entry.account, entry)}\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden\" frameborder=\"0\" width=\"#{@width}\" scrolling=\"no\"></iframe></div>" }
 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 }