This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<%- include('../partials/header') %>
|
||||
|
||||
<div class="container">
|
||||
<h1 style="margin-bottom: 1.5rem;">All Hunts</h1>
|
||||
|
||||
<% if (hunts.length === 0) { %>
|
||||
<div class="card" style="text-align: center; padding: 3rem;">
|
||||
<p style="color: var(--muted);">No hunts have been created yet.</p>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<% hunts.forEach(hunt => { %>
|
||||
<a href="/hunt/<%= hunt.short_name %>" class="hunt-card">
|
||||
<div class="hunt-info">
|
||||
<h3><%= hunt.name %></h3>
|
||||
<span class="meta"><%= hunt.short_name %> · <%= hunt.package_count %> packages · by <%= hunt.creator_name %>
|
||||
<% if (hunt.expiry_date) { %>
|
||||
· Expires: <%= new Date(hunt.expiry_date).toLocaleDateString() %>
|
||||
<% } %>
|
||||
</span>
|
||||
</div>
|
||||
<% if (hunt.expiry_date && new Date(hunt.expiry_date) < new Date()) { %>
|
||||
<span class="badge expired">Expired</span>
|
||||
<% } else { %>
|
||||
<span class="badge"><%= hunt.package_count %> packages</span>
|
||||
<% } %>
|
||||
</a>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<%- include('../partials/footer') %>
|
||||
Reference in New Issue
Block a user