All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
<%- 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 <time datetime="<%= hunt.expiry_date %>"><%= new Date(hunt.expiry_date).toLocaleDateString() %></time>
|
|
<% } %>
|
|
<% if (hunt.start_date && new Date(hunt.start_date) > new Date()) { %>
|
|
· Starts <time datetime="<%= hunt.start_date %>"><%= new Date(hunt.start_date).toLocaleDateString() %></time>
|
|
<% } %>
|
|
</span>
|
|
</div>
|
|
<% if (hunt.expiry_date && new Date(hunt.expiry_date) < new Date()) { %>
|
|
<span class="badge expired">Expired</span>
|
|
<% } else if (hunt.start_date && new Date(hunt.start_date) > new Date()) { %>
|
|
<span class="badge">Upcoming</span>
|
|
<% } else { %>
|
|
<span class="badge"><%= hunt.package_count %> packages</span>
|
|
<% } %>
|
|
</a>
|
|
<% }) %>
|
|
<% } %>
|
|
</div>
|
|
|
|
<%- include('../partials/footer') %>
|