Spaces:
Running
Running
WatchOutForMike
commited on
Commit
β’
1aa3773
1
Parent(s):
f00d544
Add 4 files
Browse files
README.md
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
colorFrom: red
|
5 |
-
colorTo: purple
|
6 |
sdk: static
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
license: apache-2.0
|
3 |
+
title: wheel
|
|
|
|
|
4 |
sdk: static
|
5 |
+
emoji: π¨βπ»
|
6 |
+
colorFrom: yellow
|
7 |
+
colorTo: green
|
8 |
+
---
|
|
index.html
CHANGED
@@ -1,19 +1 @@
|
|
1 |
-
|
2 |
-
<html>
|
3 |
-
<head>
|
4 |
-
<meta charset="utf-8" />
|
5 |
-
<meta name="viewport" content="width=device-width" />
|
6 |
-
<title>My static Space</title>
|
7 |
-
<link rel="stylesheet" href="style.css" />
|
8 |
-
</head>
|
9 |
-
<body>
|
10 |
-
<div class="card">
|
11 |
-
<h1>Welcome to your static Space!</h1>
|
12 |
-
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
|
13 |
-
<p>
|
14 |
-
Also don't forget to check the
|
15 |
-
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
16 |
-
</p>
|
17 |
-
</div>
|
18 |
-
</body>
|
19 |
-
</html>
|
|
|
1 |
+
<html><head><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.css" rel="stylesheet" type="text/css" /><script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script><script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script><script defer src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.156.1/three.min.js"></script><script type="module" src="main.js"></script><title>Pro wrestlers game</title></head><body><nav class="header"><h1>Pro wrestlers game</h1><a href="#">About</a></nav><main id="app"><h2>Welcome to the Pro wrestlers game!</h2><p>You can create and play with various wrestlers in this game.</p><div><button class="btn">Start</button></div></main><footer class="footer"><p>Made with π» by <a href="#">Max</a></p></footer></body></html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { Alpine } = window.Alpine;
|
2 |
+
const { Daisy } = window.Daisy;
|
3 |
+
|
4 |
+
(() => {
|
5 |
+
const root = document.getElementById("app");
|
6 |
+
root.innerHTML = `${root.innerHTML}
|
7 |
+
{{#each wrestler in wrestlers}}
|
8 |
+
<div class="wrestler">
|
9 |
+
<h3>${wrestler.name}</h3>
|
10 |
+
<button class="btn btn-success" @click="${() => onWrestlerClick(wrestler)}">Play</button>
|
11 |
+
</div>
|
12 |
+
{{/each}}`;
|
13 |
+
})();
|
14 |
+
|
15 |
+
function onWrestlerClick(wrestler) {
|
16 |
+
console.log(`Clicked on wrestler ${wrestler.name}`);
|
17 |
+
}
|
18 |
+
|
19 |
+
console.log("DaisyUI loaded");
|
style.css
CHANGED
@@ -1,28 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
margin-top: 0;
|
9 |
-
}
|
10 |
-
|
11 |
-
p {
|
12 |
-
color: rgb(107, 114, 128);
|
13 |
-
font-size: 15px;
|
14 |
-
margin-bottom: 10px;
|
15 |
-
margin-top: 5px;
|
16 |
-
}
|
17 |
-
|
18 |
-
.card {
|
19 |
-
max-width: 620px;
|
20 |
-
margin: 0 auto;
|
21 |
-
padding: 16px;
|
22 |
-
border: 1px solid lightgray;
|
23 |
-
border-radius: 16px;
|
24 |
-
}
|
25 |
-
|
26 |
-
.card p:last-child {
|
27 |
-
margin-bottom: 0;
|
28 |
-
}
|
|
|
1 |
+
.wrestler {
|
2 |
+
color: white;
|
3 |
+
background: black;
|
4 |
+
border: 1px solid rgb(135, 155, 16);
|
5 |
+
border-radius: 5px;
|
6 |
+
padding: 5px;
|
7 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|