<%- include("partials/layout-top", { title }) %>
<%- include("partials/page-header", { eyebrow: "Community", pageTitle: "Leaderboards", description: "Browse activity across core features and installed plugins." }) %>
<% if (!sections || !sections.length) { %>

No activity recorded yet.

<% } else { %> <% (sections || []).forEach((section) => { %>

<%= section.title %>

<% if (!section.boards || !section.boards.length) { %>

<%= section.emptyMessage || "No data recorded yet." %>

<% } else { %> <% section.boards.forEach((board) => { %> <% const rowType = board.rowType || "user"; %>

<%= board.label || board.title || "Leaderboard" %>

<% if (!board.rows || !board.rows.length) { %>

<%= board.emptyMessage || "No data recorded yet." %>

<% } else { %>
<% board.rows.forEach((entry) => { %> <% const entryLabel = entry.label || entry.username || "Unknown"; %> <% }) %>
<%= rowType === "command" ? "Command" : rowType === "game" ? "Game" : rowType === "text" ? "Item" : "User" %> <%= board.valueLabel || "Total" %>
<% if (rowType === "user" && entry.username) { %> <%= entry.username %> <% } else if (rowType === "command") { %> <% if (entry.href) { %> <%= entryLabel %> <% } else { %> <%= entryLabel %> <% } %> <% } else { %> <%= entryLabel %> <% } %> <%= entry.value %>
<% } %> <% }) %> <% } %>
<% }) %> <% } %> <%- include("partials/layout-bottom") %>