First cut of Add / Edit / Active / Answered pages

- Centralized UI between UI and Layout classes
This commit is contained in:
2024-06-22 16:58:33 -04:00
parent 0b7fa77247
commit b759c3494e
20 changed files with 528 additions and 96 deletions

View File

@@ -1,15 +1,15 @@
<?php declare(strict_types=1);
use MyPrayerJournal\Auth;
use MyPrayerJournal\UI;
use MyPrayerJournal\{Auth, Layout, UI};
require '../start.php';
if ($_SERVER['REQUEST_METHOD'] <> 'GET') not_found();
Auth::requireUser();
$user = Auth::user();
$name = $user['given_name'] ?? 'Your';
page_head('Welcome'); ?>
Layout::pageHead('Journal'); ?>
<article class="container-fluid mt-3">
<h2 class=pb-3><?=$name?><?=$name == 'Your' ? '' : '&rsquo;s'?> Prayer Journal</h2>
<p class="pb-3 text-center"><?php
@@ -46,5 +46,5 @@ page_head('Welcome'); ?>
</div>
</div>
</article><?php
page_foot();
Layout::pageFoot();