blob: 97cea6dcbeb54186b84a05b2a25ee997ad9b6288 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
/** @var \Digitigrade\Model\Note $note */
$page = $note->getPage();
call_template('skeleton', [
'pageTitle' => $page->title,
'renderTitleHeading' => false,
'ogDesc' => __f('note.page.description', $note->author->displayName),
'ogImage' => $note->author->avatar ?? path_to_uri('/static/default-avatar.png'),
'ogType' => 'article',
'ogHandle' => '@' . $note->author->getFullHandle(true)
], 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 });
|