CMS 2.0 - Theme engine, logging, admin improvements

Major changes:
- New ThemeManager with Twig templating and SCSS compilation
- Dynamic themes system (themes/default, themes/demo)
- LogManager with SQLite storage and syslog forwarding
- RequestLogger with static helper methods
- Admin UI overhaul (Bootstrap 5, dark mode)
- Admin config page with logging and theme settings
- Admin logs page with filters and search
- Removed legacy Mustache templates
- Removed test plugin and theme
- Composer dependencies: Twig, scssphp, CommonMark, MaxMind GeoIP
This commit is contained in:
2026-08-08 18:02:14 +02:00
parent d453b8073f
commit 6333bc410f
833 changed files with 108974 additions and 1386 deletions
+38
View File
@@ -0,0 +1,38 @@
<h2 class="mb-4"><i class="bi bi-palette"></i> Nieuw thema aanmaken</h2>
<form method="post" class="card shadow-sm">
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrf) ?>">
<div class="card-body">
<?php if (!empty($message)): ?>
<div class="alert alert-<?= $messageType ?>"><?= htmlspecialchars($message) ?></div>
<?php endif; ?>
<div class="mb-3">
<label for="theme_name" class="form-label">Thema naam</label>
<input type="text" class="form-control font-monospace" id="theme_name" name="theme_name"
value="<?= htmlspecialchars($_POST['theme_name'] ?? '') ?>" required
placeholder="bijv. MijnThema">
<div class="form-text">Alleen letters, cijfers, streepjes en underscores. Begin met een letter. Wordt gebruikt als <strong>mapnaam</strong>.</div>
</div>
<div class="alert alert-info mb-0">
<strong><i class="bi bi-lightbulb"></i> Wat wordt er aangemaakt?</strong>
<ul class="mb-0 mt-2">
<li><code>themes/ThemaNaam/theme.json</code> — Configuratie (default template + template mapping)</li>
<li><code>themes/ThemaNaam/base.twig</code> — Hoofd layout</li>
<li><code>themes/ThemaNaam/*.twig</code> — Layout-sjablonen</li>
<li><code>themes/ThemaNaam/partials/</code> — header, navigation, footer</li>
<li><code>themes/ThemaNaam/css/theme.scss</code> — Styling (kleuren, hoogtes, achtergrond)</li>
<li><code>themes/ThemaNaam/js/theme.js</code> — Thema JavaScript</li>
<li><code>themes/ThemaNaam/theme.png</code> — Voorbeeldafbeelding</li>
</ul>
<p class="text-muted mb-0 mt-2">Het nieuwe thema wordt gekopieerd van het standaard thema. Pas daarna de SCSS-kleuren en sjablonen aan naar wens.</p>
</div>
</div>
<div class="card-footer text-end">
<a href="/admin/theme" class="btn btn-secondary">Annuleren</a>
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Aanmaken</button>
</div>
</form>