modified: templates/user_giveaways.html

This commit is contained in:
SimolZimol
2024-09-12 15:37:37 +02:00
parent a22cb644b9
commit 72eb412f09

View File

@@ -4,19 +4,13 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Giveaways</title> <title>User Giveaways</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
.container {
margin-top: 50px;
}
</style>
</head> </head>
<body> <body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">Multus Bot - My Giveaways</a> <a class="navbar-brand" href="#">Giveaways</a>
<div class="collapse navbar-collapse" id="navbarNav"> <div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
@@ -29,47 +23,36 @@
</div> </div>
</nav> </nav>
<!-- Giveaways List --> <div class="container mt-5">
<div class="container"> <h1 class="text-center">Your Won Giveaways</h1>
<h1 class="text-center">Giveaways You've Won</h1> {% if giveaways %}
<div class="row mt-5"> <table class="table table-striped">
<div class="col-md-12"> <thead>
{% if giveaways %} <tr>
<table class="table table-bordered"> <th>Platform</th>
<thead class="thead-dark"> <th>Game</th>
<tr> <th>Redeem</th>
<th>ID</th> </tr>
<th>Platform</th> </thead>
<th>Name</th> <tbody>
<th>Game Key</th> {% for giveaway in giveaways %}
<th>Actions</th> <tr>
</tr> <td>{{ giveaway.platform }}</td>
</thead> <td>{{ giveaway.name }}</td>
<tbody> <td>
{% for giveaway in giveaways %} <form method="POST" action="{{ url_for('redeem_giveaway', giveaway_uuid=giveaway.uuid) }}">
<tr> <button type="submit" class="btn btn-success">Redeem</button>
<td>{{ giveaway.id }}</td> </form>
<td>{{ giveaway.platform }}</td> </td>
<td>{{ giveaway.name }}</td> </tr>
<td>{{ giveaway.game_key }}</td> {% endfor %}
<td> </tbody>
<form method="POST" action="{{ url_for('redeem_giveaway', giveaway_id=giveaway.id) }}"> </table>
<button type="submit" class="btn btn-success">Redeem Prize</button> {% else %}
</form> <p class="text-center">You have not won any giveaways yet.</p>
</td> {% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-center">You have not won any giveaways yet.</p>
{% endif %}
</div>
</div>
</div> </div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
</body> </body>
</html> </html>