imweijh's picture
Upload pages/index.js with huggingface_hub
3795663 verified
import Head from 'next/head'
import SnakeGame from '../components/SnakeGame'
export default function Home() {
return (
<div className="min-h-screen bg-black flex flex-col items-center justify-center p-4">
<Head>
<title>Snake Game</title>
<meta name="description" content="Classic Snake game built with React and Next.js" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<div className="text-center mb-6">
<h1 className="text-4xl md:text-6xl font-bold text-green-500 mb-2">
🐍 Snake Game
</h1>
<p className="text-gray-400 text-lg">
Use arrow keys or WASD to control the snake
</p>
</div>
<SnakeGame />
<div className="mt-8 text-center">
<a
href="https://huggingface.co/spaces/akhaliq/anycoder"
target="_blank"
rel="noopener noreferrer"
className="text-blue-400 hover:text-blue-300 underline"
>
Built with anycoder
</a>
</div>
</div>
)
}