-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyt.html
More file actions
88 lines (76 loc) · 1.52 KB
/
yt.html
File metadata and controls
88 lines (76 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>EthanYT</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: black;
overflow-x: hidden;
}
main {
position: relative;
left: 50%;
transform: translate(-50%);
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 90%;
}
.box {
width: 24vh;
height: 18vh;
margin: 2vh 2vh 4vh 2vh;
cursor: pointer;
user-select: none;
user-drag: none;
}
img {
width: 100%;
height: 100%;
}
p {
font-family: 'Times New Roman', serif;
color: wheat;
text-align: center;
}
@media (orientation: portrait) {
main {
width: 98%
}
p {
font-size: 30px;
}
.box {
width: 22.08vh;
height: 16.56vh;
}
}
</style>
</head>
<body>
<main></main>
<script src="jquery.js"></script>
<script src="data.js"></script>
<script>
videos.forEach((x, i) => {
const s = thumb_prefix + x + thumb_suffix
const p = $(`<p>${names[i]}</p>`)
const img = $(`<img src="${s}">`)
const box = $(`<div id="${x}" class="box"></div>`)
box.append(img)
box.append(p)
$('main').append(box)
})
$('.box').click(Click)
function Click(e) {
const s = e.target.id || e.target.parentElement.id
window.open(`https://www.youtube.com/watch?v=${s}`)
}
</script>
</body>
</html>