Move files, complete PHP migration

The application works the same way as the F# version
This commit is contained in:
2024-06-23 16:35:55 -04:00
parent 9421bb2035
commit 20ad50928a
37 changed files with 354 additions and 301 deletions

View File

@@ -1,6 +1,7 @@
<?php declare(strict_types=1);
use MyPrayerJournal\{Auth, Layout, UI};
use MyPrayerJournal\Auth;
use MyPrayerJournal\UI\{Component, Layout};
require '../start.php';
if ($_SERVER['REQUEST_METHOD'] <> 'GET') not_found();
@@ -12,9 +13,9 @@ $name = $user['given_name'] ?? 'Your';
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
UI::pageLink('/request/edit?id=new', UI::icon('add_box') . ' Add a Prayer Request',
['class' => 'btn btn-primary']); ?>
<p class="pb-3 text-center">
<?=Component::pageLink('/request/edit?id=new', Component::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>