Pennyalpha / templates /index.html
Sergidev's picture
Upload 7 files
933256c verified
raw
history blame
1.5 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pennyflip</title>
<link
rel="stylesheet"
href="{{ url_for('static', filename='styles.css') }}"
/>
</head>
<body>
<div id="game-container">
<div id="info">
<h2>Pennyflip</h2>
<p>
Balance: $<span id="balance">0.00</span> | Flips left:
<span id="flips-left">1000</span>
</p>
</div>
<div id="coin" style="background-color: {{ coins[0].color }}"></div>
<div id="shop">
{% for coin in coins %}
<div
class="shop-coin"
style="background-color: {{ coin.color }}"
onclick="buyCoin({{ loop.index0 }})"
>
<div>P: {{ "%.2f"|format(coin.winrate) }}</div>
<div>V: ${{ "%.2f"|format(coin.value) }}</div>
<div>C: ${{ "%.2f"|format(coin.price) }}</div>
</div>
{% endfor %}
</div>
<button id="generate-coin">Generate New Coin</button>
</div>
<script>
const coins = {{ coins|tojson|safe }};
</script>
<script src="{{ url_for('static', filename='script.js') }}"></script>
</body>
</html>