aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/note.php17
-rw-r--r--templates/write_note_form.php11
2 files changed, 22 insertions, 6 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);
diff --git a/templates/write_note_form.php b/templates/write_note_form.php
index d2dae61..b86e825 100644
--- a/templates/write_note_form.php
+++ b/templates/write_note_form.php
@@ -9,13 +9,12 @@
<div class="handle">@<?= $actor->handle ?></div>
</div>
</div>
- <div class="row">
+ <div class="row summaryAndContent">
<label for="noteContent"><?= __('writeNote.label') ?></label>
- <textarea name="content" id="noteContent" required autocomplete="off"></textarea>
- </div>
- <div class="row">
- <label for="noteSummary"><?= __('writeNote.summary.label') ?></label>
- <input type="text" id="noteSummary" name="summary" autocomplete="off">
+ <input type="text" id="noteSummary" name="summary" autocomplete="off"
+ placeholder="<?= __('writeNote.summary.label') ?>">
+ <textarea name="content" id="noteContent" required autocomplete="off"
+ placeholder="<?= __('writeNote.placeholder') ?>"></textarea>
</div>
<div class="row">
<label class="standalone"><?= __('writeNote.mentions.label') ?></label>