modified: app.py
new file: templates/redeem_giveaway.html modified: templates/user_giveaways.html
This commit is contained in:
28
templates/redeem_giveaway.html
Normal file
28
templates/redeem_giveaway.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Redeem Giveaway</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1 class="text-center">Giveaway Prize</h1>
|
||||
<p class="text-center">Congratulations! You have won the giveaway for <strong>{{ giveaway.name }}</strong> on
|
||||
<strong>{{ giveaway.platform }}</strong>.</p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Your Key</h5>
|
||||
<p class="card-text">{{ key }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{ url_for('user_giveaways') }}" class="btn btn-primary mt-4">Back to Giveaways</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -4,55 +4,34 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>User Giveaways</title>
|
||||
<title>Your Giveaways</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="#">Giveaways</a>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('user_dashboard') }}">User Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('logout') }}">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container mt-5">
|
||||
<h1 class="text-center">Your Won Giveaways</h1>
|
||||
{% if giveaways %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Platform</th>
|
||||
<th>Game</th>
|
||||
<th>Redeem</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for giveaway in giveaways %}
|
||||
<tr>
|
||||
<td>{{ giveaway.platform }}</td>
|
||||
<td>{{ giveaway.name }}</td>
|
||||
<td>
|
||||
<form method="POST" action="{{ url_for('redeem_giveaway', giveaway_uuid=giveaway.uuid) }}">
|
||||
<button type="submit" class="btn btn-success">Redeem</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="text-center">You have not won any giveaways yet.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1 class="text-center">Your Giveaways</h1>
|
||||
<p class="text-center">Here you can view the giveaways you've won.</p>
|
||||
|
||||
<div class="row mt-4">
|
||||
{% if giveaways %}
|
||||
{% for giveaway in giveaways %}
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ giveaway.name }}</h5>
|
||||
<p class="card-text">Platform: {{ giveaway.platform }}</p>
|
||||
<a href="{{ url_for('redeem_giveaway', uuid=giveaway.uuid) }}" class="btn btn-primary">Claim Your
|
||||
Key</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p class="text-center">You haven't won any giveaways yet.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user