Update index.html
Browse files- index.html +27 -49
index.html
CHANGED
@@ -1,59 +1,37 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
-
<meta charset="UTF-8"
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
6 |
-
<title>LeRobot Hackathon
|
7 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
</head>
|
9 |
<body>
|
10 |
-
<
|
11 |
-
|
12 |
-
<p>Select a project to watch the demo video:</p>
|
13 |
-
|
14 |
-
<select id="teamSelect"></select>
|
15 |
-
|
16 |
-
<video id="videoPlayer" width="720" height="400" controls autoplay muted playsinline>
|
17 |
-
<source id="videoSource" src="" type="video/mp4" />
|
18 |
-
Your browser does not support the video tag.
|
19 |
-
</video>
|
20 |
-
</div>
|
21 |
|
22 |
<script>
|
23 |
-
|
24 |
-
const select = document.getElementById("teamSelect");
|
25 |
-
const player = document.getElementById("videoPlayer");
|
26 |
-
const source = document.getElementById("videoSource");
|
27 |
-
|
28 |
-
const response = await fetch("https://datasets-server.huggingface.co/rows?dataset=roboticshack/submissions&config=default&split=train&offset=0&limit=100");
|
29 |
-
const data = await response.json();
|
30 |
-
|
31 |
-
const rows = data.rows;
|
32 |
-
|
33 |
-
rows.forEach(row => {
|
34 |
-
const videoUrl = row.row.video;
|
35 |
-
const teamName = row.row.team_name;
|
36 |
-
const title = row.row.project_title;
|
37 |
-
const option = document.createElement("option");
|
38 |
-
option.value = videoUrl;
|
39 |
-
option.textContent = `${teamName} - ${title}`;
|
40 |
-
select.appendChild(option);
|
41 |
-
});
|
42 |
-
|
43 |
-
if (rows.length > 0) {
|
44 |
-
source.src = rows[0].row.video;
|
45 |
-
player.load();
|
46 |
-
player.play();
|
47 |
-
}
|
48 |
-
|
49 |
-
select.addEventListener("change", () => {
|
50 |
-
source.src = select.value;
|
51 |
-
player.load();
|
52 |
-
player.play();
|
53 |
-
});
|
54 |
-
}
|
55 |
-
|
56 |
-
loadVideos();
|
57 |
</script>
|
58 |
</body>
|
59 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>LeRobot Hackathon Demos</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
background-color: #f0f0f0;
|
11 |
+
margin: 0;
|
12 |
+
padding: 20px;
|
13 |
+
}
|
14 |
+
.video-grid {
|
15 |
+
display: flex;
|
16 |
+
flex-wrap: wrap;
|
17 |
+
gap: 20px;
|
18 |
+
justify-content: center;
|
19 |
+
}
|
20 |
+
.video-grid video {
|
21 |
+
width: 320px;
|
22 |
+
height: 180px;
|
23 |
+
object-fit: cover;
|
24 |
+
border: 2px solid #ccc;
|
25 |
+
border-radius: 8px;
|
26 |
+
}
|
27 |
+
</style>
|
28 |
</head>
|
29 |
<body>
|
30 |
+
<h1>LeRobot Hackathon Demo Videos</h1>
|
31 |
+
<div class="video-grid" id="videoContainer"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
<script>
|
34 |
+
// JavaScript will be added here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
</script>
|
36 |
</body>
|
37 |
</html>
|