Spaces:
Running
Running
Sync from GitHub via hub-sync
Browse files- src/app/globals.css +8 -14
- src/app/page.tsx +14 -68
src/app/globals.css
CHANGED
|
@@ -33,21 +33,15 @@ body {
|
|
| 33 |
.video-background {
|
| 34 |
@apply fixed top-0 right-0 bottom-0 left-0 -z-10 overflow-hidden w-screen h-screen;
|
| 35 |
}
|
| 36 |
-
.video-background
|
| 37 |
-
@apply absolute top-1/2 left-1/2
|
| 38 |
-
width: 100vw;
|
| 39 |
-
height: 100vh;
|
|
|
|
|
|
|
| 40 |
transform: translate(-50%, -50%);
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
.video-background iframe {
|
| 44 |
-
height: 56.25vw;
|
| 45 |
-
}
|
| 46 |
-
}
|
| 47 |
-
@media (max-aspect-ratio: 16/9) {
|
| 48 |
-
.video-background iframe {
|
| 49 |
-
width: 177.78vh;
|
| 50 |
-
}
|
| 51 |
}
|
| 52 |
|
| 53 |
@keyframes fadeInUp {
|
|
|
|
| 33 |
.video-background {
|
| 34 |
@apply fixed top-0 right-0 bottom-0 left-0 -z-10 overflow-hidden w-screen h-screen;
|
| 35 |
}
|
| 36 |
+
.video-background video {
|
| 37 |
+
@apply absolute top-1/2 left-1/2 pointer-events-none bg-black;
|
| 38 |
+
min-width: 100vw;
|
| 39 |
+
min-height: 100vh;
|
| 40 |
+
width: auto;
|
| 41 |
+
height: auto;
|
| 42 |
transform: translate(-50%, -50%);
|
| 43 |
+
object-fit: cover;
|
| 44 |
+
filter: brightness(0.9);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
|
| 47 |
@keyframes fadeInUp {
|
src/app/page.tsx
CHANGED
|
@@ -4,18 +4,6 @@ import Link from "next/link";
|
|
| 4 |
import { useRouter } from "next/navigation";
|
| 5 |
import { useSearchParams } from "next/navigation";
|
| 6 |
|
| 7 |
-
declare global {
|
| 8 |
-
interface Window {
|
| 9 |
-
YT?: {
|
| 10 |
-
Player: new (
|
| 11 |
-
id: string,
|
| 12 |
-
config: Record<string, unknown>,
|
| 13 |
-
) => { destroy?: () => void };
|
| 14 |
-
};
|
| 15 |
-
onYouTubeIframeAPIReady?: () => void;
|
| 16 |
-
}
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
export default function Home() {
|
| 20 |
return (
|
| 21 |
<Suspense fallback={null}>
|
|
@@ -25,9 +13,9 @@ export default function Home() {
|
|
| 25 |
}
|
| 26 |
|
| 27 |
const EXAMPLE_DATASETS = [
|
| 28 |
-
"lerobot
|
| 29 |
-
"imstevenpmwork/thanos_picking_power_gem",
|
| 30 |
"lerobot/aloha_static_cups_open",
|
|
|
|
| 31 |
];
|
| 32 |
|
| 33 |
function HomeInner() {
|
|
@@ -71,58 +59,9 @@ function HomeInner() {
|
|
| 71 |
}
|
| 72 |
}, [searchParams, router]);
|
| 73 |
|
| 74 |
-
const
|
| 75 |
-
|
| 76 |
useEffect(() => {
|
| 77 |
-
|
| 78 |
-
if (!window.YT) {
|
| 79 |
-
const tag = document.createElement("script");
|
| 80 |
-
tag.src = "https://www.youtube.com/iframe_api";
|
| 81 |
-
document.body.appendChild(tag);
|
| 82 |
-
}
|
| 83 |
-
let interval: NodeJS.Timeout;
|
| 84 |
-
window.onYouTubeIframeAPIReady = () => {
|
| 85 |
-
if (!window.YT) return;
|
| 86 |
-
playerRef.current = new window.YT.Player("yt-bg-player", {
|
| 87 |
-
videoId: "Er8SPJsIYr0",
|
| 88 |
-
playerVars: {
|
| 89 |
-
autoplay: 1,
|
| 90 |
-
mute: 1,
|
| 91 |
-
controls: 0,
|
| 92 |
-
showinfo: 0,
|
| 93 |
-
modestbranding: 1,
|
| 94 |
-
rel: 0,
|
| 95 |
-
loop: 1,
|
| 96 |
-
fs: 0,
|
| 97 |
-
playlist: "Er8SPJsIYr0",
|
| 98 |
-
start: 0,
|
| 99 |
-
},
|
| 100 |
-
events: {
|
| 101 |
-
onReady: (event: {
|
| 102 |
-
target: {
|
| 103 |
-
playVideo: () => void;
|
| 104 |
-
mute: () => void;
|
| 105 |
-
seekTo: (t: number) => void;
|
| 106 |
-
getCurrentTime: () => number;
|
| 107 |
-
};
|
| 108 |
-
}) => {
|
| 109 |
-
event.target.playVideo();
|
| 110 |
-
event.target.mute();
|
| 111 |
-
interval = setInterval(() => {
|
| 112 |
-
const t = event.target.getCurrentTime();
|
| 113 |
-
if (t >= 60) {
|
| 114 |
-
event.target.seekTo(0);
|
| 115 |
-
}
|
| 116 |
-
}, 500);
|
| 117 |
-
},
|
| 118 |
-
},
|
| 119 |
-
});
|
| 120 |
-
};
|
| 121 |
-
return () => {
|
| 122 |
-
if (interval) clearInterval(interval);
|
| 123 |
-
if (playerRef.current && playerRef.current.destroy)
|
| 124 |
-
playerRef.current.destroy();
|
| 125 |
-
};
|
| 126 |
}, []);
|
| 127 |
|
| 128 |
const [query, setQuery] = useState("");
|
|
@@ -212,12 +151,19 @@ function HomeInner() {
|
|
| 212 |
|
| 213 |
return (
|
| 214 |
<div className="relative h-screen w-screen overflow-hidden">
|
| 215 |
-
{/*
|
| 216 |
<div className="video-background">
|
| 217 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
</div>
|
| 219 |
|
| 220 |
-
{/* Gradient overlay
|
| 221 |
<div className="fixed inset-0 -z-0 bg-[radial-gradient(ellipse_at_center,rgba(0,0,0,0.35)_0%,rgba(0,0,0,0.80)_100%)]" />
|
| 222 |
|
| 223 |
{/* Centered Content */}
|
|
|
|
| 4 |
import { useRouter } from "next/navigation";
|
| 5 |
import { useSearchParams } from "next/navigation";
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
export default function Home() {
|
| 8 |
return (
|
| 9 |
<Suspense fallback={null}>
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
const EXAMPLE_DATASETS = [
|
| 16 |
+
"lerobot/high_quality_folding",
|
|
|
|
| 17 |
"lerobot/aloha_static_cups_open",
|
| 18 |
+
"imstevenpmwork/thanos_picking_power_gem",
|
| 19 |
];
|
| 20 |
|
| 21 |
function HomeInner() {
|
|
|
|
| 59 |
}
|
| 60 |
}, [searchParams, router]);
|
| 61 |
|
| 62 |
+
const videoRef = useRef<HTMLVideoElement>(null);
|
|
|
|
| 63 |
useEffect(() => {
|
| 64 |
+
if (videoRef.current) videoRef.current.playbackRate = 1.5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
}, []);
|
| 66 |
|
| 67 |
const [query, setQuery] = useState("");
|
|
|
|
| 151 |
|
| 152 |
return (
|
| 153 |
<div className="relative h-screen w-screen overflow-hidden">
|
| 154 |
+
{/* Video Background */}
|
| 155 |
<div className="video-background">
|
| 156 |
+
<video
|
| 157 |
+
ref={videoRef}
|
| 158 |
+
src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/lerobot/level2.mp4"
|
| 159 |
+
autoPlay
|
| 160 |
+
muted
|
| 161 |
+
loop
|
| 162 |
+
playsInline
|
| 163 |
+
/>
|
| 164 |
</div>
|
| 165 |
|
| 166 |
+
{/* Gradient overlay */}
|
| 167 |
<div className="fixed inset-0 -z-0 bg-[radial-gradient(ellipse_at_center,rgba(0,0,0,0.35)_0%,rgba(0,0,0,0.80)_100%)]" />
|
| 168 |
|
| 169 |
{/* Centered Content */}
|