Journal renders correctly

This commit is contained in:
2024-06-22 12:30:26 -04:00
parent 4ea55d4d25
commit 0b7fa77247
7 changed files with 188 additions and 86 deletions

View File

@@ -1,18 +1,20 @@
<?php declare(strict_types=1);
use MyPrayerJournal\Auth;
use MyPrayerJournal\UI;
require '../start.php';
Auth::requireUser();
$user = Auth::user();
$name = $user['first_name'] ?? 'Your';
$name = $user['given_name'] ?? 'Your';
page_head('Welcome'); ?>
<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
page_link('/request/new/edit', icon('add_box') . ' Add a Prayer Request', ['class' => 'btn btn-primary']); ?>
UI::pageLink('/request/edit?id=new', UI::icon('add_box') . ' Add a Prayer Request',
['class' => 'btn btn-primary']); ?>
<p hx-get=/components/journal-items hx-swap=outerHTML hx-trigger=load hx-target=this>
Loading your prayer journal&hellip;
<div id=notesModal class="modal fade" tabindex=-1 aria-labelledby=nodesModalLabel aria-hidden=true>