2020-08-29 05:16:26 +09:00
|
|
|
<div class="note">
|
|
|
|
<div class="note-info">
|
2020-09-07 06:34:36 +09:00
|
|
|
{% set nickname = note.getActorNickname() %}
|
2020-08-29 05:16:26 +09:00
|
|
|
<a href="{{ path('settings_avatar') }}">
|
2020-09-07 06:34:36 +09:00
|
|
|
<img src="{{ note.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">
|
2020-08-29 05:16:26 +09:00
|
|
|
</a>
|
2020-09-07 06:34:36 +09:00
|
|
|
<b>{{ nickname }}</b>
|
|
|
|
{% set reply_to = note.getReplyToNickname() %}
|
|
|
|
{% if reply_to is not null and not skip_reply_to is defined %}
|
|
|
|
{% trans with {'%name%': reply_to}%} in reply to %name% {% endtrans %}
|
|
|
|
{% endif %}
|
2020-08-29 05:16:26 +09:00
|
|
|
</div>
|
|
|
|
<div class="note-content">
|
2021-01-04 08:17:06 +09:00
|
|
|
{% block markdown %}
|
|
|
|
{% apply markdown_to_html %}
|
|
|
|
{{ note.getContent() }}
|
|
|
|
{% endapply %}
|
|
|
|
{% endblock %}
|
2020-11-24 00:06:23 +09:00
|
|
|
<div class="note-other-content">
|
|
|
|
{% for other in get_note_other_content(note) %}
|
|
|
|
{% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %}
|
2020-11-20 23:59:15 +09:00
|
|
|
{% endfor %}
|
2020-11-22 11:36:01 +09:00
|
|
|
</div>
|
2020-09-05 11:28:50 +09:00
|
|
|
<div class="note-attachments">
|
|
|
|
{% for attachment in note.getAttachments() %}
|
2021-04-19 20:20:10 +09:00
|
|
|
{% set thumbnail_parameters = {'id': attachment.getId(), 'w': config('thumbnail','width'), 'h': config('thumbnail','height')} %}
|
2020-09-05 11:28:50 +09:00
|
|
|
{% if attachment.mimetype starts with 'image/' %}
|
2020-09-05 14:37:30 +09:00
|
|
|
<div>
|
2021-04-15 08:30:35 +09:00
|
|
|
<figure>
|
2021-04-19 20:20:10 +09:00
|
|
|
<img src="{{ path('attachment_thumbnail', thumbnail_parameters) }}" alt="{{ attachment.getTitle() }}">
|
2021-04-18 13:47:16 +09:00
|
|
|
<figcaption> <a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getTitle() }}</a> </figcaption>
|
2021-04-15 08:30:35 +09:00
|
|
|
</figure>
|
2020-09-05 14:37:30 +09:00
|
|
|
</div>
|
2020-09-05 11:28:50 +09:00
|
|
|
{% elseif attachment.mimetype starts with 'video/' %}
|
2020-09-05 14:37:30 +09:00
|
|
|
<div>
|
2021-04-19 20:20:10 +09:00
|
|
|
<video src="{{ path('attachment_view', {'id': attachment.getId()}) }}" controls poster="{{ path('attachment_thumbnail') }}, thumbnail_parameters">
|
2021-04-18 13:47:16 +09:00
|
|
|
<i> <a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getTitle() }}</a> </i>
|
2020-09-05 14:37:30 +09:00
|
|
|
</video>
|
|
|
|
</div>
|
2020-09-05 11:28:50 +09:00
|
|
|
{% else %}
|
2020-09-05 14:37:30 +09:00
|
|
|
<div>
|
2021-04-18 13:47:16 +09:00
|
|
|
<i> <a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getTitle() }}</a> </i>
|
2020-09-05 14:37:30 +09:00
|
|
|
</div>
|
2020-09-05 11:28:50 +09:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-08-29 05:16:26 +09:00
|
|
|
</div>
|
|
|
|
<div class="note-actions">
|
2020-09-11 05:40:58 +09:00
|
|
|
{% if have_user %}
|
2021-04-15 08:30:35 +09:00
|
|
|
{#{% for act in get_note_actions(note) %}#}
|
|
|
|
{#{{ form(act) }}#}
|
|
|
|
{#{% endfor %}#}
|
2020-09-11 05:40:58 +09:00
|
|
|
{% endif %}
|
2020-08-29 05:16:26 +09:00
|
|
|
</div>
|
2021-04-15 08:30:35 +09:00
|
|
|
{% if replies is defined %}
|
|
|
|
<div class="replies">
|
|
|
|
{% for conversation in replies %}
|
|
|
|
{% include '/note/view.html.twig' with {'note': conversation['note'], 'skip_reply_to': true, 'have_user': have_user, 'replies': conversation['replies']} only %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-08-29 05:16:26 +09:00
|
|
|
</div>
|