diff options
Diffstat (limited to 'templates/note.php')
| -rw-r--r-- | templates/note.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/note.php b/templates/note.php index 81f7e38..4cdcd94 100644 --- a/templates/note.php +++ b/templates/note.php @@ -5,6 +5,8 @@ use Digitigrade\Model\NotePrivacyScope; use Digitigrade\Model\UserAccount; use Digitigrade\UserSettings; +const MAX_PREVIEW_CARDS = 1; + $user = UserAccount::findByCurrentSession(); $prefs = $user ? new UserSettings($user) : null; $interKinds = []; @@ -89,6 +91,15 @@ if ($user != null) { </div> <?php endif; ?> + <?php + $i = 0; + foreach ($note->getLinkPreviews() as $preview) { + call_template("note_link_preview", ['preview' => $preview]); + if (++$i > MAX_PREVIEW_CARDS) + break; + } + ?> + <?php if (isset($note->summary)): ?> </details> <?php endif; ?> |
