Files
emailtemplate.it/partials/landingpage/admin/dashboard.php
2025-12-10 01:40:05 +01:00

73 lines
2.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
$pageTitle = 'Email Template System Dashboard';
$pageId = 'dashboard';
$navActive = 'dashboard';
$layoutExtraHead = <<<HTML
<style>
:root { color-scheme: light; }
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin-bottom:1.5rem}
.stat-card{background:#fff;border:1px solid #e2e8f0;border-radius:1rem;padding:1.25rem}
.stat-card h4{margin:0;font-size:.95rem;color:#475569}
.stat-card strong{display:block;font-size:1.75rem;color:#0f172a}
.section-card{background:#fff;border:1px solid #e2e8f0;border-radius:1rem;padding:1.25rem;margin-bottom:1.5rem}
.usage-table{width:100%;border-collapse:collapse;font-size:.9rem}
.usage-table th,.usage-table td{padding:.5rem;border-bottom:1px solid #e2e8f0;text-align:left}
</style>
HTML;
require dirname(__DIR__) . '/../structure/layout_start.php';
?>
<main class="max-w-5xl mx-auto p-4 md:p-6 flex-1 w-full">
<section class="stat-grid" id="dashboardCounts">
<div class="stat-card">
<h4>Templates</h4>
<strong id="count-templates"></strong>
</div>
<div class="stat-card">
<h4>Sections</h4>
<strong id="count-sections"></strong>
</div>
<div class="stat-card">
<h4>Blocks</h4>
<strong id="count-blocks"></strong>
</div>
<div class="stat-card">
<h4>Snippets</h4>
<strong id="count-snippets"></strong>
</div>
</section>
<section class="section-card">
<div class="flex items-center justify-between mb-3">
<h3 class="font-semibold text-base text-slate-900">Aktivität</h3>
<button type="button" class="btn" id="btn-refresh">Aktualisieren</button>
</div>
<ul id="activityList" class="space-y-2 text-sm text-slate-600"></ul>
</section>
<section class="section-card">
<div class="flex items-center justify-between mb-4">
<h3 class="font-semibold text-base text-slate-900">Nutzung & Speicher</h3>
<span class="text-xs text-slate-500">Letzte 30 Tage</span>
</div>
<div class="overflow-auto">
<table class="usage-table" id="usageTable">
<thead>
<tr>
<th>Datum</th>
<th>Aktionen</th>
<th>Templates veröffentlicht</th>
<th>Versandtests</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</section>
</main>
<div id="toast-root"></div>
<?php
tpl_add_script(app_asset_url('/assets/js/toast.js'));
tpl_add_script(app_asset_url('/assets/js/dashboard.js'), 'footer', false, false, '', null, true);
require dirname(__DIR__) . '/../structure/layout_end.php';