Skip to content

Commit 2026416

Browse files
committed
_content/blog: fix video embed overflows on mobile
Fixes golang/go#42493 Change-Id: Ib2cf3802e3067578a9ece950033d6f547bd1828d Reviewed-on: https://go-review.googlesource.com/c/website/+/677815 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent b634b1b commit 2026416

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_content/blog/default.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
{{end}}
6363

6464
{{define "video url width? height?"}}
65-
<div class="iframe">
66-
<iframe src="{{.url}}" width="{{or .width 560}}" height="{{or .height 315}}" frameborder="0" allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe>
65+
<div class="iframe" style="aspect-ratio: {{or .width 560}} / {{or .height 315}}">
66+
<iframe src="{{.url}}" width="100%" height="100%" frameborder="0" allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe>
6767
</div>
6868
{{end}}

0 commit comments

Comments
 (0)