aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorwinter2025-01-01 19:52:18 +0000
committerwinter2025-01-01 19:52:18 +0000
commitfea439b57f9ba225e2d3169d7615c0bd2aecabe4 (patch)
tree477357cb50c029fde839aea272ba30b20a66129f /templates
parent02a6acd4cfddaecd9075b706fdbdc0396d76d8c3 (diff)
ultra basic post form
doesn't do much but i just wanted to get this working at a bare minimum
Diffstat (limited to 'templates')
-rw-r--r--templates/skeleton.php20
-rw-r--r--templates/write_note_form.php9
2 files changed, 25 insertions, 4 deletions
diff --git a/templates/skeleton.php b/templates/skeleton.php
index 8ac1549..072f812 100644
--- a/templates/skeleton.php
+++ b/templates/skeleton.php
@@ -35,10 +35,22 @@ $user = Digitigrade\Model\UserAccount::findByCurrentSession();
</nav>
</header>
<main>
- <?php if (!isset($renderTitleHeading) || $renderTitleHeading): ?>
- <h1><?= $pageTitle ?></h1>
- <?php endif; ?>
- <?php slot(); ?>
+ <section id="leftPane">
+ <?php
+ if ($user != null) {
+ call_template('write_note_form');
+ }
+ ?>
+ </section>
+ <section id="centrePane">
+ <?php if (!isset($renderTitleHeading) || $renderTitleHeading): ?>
+ <h1><?= $pageTitle ?></h1>
+ <?php endif; ?>
+ <?php slot(); ?>
+ </section>
+ <section id="rightPane">
+
+ </section>
</main>
</body>
diff --git a/templates/write_note_form.php b/templates/write_note_form.php
new file mode 100644
index 0000000..49fcafc
--- /dev/null
+++ b/templates/write_note_form.php
@@ -0,0 +1,9 @@
+<form action="/todo" method="post" hx-post="/fragment/note" hx-swap="outerHTML" hx-disabled-elt="find button">
+ <div class="row">
+ <label for="noteContent"><?= __('writeNote.label') ?></label>
+ <textarea name="content" id="noteContent"></textarea>
+ </div>
+ <div class="row">
+ <button><?= __('writeNote.action') ?></button>
+ </div>
+</form> \ No newline at end of file