first commit
Some checks failed
Build Images and Deploy / Update-PROD-Stack (push) Failing after 14s
Some checks failed
Build Images and Deploy / Update-PROD-Stack (push) Failing after 14s
This commit is contained in:
29
src/views/admin/dashboard.ejs
Normal file
29
src/views/admin/dashboard.ejs
Normal file
@@ -0,0 +1,29 @@
|
||||
<%- include('../partials/header') %>
|
||||
|
||||
<div class="container">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem;">
|
||||
<h1>Admin Dashboard</h1>
|
||||
<a href="/admin/hunts/new" class="btn btn-primary">+ New Hunt</a>
|
||||
</div>
|
||||
|
||||
<% if (hunts.length === 0) { %>
|
||||
<div class="card" style="text-align: center; padding: 3rem;">
|
||||
<p style="color: var(--muted); font-size: 1.1rem;">You haven't created any hunts yet.</p>
|
||||
<a href="/admin/hunts/new" class="btn btn-primary" style="margin-top: 1rem;">Create Your First Hunt</a>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<% hunts.forEach(hunt => { %>
|
||||
<a href="/admin/hunts/<%= hunt.id %>" class="hunt-card">
|
||||
<div class="hunt-info">
|
||||
<h3><%= hunt.name %></h3>
|
||||
<span class="meta"><%= hunt.short_name %> · <%= hunt.package_count %> packages
|
||||
<% if (hunt.expiry_date) { %> · Expires: <%= new Date(hunt.expiry_date).toLocaleDateString() %><% } %>
|
||||
</span>
|
||||
</div>
|
||||
<span class="badge">Manage</span>
|
||||
</a>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<%- include('../partials/footer') %>
|
||||
Reference in New Issue
Block a user