AV: precise recolor to spec — warm dark backgrounds (#1c1815/#231d18/#26201a/#15110e) + gold #F0A623 / orange #D85A30 accents + warm text (#FBEFE0/#C9BBA8/#8a7e6e). 138 component files + 36 token swaps.
This commit is contained in:
@@ -64,7 +64,7 @@ interface MonthlyTrend {
|
||||
// ─── Mock / derived data helpers ──────────────────────────────────────────────
|
||||
|
||||
const CATEGORY_COLORS = [
|
||||
'#ffb800', '#f59e0b', '#10b981', '#8b5cf6',
|
||||
'#F0A623', '#f59e0b', '#10b981', '#8b5cf6',
|
||||
'#ef4444', '#06b6d4', '#f97316', '#84cc16',
|
||||
];
|
||||
|
||||
@@ -78,9 +78,9 @@ interface StatCardProps {
|
||||
icon: React.ReactNode;
|
||||
}
|
||||
|
||||
function StatCard({ label, value, sub, accent = '#ffb800', icon }: StatCardProps) {
|
||||
function StatCard({ label, value, sub, accent = '#F0A623', icon }: StatCardProps) {
|
||||
return (
|
||||
<div className="bg-[#111] border border-[#252525] rounded-lg p-5 flex items-start gap-4">
|
||||
<div className="bg-[#111] border border-[#3a322b] rounded-lg p-5 flex items-start gap-4">
|
||||
<div
|
||||
className="w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0"
|
||||
style={{ background: `${accent}18` }}
|
||||
@@ -112,7 +112,7 @@ function SectionHeader({ title, subtitle }: { title: string; subtitle?: string }
|
||||
function ChartTooltip({ active, payload, label }: any) {
|
||||
if (!active || !payload?.length) return null;
|
||||
return (
|
||||
<div className="bg-[#1a1a1a] border border-[#333] rounded-lg px-3 py-2 text-xs font-body shadow-xl">
|
||||
<div className="bg-[#231d18] border border-[#333] rounded-lg px-3 py-2 text-xs font-body shadow-xl">
|
||||
{label && <p className="text-[#888] mb-1">{label}</p>}
|
||||
{payload.map((entry: any, i: number) => (
|
||||
<p key={i} style={{ color: entry.color }} className="leading-5">
|
||||
@@ -252,7 +252,7 @@ export default function AdminAnalyticsPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-[#0a0a0a] flex items-center justify-center">
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<div className="w-8 h-8 border-2 border-[#ffb800] border-t-transparent rounded-full animate-spin" />
|
||||
<div className="w-8 h-8 border-2 border-[#F0A623] border-t-transparent rounded-full animate-spin" />
|
||||
<p className="text-[#555] text-sm font-body">Loading analytics…</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -266,7 +266,7 @@ export default function AdminAnalyticsPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-[#0a0a0a] text-white">
|
||||
{/* ── Page Header ─────────────────────────────────────────────────── */}
|
||||
<div className="bg-[#111] border-b border-[#252525]">
|
||||
<div className="bg-[#111] border-b border-[#3a322b]">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 py-5 flex items-center justify-between gap-4">
|
||||
<div>
|
||||
<h1 className="text-white text-xl font-bold font-heading uppercase tracking-wider">Analytics</h1>
|
||||
@@ -275,20 +275,20 @@ export default function AdminAnalyticsPage() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<Link href="/admin/articles" className="text-[#555] hover:text-[#ffb800] text-xs font-body uppercase tracking-wider transition-colors">
|
||||
<Link href="/admin/articles" className="text-[#555] hover:text-[#F0A623] text-xs font-body uppercase tracking-wider transition-colors">
|
||||
Articles
|
||||
</Link>
|
||||
<span className="text-[#333]">·</span>
|
||||
<Link href="/admin/users" className="text-[#555] hover:text-[#ffb800] text-xs font-body uppercase tracking-wider transition-colors">
|
||||
<Link href="/admin/users" className="text-[#555] hover:text-[#F0A623] text-xs font-body uppercase tracking-wider transition-colors">
|
||||
Users
|
||||
</Link>
|
||||
<span className="text-[#333]">·</span>
|
||||
<Link href="/admin/import" className="text-[#555] hover:text-[#ffb800] text-xs font-body uppercase tracking-wider transition-colors">
|
||||
<Link href="/admin/import" className="text-[#555] hover:text-[#F0A623] text-xs font-body uppercase tracking-wider transition-colors">
|
||||
WP Import
|
||||
</Link>
|
||||
<button
|
||||
onClick={fetchAnalytics}
|
||||
className="ml-2 px-3 py-1.5 bg-[#1a1a1a] border border-[#333] hover:border-[#ffb800] text-[#888] hover:text-[#ffb800] text-xs font-body rounded transition-colors"
|
||||
className="ml-2 px-3 py-1.5 bg-[#231d18] border border-[#333] hover:border-[#F0A623] text-[#888] hover:text-[#F0A623] text-xs font-body rounded transition-colors"
|
||||
>
|
||||
Refresh
|
||||
</button>
|
||||
@@ -312,7 +312,7 @@ export default function AdminAnalyticsPage() {
|
||||
label="Total Articles"
|
||||
value={metrics?.totalArticles ?? 0}
|
||||
icon={<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>}
|
||||
accent="#ffb800"
|
||||
accent="#F0A623"
|
||||
/>
|
||||
<StatCard
|
||||
label="Published"
|
||||
@@ -361,7 +361,7 @@ export default function AdminAnalyticsPage() {
|
||||
value={`${publishRate}%`}
|
||||
sub="Published / total"
|
||||
icon={<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/></svg>}
|
||||
accent="#ffb800"
|
||||
accent="#F0A623"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
@@ -369,7 +369,7 @@ export default function AdminAnalyticsPage() {
|
||||
{/* ── Monthly Trend ────────────────────────────────────────────── */}
|
||||
<section>
|
||||
<SectionHeader title="Monthly Trends" subtitle="Published, imported, and native articles over the last 6 months" />
|
||||
<div className="bg-[#111] border border-[#252525] rounded-lg p-5">
|
||||
<div className="bg-[#111] border border-[#3a322b] rounded-lg p-5">
|
||||
{monthlyTrends.length > 0 ? (
|
||||
<ResponsiveContainer width="100%" height={240}>
|
||||
<LineChart data={monthlyTrends} margin={{ top: 4, right: 8, left: -20, bottom: 0 }}>
|
||||
@@ -395,7 +395,7 @@ export default function AdminAnalyticsPage() {
|
||||
{/* Author Contributions */}
|
||||
<section>
|
||||
<SectionHeader title="Author Contributions" subtitle="Top contributors by article count" />
|
||||
<div className="bg-[#111] border border-[#252525] rounded-lg p-5">
|
||||
<div className="bg-[#111] border border-[#3a322b] rounded-lg p-5">
|
||||
{authorStats.length > 0 ? (
|
||||
<ResponsiveContainer width="100%" height={280}>
|
||||
<BarChart
|
||||
@@ -429,7 +429,7 @@ export default function AdminAnalyticsPage() {
|
||||
{/* Top Categories */}
|
||||
<section>
|
||||
<SectionHeader title="Top-Performing Categories" subtitle="Article distribution by category" />
|
||||
<div className="bg-[#111] border border-[#252525] rounded-lg p-5">
|
||||
<div className="bg-[#111] border border-[#3a322b] rounded-lg p-5">
|
||||
{categoryStats.length > 0 ? (
|
||||
<>
|
||||
<ResponsiveContainer width="100%" height={200}>
|
||||
@@ -481,7 +481,7 @@ export default function AdminAnalyticsPage() {
|
||||
<SectionHeader title="Import Success Rates" subtitle="Publishing success across content sources" />
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{importStats.map((stat) => (
|
||||
<div key={stat.label} className="bg-[#111] border border-[#252525] rounded-lg p-5">
|
||||
<div key={stat.label} className="bg-[#111] border border-[#3a322b] rounded-lg p-5">
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<p className="text-white text-sm font-bold font-heading uppercase tracking-wider">{stat.label}</p>
|
||||
<span
|
||||
@@ -526,7 +526,7 @@ export default function AdminAnalyticsPage() {
|
||||
{/* ── Author Detail Table ──────────────────────────────────────── */}
|
||||
<section>
|
||||
<SectionHeader title="Author Detail Breakdown" subtitle="Per-author article status distribution" />
|
||||
<div className="bg-[#111] border border-[#252525] rounded-lg overflow-hidden">
|
||||
<div className="bg-[#111] border border-[#3a322b] rounded-lg overflow-hidden">
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full text-sm font-body">
|
||||
<thead>
|
||||
@@ -550,7 +550,7 @@ export default function AdminAnalyticsPage() {
|
||||
return (
|
||||
<tr
|
||||
key={a.author_name}
|
||||
className={`border-b border-[#1a1a1a] hover:bg-[#151515] transition-colors ${i % 2 === 0 ? '' : 'bg-[#0d0d0d]'}`}
|
||||
className={`border-b border-[#231d18] hover:bg-[#151515] transition-colors ${i % 2 === 0 ? '' : 'bg-[#1c1815]'}`}
|
||||
>
|
||||
<td className="px-4 py-3 text-white font-medium">{a.author_name}</td>
|
||||
<td className="px-4 py-3 text-right text-[#888]">{a.total}</td>
|
||||
|
||||
Reference in New Issue
Block a user