Files
Discord-ai-chatbot/templates/user_giveaways.html
SimolZimol 276da56fdb modified: app.py
modified:   templates/user_giveaways.html
2024-10-29 11:00:38 +01:00

74 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Won Giveaways - {{ guild_name }}</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
.table-container {
background-color: #f8f9fa;
padding: 2rem;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
.status-badge {
font-size: 0.9rem;
padding: 0.5em;
border-radius: 5px;
}
.redeem-btn {
font-size: 0.9rem;
}
h2 {
color: #343a40;
}
</style>
</head>
<body>
{% include 'navigation.html' %}
<div class="container mt-5">
<h2 class="text-center">Your Won Giveaways on {{ guild_name }}</h2>
<p class="text-center text-muted">Here you can view all the giveaways you've won on this server.</p>
<div class="table-container mt-4">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Platform</th>
<th scope="col">Status</th>
<th scope="col" class="text-center">Action</th>
</tr>
</thead>
<tbody>
{% for giveaway in won_giveaways %}
<tr>
<td>{{ giveaway.name }}</td>
<td>{{ giveaway.platform }}</td>
<td>
{% if giveaway.aktiv %}
<span class="badge badge-success status-badge">Redeemed</span>
{% else %}
<span class="badge badge-warning status-badge">Not Redeemed</span>
{% endif %}
</td>
<td class="text-center">
{% if giveaway.aktiv %}
<a href="{{ url_for('redeem_giveaway', guild_id=guild_id, uuid=giveaway['uuid']) }}" class="btn btn-secondary btn-sm redeem-btn">View Key</a>
{% else %}
<a href="{{ url_for('redeem_giveaway', guild_id=guild_id, uuid=giveaway['uuid']) }}" class="btn btn-primary btn-sm redeem-btn">Redeem</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if won_giveaways|length == 0 %}
<p class="text-center text-muted">You haven't won any giveaways on this server yet.</p>
{% endif %}
</div>
</div>
</body>
</html>