Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: video layout

Christian Fei4df0a478bfe1
diff --git a/client/components/video-element.js b/client/components/video-element.js
index 69edabb..e79b250 100644
--- a/client/components/video-element.js
+++ b/client/components/video-element.js
@@ -96,7 +96,7 @@ class VideoElement extends HTMLElement {
}
watchVideoHandler (event) {
event.preventDefault()
- this.querySelector('.play-video-placeholder').outerHTML = /*html*/`<video controls width="280">
+ this.querySelector('.play-video-placeholder').outerHTML = /*html*/`<video controls width="400">
<source src="/videos/${this.video.id}" type="video/mp4" />
<track
default
diff --git a/client/main.css b/client/main.css
index bcbda39..775f7eb 100644
--- a/client/main.css
+++ b/client/main.css
@@ -124,8 +124,8 @@ form {
.video {
position: relative;
- width: 280px;
- max-height: 300px;
+ width: 400px;
+ /* max-height: 300px; */
text-align: left;
text-decoration: none;
font-weight: bold;
@@ -150,7 +150,7 @@ form {
.video .title {
margin-top: 5px;
margin-bottom: 5px;
- min-height: 4rem;
+ min-height: 2rem;
}
.video img {
width: 100%;
@@ -180,8 +180,9 @@ form {
}
.play-video-placeholder {
- height: 157px;
+ height: 225px;
background-color: #ceaf80;
+ background-size: contain;
display: flex;
align-items: center;
justify-content: center;