Initial dev export (exclude uploads/runtime)
This commit is contained in:
42
modules/pages/views/admin/home.php
Normal file
42
modules/pages/views/admin/home.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$pageTitle = 'Home Page';
|
||||
$page = $page ?? [];
|
||||
$saved = ($saved ?? '') === '1';
|
||||
ob_start();
|
||||
?>
|
||||
<section class="admin-card">
|
||||
<div class="badge">Home</div>
|
||||
<div style="display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px;">
|
||||
<div>
|
||||
<h1 style="font-size:28px; margin:0;">Home Page</h1>
|
||||
<p style="color: var(--muted); margin-top:6px;">Edit the front page content. Leave title blank to hide it.</p>
|
||||
</div>
|
||||
<a href="/" class="btn outline small">View site</a>
|
||||
</div>
|
||||
|
||||
<?php if ($saved): ?>
|
||||
<div style="margin-top:16px; color:var(--accent-2); font-size:13px;">Home page updated.</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" action="/admin/home/save" style="margin-top:18px; display:grid; gap:16px;">
|
||||
<div class="admin-card" style="padding:16px;">
|
||||
<div style="display:grid; gap:12px;">
|
||||
<label class="label">Title</label>
|
||||
<input class="input" name="title" value="<?= htmlspecialchars((string)($page['title'] ?? ''), ENT_QUOTES, 'UTF-8') ?>" placeholder="AudioCore">
|
||||
<label class="label">Content (HTML)</label>
|
||||
<textarea class="input" name="content_html" rows="12" style="resize:vertical;"><?= htmlspecialchars((string)($page['content_html'] ?? ''), ENT_QUOTES, 'UTF-8') ?></textarea>
|
||||
<label style="display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:0.2em;">
|
||||
<input type="checkbox" name="is_published" value="1" <?= ((int)($page['is_published'] ?? 0) === 1) ? 'checked' : '' ?>>
|
||||
Published
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; justify-content:flex-end;">
|
||||
<button type="submit" class="btn">Save home page</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
require __DIR__ . '/../../../admin/views/layout.php';
|
||||
Reference in New Issue
Block a user