Files
Website/views/admin/dashboard.ejs
T
2026-11-24 22:05:11 +01:00

84 lines
3.5 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<%- include('../partials/head'); -%>
<%- include('../partials/admin-base'); -%>
<title>Admin - Dashboard</title>
</head>
<body>
<%- include('../winter'); -%>
<div class="admin-shell">
<div class="page-head">
<h1>The dashboard</h1>
<div class="spacer"></div>
<a class="btn" href="<%= endpoint %>/logout">Logout</a>
</div>
<div class="stat-grid">
<div class="stat-card">
<span class="kpi"><%= stats.visits.toLocaleString() %></span>
<span class="label">Total visits</span>
</div>
<div class="stat-card">
<span class="kpi"><%= stats.visitors.toLocaleString() %></span>
<span class="label">Tracked visitors</span>
</div>
<div class="stat-card">
<span class="kpi"><%= stats.countries.toLocaleString() %></span>
<span class="label">Countries</span>
</div>
<div class="stat-card">
<span class="kpi"><%= stats.last24h.toLocaleString() %></span>
<span class="label">Visits (24h)</span>
</div>
</div>
<a class="card" href="<%= endpoint %>/analytics" style="display:flex;align-items:center;gap:1rem;text-decoration:none;">
<span class="ico" style="width:14px;height:14px;border:2px solid var(--accent);border-radius:0;transform:rotate(45deg);flex:0 0 auto;"></span>
<span style="display:flex;flex-direction:column;gap:0.2rem;">
<strong style="color:var(--accent);font-size:1.05rem;">Open Analytics</strong>
<span class="sub">Traffic over time, most visited pages, countries, providers, browsers and activity heatmap.</span>
</span>
</a>
<div class="admin-section-title">Content</div>
<div class="admin-nav">
<a href="<%= endpoint %>/meta-editor"><span class="ico"></span> Metadata</a>
<a href="<%= endpoint %>/meta-editor#page-font"><span class="ico"></span> Page font</a>
<a href="<%= endpoint %>/icon-editor"><span class="ico"></span> Icons</a>
<a href="<%= endpoint %>/link-editor"><span class="ico"></span> Links</a>
<a href="<%= endpoint %>/project-editor"><span class="ico"></span> Projects</a>
<a href="<%= endpoint %>/badge-editor"><span class="ico"></span> Badges</a>
<a href="<%= endpoint %>/redirect-editor"><span class="ico"></span> Redirects</a>
</div>
<div class="admin-section-title">Media</div>
<div class="admin-nav">
<a href="<%= endpoint %>/gallery-editor"><span class="ico"></span> Gallery</a>
<a href="<%= endpoint %>/storage-editor"><span class="ico"></span> Files</a>
<a href="<%= endpoint %>/artist-editor"><span class="ico"></span> Artists</a>
</div>
<div class="admin-section-title">Access &amp; analytics</div>
<div class="admin-nav">
<a href="<%= endpoint %>/access-code-editor"><span class="ico"></span> Access codes</a>
<a href="<%= endpoint %>/stalker"><span class="ico"></span> IP tracker</a>
<a href="<%= endpoint %>/stalker-map"><span class="ico"></span> IP map</a>
<a href="<%= endpoint %>/analytics"><span class="ico"></span> Analytics</a>
</div>
<% if (links.length) { %>
<div class="admin-section-title">Traffic reports</div>
<div class="admin-nav">
<% links.forEach(link => { %>
<a href="<%= link %>"><span class="ico"></span> <%= link %></a>
<% }) %>
</div>
<% } %>
</div>
<%- include('../footer'); -%>
</body>
</html>