tractatus/public/admin/newsletter-management.html
TheFlow 03faedfb38 feat(admin): Phase 2 - standardize admin UI with unified navbar component
SUMMARY:
Completed Phase 2 of admin UI overhaul: Created unified navbar component
for simple pages, standardized CSS versioning across all pages, and fixed
broken navigation. Pragmatic approach preserves valuable cross-page navigation
while ensuring consistency.

CHANGES - Simple Pages (Unified Navbar Component):
- newsletter-management.html: Replaced custom navbar with component
- hooks-dashboard.html: Replaced custom navbar with component
- audit-analytics.html: Fixed wrong navbar (was using public site component)

CHANGES - Complex Pages (Standardized CSS Only):
- case-moderation.html: Added CSS version v=1759833751
- media-triage.html: Added CSS version v=1759833751
- project-manager.html: Updated CSS version to v=1759833751
- rule-manager.html: Updated CSS version to v=1759833751
(These pages retained custom navbars to preserve cross-page navigation UX)

COMPONENT ENHANCEMENTS:
- navbar-admin.js: Added 'hooks' icon for Framework Hooks Dashboard
- Newsletter management JS: Removed manual admin-name and logout handling

CSS STANDARDIZATION:
Target version: /css/tailwind.css?v=1759833751
- 7 pages now use standardized version (was 3 different versions + missing)

RESULTS:
- All admin pages now have consistent navbar styling
- Simple pages use unified component (3 pages)
- Complex pages use standardized custom navbars (6 pages)
- All pages have correct CSS versioning
- audit-analytics.html fixed (was using wrong component)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 21:51:09 +13:00

116 lines
5.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Newsletter Management | Tractatus Admin</title>
<link rel="stylesheet" href="/css/tailwind.css?v=1759833751">
<link rel="stylesheet" href="/css/tractatus-theme.min.css">
<script src="/js/admin/auth-check.js"></script>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<div id="admin-navbar" data-page-title="Newsletter Management" data-page-icon="newsletter"></div>
<script src="/js/components/navbar-admin.js"></script>
<!-- Main Content -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<!-- Statistics Cards -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="bg-white rounded-lg shadow p-6">
<div class="text-sm text-gray-500">Total Subscribers</div>
<div class="text-3xl font-bold text-gray-900 mt-2" id="stat-total">-</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="text-sm text-gray-500">Active Subscribers</div>
<div class="text-3xl font-bold text-green-600 mt-2" id="stat-active">-</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="text-sm text-gray-500">Verified</div>
<div class="text-3xl font-bold text-blue-600 mt-2" id="stat-verified">-</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="text-sm text-gray-500">Last 30 Days</div>
<div class="text-3xl font-bold text-indigo-600 mt-2" id="stat-recent">-</div>
</div>
</div>
<!-- Actions -->
<div class="bg-white rounded-lg shadow p-6 mb-8">
<div class="flex justify-between items-center">
<h2 class="text-lg font-medium text-gray-900">Actions</h2>
<div class="flex gap-3">
<button id="refresh-btn" class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
Refresh
</button>
<button id="export-btn" class="px-4 py-2 bg-blue-600 text-white rounded-md text-sm font-medium hover:bg-blue-700">
Export CSV
</button>
</div>
</div>
</div>
<!-- Subscribers List -->
<div class="bg-white rounded-lg shadow">
<div class="px-6 py-4 border-b border-gray-200">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-gray-900">Subscribers</h3>
<div class="flex gap-2">
<select id="filter-status" class="px-3 py-2 border border-gray-300 rounded-md text-sm">
<option value="active">Active</option>
<option value="all">All</option>
<option value="inactive">Inactive</option>
</select>
<select id="filter-verified" class="px-3 py-2 border border-gray-300 rounded-md text-sm">
<option value="all">All Verification</option>
<option value="verified">Verified</option>
<option value="unverified">Unverified</option>
</select>
</div>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Subscribed</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody id="subscribers-table" class="bg-white divide-y divide-gray-200">
<tr>
<td colspan="6" class="px-6 py-8 text-center text-gray-500">Loading subscribers...</td>
</tr>
</tbody>
</table>
</div>
<!-- Pagination -->
<div class="px-6 py-4 border-t border-gray-200 flex justify-between items-center">
<div class="text-sm text-gray-500">
Showing <span id="showing-from">0</span> to <span id="showing-to">0</span> of <span id="total-count">0</span> subscribers
</div>
<div class="flex gap-2">
<button id="prev-page" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
Previous
</button>
<button id="next-page" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
Next
</button>
</div>
</div>
</div>
</div>
<script src="/js/admin/newsletter-management.js?v=1760394750"></script>
</body>
</html>