diff options
Diffstat (limited to 'templates/note_page.php')
| -rw-r--r-- | templates/note_page.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/note_page.php b/templates/note_page.php new file mode 100644 index 0000000..647c64e --- /dev/null +++ b/templates/note_page.php @@ -0,0 +1,36 @@ +<?php + +/** @var \Digitigrade\Model\Note $note */ + +use Digitigrade\FormattingProvider; +use Digitigrade\Model\UserAccount; +use Digitigrade\UserSettings; + +$page = $note->getPage(); + +call_template('skeleton', ['pageTitle' => $page->title, 'renderTitleHeading' => false], function () use ($note, $page) { ?> + <div class="notePage"> + <article lang="<?= htmlspecialchars($note->language) ?>"> + <h1><?= htmlspecialchars($page->title) ?></h1> + <a class="pageAuthor" href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"> + <?php call_template('actor_avatar', ['actor' => $note->author]); ?> + <span><?= __f( + 'note.page.author', + '<span class="displayName">' . htmlspecialchars($note->author->displayName) . '</span>' + ) ?></span> + </a> + <div class="created"> + <?= __f('note.page.created', format_datetime($note->created)) ?> + </div> + <?php if (isset($note->modified) && $note->modified != $note->created): ?> + <div class="modified"> + <?= __f('note.page.modified', format_datetime($note->modified)) ?> + </div> + <?php endif; ?> + <hr> + <div class="pageContent"> + <?= $page->getBestContentAsHtml() ?> + </div> + </article> + </div> +<?php });
\ No newline at end of file |
