mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
FEATURE: bump onebox version, add styling for new reddit image onebox
This commit is contained in:
2
Gemfile
2
Gemfile
@ -44,7 +44,7 @@ gem 'redis-namespace'
|
|||||||
|
|
||||||
gem 'active_model_serializers', '~> 0.8.3'
|
gem 'active_model_serializers', '~> 0.8.3'
|
||||||
|
|
||||||
gem 'onebox', '1.8.82'
|
gem 'onebox', '1.8.83'
|
||||||
|
|
||||||
gem 'http_accept_language', '~>2.0.5', require: false
|
gem 'http_accept_language', '~>2.0.5', require: false
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ GEM
|
|||||||
mocha (1.5.0)
|
mocha (1.5.0)
|
||||||
metaclass (~> 0.0.1)
|
metaclass (~> 0.0.1)
|
||||||
mock_redis (0.18.0)
|
mock_redis (0.18.0)
|
||||||
moneta (1.0.0)
|
moneta (1.1.0)
|
||||||
msgpack (1.2.6)
|
msgpack (1.2.6)
|
||||||
multi_json (1.13.1)
|
multi_json (1.13.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
@ -263,7 +263,7 @@ GEM
|
|||||||
omniauth-twitter (1.4.0)
|
omniauth-twitter (1.4.0)
|
||||||
omniauth-oauth (~> 1.1)
|
omniauth-oauth (~> 1.1)
|
||||||
rack
|
rack
|
||||||
onebox (1.8.82)
|
onebox (1.8.83)
|
||||||
htmlentities (~> 4.3)
|
htmlentities (~> 4.3)
|
||||||
moneta (~> 1.0)
|
moneta (~> 1.0)
|
||||||
multi_json (~> 1.11)
|
multi_json (~> 1.11)
|
||||||
@ -524,7 +524,7 @@ DEPENDENCIES
|
|||||||
omniauth-oauth2
|
omniauth-oauth2
|
||||||
omniauth-openid
|
omniauth-openid
|
||||||
omniauth-twitter
|
omniauth-twitter
|
||||||
onebox (= 1.8.82)
|
onebox (= 1.8.83)
|
||||||
openid-redis-store
|
openid-redis-store
|
||||||
parallel_tests
|
parallel_tests
|
||||||
pg
|
pg
|
||||||
|
@ -244,8 +244,9 @@ aside.onebox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// instagram fixes
|
// instagram + reddit fixes
|
||||||
.instagram-images {
|
.instagram-images,
|
||||||
|
.scale-images {
|
||||||
clear: both;
|
clear: both;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@ -262,7 +263,8 @@ aside.onebox {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.instagram-image {
|
.instagram-image,
|
||||||
|
.scale-image {
|
||||||
padding: 5px 5px 5px 5px;
|
padding: 5px 5px 5px 5px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
|
@ -568,7 +568,7 @@ class CookedPostProcessor
|
|||||||
new_parent = img.add_next_sibling("<div class='aspect-image' style='--aspect-ratio:#{width}/#{height};'/>")
|
new_parent = img.add_next_sibling("<div class='aspect-image' style='--aspect-ratio:#{width}/#{height};'/>")
|
||||||
new_parent.first.add_child(img)
|
new_parent.first.add_child(img)
|
||||||
end
|
end
|
||||||
elsif (parent_class&.include?("instagram-images") || parent_class&.include?("tweet-images")) && width > 0 && height > 0
|
elsif (parent_class&.include?("instagram-images") || parent_class&.include?("tweet-images") || parent_class&.include?("scale-images")) && width > 0 && height > 0
|
||||||
img.remove_attribute("width")
|
img.remove_attribute("width")
|
||||||
img.remove_attribute("height")
|
img.remove_attribute("height")
|
||||||
img.parent["class"] = "aspect-image-full-size"
|
img.parent["class"] = "aspect-image-full-size"
|
||||||
|
Reference in New Issue
Block a user