Spaces:
Build error
Build error
Upload pages/index.js with huggingface_hub
Browse files- pages/index.js +37 -0
pages/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Head from 'next/head'
|
| 2 |
+
import SnakeGame from '../components/SnakeGame'
|
| 3 |
+
|
| 4 |
+
export default function Home() {
|
| 5 |
+
return (
|
| 6 |
+
<div className="min-h-screen bg-black flex flex-col items-center justify-center p-4">
|
| 7 |
+
<Head>
|
| 8 |
+
<title>Snake Game</title>
|
| 9 |
+
<meta name="description" content="Classic Snake game built with React and Next.js" />
|
| 10 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 11 |
+
<link rel="icon" href="/favicon.ico" />
|
| 12 |
+
</Head>
|
| 13 |
+
|
| 14 |
+
<div className="text-center mb-6">
|
| 15 |
+
<h1 className="text-4xl md:text-6xl font-bold text-green-500 mb-2">
|
| 16 |
+
🐍 Snake Game
|
| 17 |
+
</h1>
|
| 18 |
+
<p className="text-gray-400 text-lg">
|
| 19 |
+
Use arrow keys or WASD to control the snake
|
| 20 |
+
</p>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
<SnakeGame />
|
| 24 |
+
|
| 25 |
+
<div className="mt-8 text-center">
|
| 26 |
+
<a
|
| 27 |
+
href="https://huggingface.co/spaces/akhaliq/anycoder"
|
| 28 |
+
target="_blank"
|
| 29 |
+
rel="noopener noreferrer"
|
| 30 |
+
className="text-blue-400 hover:text-blue-300 underline"
|
| 31 |
+
>
|
| 32 |
+
Built with anycoder
|
| 33 |
+
</a>
|
| 34 |
+
</div>
|
| 35 |
+
</div>
|
| 36 |
+
)
|
| 37 |
+
}
|