From a30cc5643c1e8366d2e8743fbe7c01ce1a468111 Mon Sep 17 00:00:00 2001 From: RblSb Date: Sat, 18 Jan 2025 08:37:21 +0300 Subject: Make raw videos adaptive for aspect ratios Sadly there is no info about video size for iframes, so they will be keeped as 16/9. Let me know if this change breaks anything. --- src/client/Buttons.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/Buttons.hx') diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx index f5f26e8..dbcf759 100644 --- a/src/client/Buttons.hx +++ b/src/client/Buttons.hx @@ -116,7 +116,7 @@ class Buttons { icon.setAttribute("name", "chevron-down"); style.display = "block"; final list = wrap.firstElementChild; - wrap.style.height = outerHeight(list) + "px"; + wrap.style.height = "15vh"; wrap.style.marginBottom = "1rem"; } else { icon.setAttribute("name", "chevron-forward"); @@ -132,7 +132,7 @@ class Buttons { else { final wrap = ge("#userlist-wrap"); final list = wrap.firstElementChild; - wrap.style.height = outerHeight(list) + "px"; + wrap.style.height = "15vh"; } // enable animation after page loads Timer.delay(() -> { -- cgit v1.2.3