Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +48 -8
templates/index.html
CHANGED
@@ -8,26 +8,66 @@
|
|
8 |
</head>
|
9 |
<body>
|
10 |
<div id="game-container">
|
|
|
11 |
<div id="info">
|
12 |
-
<h2>Pennyflip</h2>
|
13 |
Balance: $<span id="balance">0.00</span> | Flips left: <span id="flips-left">1000</span>
|
14 |
</div>
|
15 |
|
16 |
-
<div id="coin"
|
17 |
|
18 |
<div id="shop">
|
19 |
{% for coin in coins %}
|
20 |
-
<div class="shop-item"
|
21 |
-
<div class="shop-coin">
|
22 |
-
<
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
</div>
|
26 |
</div>
|
27 |
{% endfor %}
|
28 |
</div>
|
29 |
|
30 |
-
<button id="generate-coin">Generate New Coin</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
<div id="loading-overlay">
|
33 |
<div class="loading-message">Generating coin...</div>
|
|
|
8 |
</head>
|
9 |
<body>
|
10 |
<div id="game-container">
|
11 |
+
<h1>Pennyflip</h1>
|
12 |
<div id="info">
|
|
|
13 |
Balance: $<span id="balance">0.00</span> | Flips left: <span id="flips-left">1000</span>
|
14 |
</div>
|
15 |
|
16 |
+
<div id="coin"></div>
|
17 |
|
18 |
<div id="shop">
|
19 |
{% for coin in coins %}
|
20 |
+
<div class="shop-item" data-index="{{ loop.index0 }}">
|
21 |
+
<div class="shop-coin" style="background-color: {{ coin.color }}">
|
22 |
+
<span class="coin-price">${{ "%.2f"|format(coin.price) }}</span>
|
23 |
+
</div>
|
24 |
+
<div class="coin-name">{{ coin.name }}</div>
|
25 |
+
<div class="coin-tooltip">
|
26 |
+
<strong>{{ coin.name }}</strong><br>
|
27 |
+
Cost: ${{ "%.2f"|format(coin.price) }}<br>
|
28 |
+
Value: ${{ "%.2f"|format(coin.value) }}<br>
|
29 |
+
Win rate: {{ "%.2f"|format(coin.winrate) }}<br>
|
30 |
+
{% if coin.ability %}
|
31 |
+
Ability: {{ coin.ability }}
|
32 |
+
{% endif %}
|
33 |
</div>
|
34 |
</div>
|
35 |
{% endfor %}
|
36 |
</div>
|
37 |
|
38 |
+
<button id="generate-coin">Generate New Coin ($4)</button>
|
39 |
+
|
40 |
+
<div id="leaderboard">
|
41 |
+
<h2>Leaderboard</h2>
|
42 |
+
<table>
|
43 |
+
<thead>
|
44 |
+
<tr>
|
45 |
+
<th>Rank</th>
|
46 |
+
<th>Initials</th>
|
47 |
+
<th>Score</th>
|
48 |
+
</tr>
|
49 |
+
</thead>
|
50 |
+
<tbody>
|
51 |
+
{% for entry in leaderboard %}
|
52 |
+
<tr>
|
53 |
+
<td>{{ loop.index }}</td>
|
54 |
+
<td>{{ entry.initials }}</td>
|
55 |
+
<td>${{ "%.2f"|format(entry.score) }}</td>
|
56 |
+
</tr>
|
57 |
+
{% endfor %}
|
58 |
+
</tbody>
|
59 |
+
</table>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<div id="game-over" class="modal">
|
63 |
+
<div class="modal-content">
|
64 |
+
<h2>Game Over</h2>
|
65 |
+
<p>Your final score: $<span id="final-score"></span></p>
|
66 |
+
<input type="text" id="initials" maxlength="3" placeholder="Enter your initials">
|
67 |
+
<button id="submit-score">Submit Score</button>
|
68 |
+
<button id="play-again">Play Again</button>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
|
72 |
<div id="loading-overlay">
|
73 |
<div class="loading-message">Generating coin...</div>
|