modified: templates/user_giveaways.html
This commit is contained in:
@@ -6,80 +6,68 @@
|
||||
<title>Your Won Giveaways</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.server-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
.table-container {
|
||||
background-color: #f8f9fa;
|
||||
padding: 2rem;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.server-header img {
|
||||
border-radius: 50%;
|
||||
margin-right: 1rem;
|
||||
.status-badge {
|
||||
font-size: 0.9rem;
|
||||
padding: 0.5em;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.user-avatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
margin-right: 0.5rem;
|
||||
.redeem-btn {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.table thead {
|
||||
background-color: #343a40;
|
||||
color: #fff;
|
||||
h2 {
|
||||
color: #343a40;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% include 'navigation.html' %}
|
||||
<div class="container mt-5">
|
||||
<!-- Server and User Header -->
|
||||
<div class="server-header">
|
||||
<img src="{{ g.guild_logo }}" alt="Server Logo" width="80" height="80">
|
||||
<div>
|
||||
<h2>{{ g.guild_name }}</h2>
|
||||
<p class="text-muted">Your Won Giveaways on this server</p>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="text-center">Your Won Giveaways on Server {{ guild_id }}</h2>
|
||||
<p class="text-center text-muted">Here you can view all the giveaways you've won on this server.</p>
|
||||
|
||||
<!-- User Avatar and Name -->
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<img src="{{ g.user_info['avatar'] }}" alt="User Avatar" class="user-avatar">
|
||||
<h4>{{ g.user_info['username'] }}</h4>
|
||||
<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>
|
||||
|
||||
<!-- Giveaways Table -->
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Platform</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for giveaway in won_giveaways %}
|
||||
<tr>
|
||||
<td>{{ giveaway.name }}</td>
|
||||
<td>{{ giveaway.platform }}</td>
|
||||
<td class="text-center">
|
||||
{% if giveaway.aktiv %}
|
||||
<span class="badge badge-success">Redeemed</span>
|
||||
{% else %}
|
||||
<span class="badge badge-warning">Not Redeemed</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if giveaway.aktiv %}
|
||||
<!-- Link to view the redeemed key -->
|
||||
<a href="{{ url_for('redeem_giveaway', guild_id=g.guild_id, uuid=giveaway['uuid']) }}" class="btn btn-secondary btn-sm">View Key</a>
|
||||
{% else %}
|
||||
<!-- Link to redeem the giveaway -->
|
||||
<a href="{{ url_for('redeem_giveaway', guild_id=g.guild_id, uuid=giveaway['uuid']) }}" class="btn btn-primary btn-sm">Redeem</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user