diff options
Diffstat (limited to 'templates/note.php')
| -rw-r--r-- | templates/note.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/note.php b/templates/note.php index 4d05554..c69531b 100644 --- a/templates/note.php +++ b/templates/note.php @@ -77,6 +77,23 @@ if ($user != null) { <?php endif; ?> </div> + <?php if (count($note->attachments) > 0): ?> + <div class="attachments"> + <?php foreach ($note->attachments as $attachment): ?> + <div> + <?php if (str_starts_with($attachment->type, 'image/')): ?> + <img src="<?= $attachment->href ?>"> + <?php else: ?> + <a class="file" href="<?= $attachment->href ?>" target="_blank"> + <span class="material-symbols attach-file"></span> + <span><?= $attachment->description ?? basename($attachment->href) ?></span> + </a> + <?php endif; ?> + </div> + <?php endforeach; ?> + </div> + <?php endif; ?> + <div class="buttons"> <?php foreach (['like', 'dislike', 'reshare'] as $action) { $kind = InteractionKind::from($action); |
