40 lines
1.7 KiB
HTML
40 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@300&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
|
<link rel="icon" href="{{ url_for('static', filename='artberry.ico') }}" type="image/x-icon">
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>🫐shop - artberry🫐</title>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h1>Welcome to the Shop!</h1>
|
|
<div class="cookie-balance">
|
|
<span>You have {{ user_cookies }} cookies 🍪</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="item-container">
|
|
{% for item in items %}
|
|
<div class="item">
|
|
<img src="{{ url_for('static', filename=item.item_path) }}" alt="Item {{ item.id }}">
|
|
<form action="{{ url_for('buy_item', item_id=item.id) }}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
{% if item.id in user_item_ids %}
|
|
<button type="button" disabled>You already have this item</button>
|
|
{% elif user_cookies < item.price %}
|
|
<button type="button" disabled>Not enough cookies ({{ item.price }})</button>
|
|
{% else %}
|
|
<button type="submit">Buy item for {{ item.price }} 🍪</button>
|
|
{% endif %}
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<a href="{{ url_for('index') }}" class="home-button">MainPage</a>
|
|
</body>
|
|
</html>
|