feat: Show article + creator count stats on admin techniques page
This commit is contained in:
parent
baa2a87243
commit
bbea843235
2 changed files with 21 additions and 2 deletions
|
|
@ -5142,11 +5142,23 @@ a.app-footer__about:hover,
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-page__count {
|
.admin-page__stats {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-page__stat {
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-page__stat-sep {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
.admin-page__description {
|
.admin-page__description {
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
|
|
|
||||||
|
|
@ -97,11 +97,18 @@ export default function AdminTechniquePages() {
|
||||||
[expandedSlug],
|
[expandedSlug],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Derived stats
|
||||||
|
const uniqueCreators = new Set(items.map((i) => i.creator_slug)).size;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="admin-page">
|
<div className="admin-page">
|
||||||
<div className="admin-page__header">
|
<div className="admin-page__header">
|
||||||
<h1>Technique Pages</h1>
|
<h1>Technique Pages</h1>
|
||||||
<span className="admin-page__count">{total} pages</span>
|
<div className="admin-page__stats">
|
||||||
|
<span className="admin-page__stat">{total} articles</span>
|
||||||
|
<span className="admin-page__stat-sep">·</span>
|
||||||
|
<span className="admin-page__stat">{uniqueCreators} creators</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="admin-page__description">
|
<p className="admin-page__description">
|
||||||
Browse all synthesized technique pages. Filter by creator or multi-source status.
|
Browse all synthesized technique pages. Filter by creator or multi-source status.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue