diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/skeleton.php | 20 | ||||
| -rw-r--r-- | templates/write_note_form.php | 9 |
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 |
