83 lines
3.7 KiB
Plaintext
83 lines
3.7 KiB
Plaintext
<%- include('partials/header') %>
|
|
|
|
<div class="container">
|
|
<div class="hero">
|
|
<h1>Find. Scan. Conquer.</h1>
|
|
<p>Hunt for hidden QR codes in the real world, earn points, climb the leaderboard. Be the first to find a package for maximum points!</p>
|
|
<div style="display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;">
|
|
<a href="/hunts" class="btn btn-primary">Browse Hunts</a>
|
|
<a href="/leaderboard" class="btn btn-outline">Leaderboard</a>
|
|
<% if (!currentUser) { %>
|
|
<a href="/auth/login" class="btn btn-success">Login</a>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 1rem;">
|
|
<div class="stats-row">
|
|
<div class="stat-box">
|
|
<div class="value">500</div>
|
|
<div class="label">1st Find</div>
|
|
</div>
|
|
<div class="stat-box">
|
|
<div class="value">250</div>
|
|
<div class="label">2nd Find</div>
|
|
</div>
|
|
<div class="stat-box">
|
|
<div class="value">100</div>
|
|
<div class="label">3rd Find</div>
|
|
</div>
|
|
<div class="stat-box">
|
|
<div class="value">50</div>
|
|
<div class="label">4th+ Finds</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 3rem;">
|
|
<div class="scanner-disclaimer">
|
|
<div style="display: flex; align-items: flex-start; gap: 0.75rem;">
|
|
<span style="font-size: 1.5rem; flex-shrink: 0;">🛡️</span>
|
|
<div>
|
|
<strong>Scan QR Codes Safely</strong>
|
|
<p style="margin: 0.25rem 0 0.5rem; color: var(--muted); font-size: 0.9rem;">Not all QR codes can be trusted. Use our <a href="/scanner" style="color: var(--primary); font-weight: 600;">built-in QR scanner</a> to safely scan codes and warn you about invalid ones - at least as far as collecting points is concerned. 🏆</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<% if (hunts && hunts.length > 0) { %>
|
|
<h2 style="margin-top: 2rem; margin-bottom: 1rem;">Active Hunts</h2>
|
|
<% 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 %></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>
|
|
<% }) %>
|
|
<% } %>
|
|
|
|
<% if (typeof recentActivity !== 'undefined' && recentActivity && recentActivity.length > 0) { %>
|
|
<h2 style="margin-top: 2rem; margin-bottom: 1rem;">Recent Activity</h2>
|
|
<div class="card">
|
|
<% recentActivity.forEach(a => { %>
|
|
<div style="display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #eee;">
|
|
<span class="points-badge" style="font-size: 0.85rem; padding: 0.25rem 0.6rem;">+<%= a.points_awarded %></span>
|
|
<div style="flex: 1; min-width: 0;">
|
|
<div style="font-weight: 600;"><a href="/player/<%= a.username %>" style="text-decoration: none; color: inherit;"><%= a.username %></a> found <a href="/hunt/<%= a.hunt_short_name %>/<%= a.card_number %>" style="color: var(--primary);">#<%= a.card_number %></a> in <a href="/hunt/<%= a.hunt_short_name %>" style="color: var(--primary);"><%= a.hunt_name %></a></div>
|
|
<div style="font-size: 0.8rem; color: var(--muted);"><time datetime="<%= a.scanned_at %>"><%= new Date(a.scanned_at).toLocaleString() %></time></div>
|
|
</div>
|
|
</div>
|
|
<% }) %>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
|
|
<%- include('partials/footer') %>
|