Skip to content

A platform for community discussion. Free, open, simple.

Bump onebox version.

Arpit Jalanbb8cf810897c
diff --git a/Gemfile b/Gemfile
index 36fb7542832..06f0719802d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -46,7 +46,7 @@ gem 'redis-namespace'
gem 'active_model_serializers', '~> 0.8.3'
-gem 'onebox', '1.8.99'
+gem 'onebox', '1.9.0'
gem 'http_accept_language', '~>2.0.5', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index fcce28d8b81..c42577e8613 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -238,7 +238,7 @@ GEM
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
- onebox (1.8.99)
+ onebox (1.9.0)
htmlentities (~> 4.3)
moneta (~> 1.0)
multi_json (~> 1.11)
@@ -487,7 +487,7 @@ DEPENDENCIES
omniauth-oauth2
omniauth-openid
omniauth-twitter
- onebox (= 1.8.99)
+ onebox (= 1.9.0)
openid-redis-store
parallel_tests
pg
diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss
index 1b91e00c5d0..64e891c9415 100644
--- a/app/assets/stylesheets/common/base/onebox.scss
+++ b/app/assets/stylesheets/common/base/onebox.scss
@@ -607,24 +607,43 @@ aside.onebox.stackexchange .onebox-body {
}
}
-.onebox-video-placeholder {
+.onebox-placeholder-container {
position: relative;
width: 100%;
padding: 0 0 48.25% 0;
background-color: $primary-low;
- .video-placeholder-icon {
- &:before {
- opacity: 0.8;
- content: svg-uri(
- '<svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="grey" d="M336.2 64H47.8C21.4 64 0 85.4 0 111.8v288.4C0 426.6 21.4 448 47.8 448h288.4c26.4 0 47.8-21.4 47.8-47.8V111.8c0-26.4-21.4-47.8-47.8-47.8zm189.4 37.7L416 177.3v157.4l109.6 75.5c21.2 14.6 50.4-.3 50.4-25.8V127.5c0-25.4-29.1-40.4-50.4-25.8z"></path></svg>'
- );
- }
+ .placeholder-icon {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
+
+ &.video {
+ &:before {
+ opacity: 0.8;
+ content: svg-uri(
+ '<svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="grey" d="M336.2 64H47.8C21.4 64 0 85.4 0 111.8v288.4C0 426.6 21.4 448 47.8 448h288.4c26.4 0 47.8-21.4 47.8-47.8V111.8c0-26.4-21.4-47.8-47.8-47.8zm189.4 37.7L416 177.3v157.4l109.6 75.5c21.2 14.6 50.4-.3 50.4-25.8V127.5c0-25.4-29.1-40.4-50.4-25.8z"></path></svg>'
+ );
+ }
+ }
+ &.audio {
+ &:before {
+ opacity: 0.4;
+ content: svg-uri(
+ '<svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M511.99 32.01c0-21.71-21.1-37.01-41.6-30.51L150.4 96c-13.3 4.2-22.4 16.5-22.4 30.5v261.42c-10.05-2.38-20.72-3.92-32-3.92-53.02 0-96 28.65-96 64s42.98 64 96 64 96-28.65 96-64V214.31l256-75.02v184.63c-10.05-2.38-20.72-3.92-32-3.92-53.02 0-96 28.65-96 64s42.98 64 96 64 96-28.65 96-64l-.01-351.99z"></path></svg>'
+ );
+ }
+ }
+ &.generic {
+ &:before {
+ opacity: 0.4;
+ content: svg-uri(
+ '<svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"></path></svg>'
+ );
+ }
+ }
}
}