mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 15:45:32 +08:00
FEATURE: Use full post width for Vimeo embeds (#17289)
This commit is contained in:
parent
49905a4e6c
commit
f130ec35d9
@ -887,6 +887,19 @@ aside.onebox.mixcloud-preview {
|
||||
}
|
||||
}
|
||||
|
||||
iframe.vimeo-onebox {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
aspect-ratio: 16/9;
|
||||
}
|
||||
|
||||
@supports not (aspect-ratio: auto) {
|
||||
iframe.vimeo-onebox {
|
||||
width: 690px;
|
||||
height: 388px;
|
||||
}
|
||||
}
|
||||
|
||||
.video-container {
|
||||
.notice {
|
||||
background-color: var(--highlight-medium);
|
||||
|
@ -10,9 +10,6 @@ module Onebox
|
||||
requires_iframe_origins "https://player.vimeo.com"
|
||||
always_https
|
||||
|
||||
WIDTH ||= 640
|
||||
HEIGHT ||= 360
|
||||
|
||||
def placeholder_html
|
||||
::Onebox::Helpers.video_placeholder_html
|
||||
end
|
||||
@ -24,8 +21,7 @@ module Onebox
|
||||
|
||||
<<-HTML
|
||||
<iframe
|
||||
width="#{WIDTH}"
|
||||
height="#{HEIGHT}"
|
||||
class="vimeo-onebox"
|
||||
src="#{video_src}"
|
||||
data-original-href="#{link}"
|
||||
frameborder="0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user