From c74cc1123f01c321da5453dc31c5ba85fd90a95e Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 15 Sep 2018 12:15:39 -0500 Subject: [PATCH] Maintain aspect ratio even when JS is disabled --- assets/css/default.css | 13 +++++++++++++ src/invidious/views/watch.ecr | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/assets/css/default.css b/assets/css/default.css index 6e807f3c..8e809dea 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -201,3 +201,16 @@ div { background-size: cover; object-fit: cover; } + +#player { + position: absolute; + left: 0; + top: 0; + height: 100%; +} + +#player-container { + position: relative; + padding-bottom: 56.25%; + height: 0; +} diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index f0ec6f6a..e4cd201d 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -26,7 +26,7 @@ <%= HTML.escape(video.title) %> - Invidious <% end %> -
+
<%= rendered "components/player" %>