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/assets/javascripts/application_public.js | 1 + app/assets/javascripts/extras.jsx | 8 ++++++++ app/assets/stylesheets/application.scss | 12 ++++++++++++ app/assets/stylesheets/stream_entries.scss | 21 +++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 app/assets/javascripts/extras.jsx (limited to 'app/assets') diff --git a/app/assets/javascripts/application_public.js b/app/assets/javascripts/application_public.js index 31a96fd2d..f131a267a 100644 --- a/app/assets/javascripts/application_public.js +++ b/app/assets/javascripts/application_public.js @@ -1,2 +1,3 @@ //= require jquery //= require jquery_ujs +//= require extras diff --git a/app/assets/javascripts/extras.jsx b/app/assets/javascripts/extras.jsx new file mode 100644 index 000000000..93f827044 --- /dev/null +++ b/app/assets/javascripts/extras.jsx @@ -0,0 +1,8 @@ +import emojify from './components/emoji' + +$(() => { + $.each($('.entry .content, .name, .account__header__content'), (_, content) => { + const $content = $(content); + $content.html(emojify($content.html())); + }); +}); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 609b30726..6dd89c0ea 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -114,6 +114,18 @@ body { padding: 0; } + &.embed { + background: transparent; + margin: 0; + + .container { + position: absolute; + width: 100%; + height: 100%; + overflow: hidden; + } + } + @media screen and (max-width: 360px) { padding-bottom: 0; } diff --git a/app/assets/stylesheets/stream_entries.scss b/app/assets/stylesheets/stream_entries.scss index 1e29ee718..4df03b794 100644 --- a/app/assets/stylesheets/stream_entries.scss +++ b/app/assets/stylesheets/stream_entries.scss @@ -232,3 +232,24 @@ } } } + +.embed { + .activity-stream { + border-radius: 4px; + box-shadow: none; + + .entry { + &:last-child { + border-radius: 0 0 4px 4px; + } + + &:first-child { + border-radius: 4px 4px 0 0; + + &:last-child { + border-radius: 4px; + } + } + } + } +} -- cgit