2022-02-10 03:49:34 +09:00
|
|
|
{% macro note_vanilla(note, replies, extra) %}
|
2022-02-07 06:37:04 +09:00
|
|
|
{% set actor = note.getActor() %}
|
|
|
|
{% set nickname = actor.getNickname() %}
|
|
|
|
{% set fullname = actor.getFullname() %}
|
|
|
|
{% set actor_uri = actor.getUri() %}
|
|
|
|
{% set actor_url = actor.getUrl() %}
|
|
|
|
{% set mention = mention(actor) %}
|
|
|
|
{% set note_language = note.getNoteLanguageShortDisplay() %}
|
|
|
|
|
2022-02-10 03:49:34 +09:00
|
|
|
<article
|
|
|
|
id="{{ 'note-anchor-' ~ note.getId() }}"
|
|
|
|
class="h-entry hentry note"
|
|
|
|
lang="{{ note.getLanguageLocale() }}"
|
|
|
|
title="{{'A note by actor' | trans}} {{ nickname }}"
|
|
|
|
role="article"
|
|
|
|
tabindex="0">
|
2022-02-07 06:37:04 +09:00
|
|
|
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }}
|
2022-02-08 10:26:25 +09:00
|
|
|
|
2022-02-07 06:37:04 +09:00
|
|
|
<div class="note-wrapper">
|
2022-02-10 03:49:34 +09:00
|
|
|
{{ block('note_info', 'cards/blocks/note.html.twig') }}
|
2022-02-07 06:37:04 +09:00
|
|
|
|
2022-02-10 03:49:34 +09:00
|
|
|
<section class="e-content entry-content note-content" title="{{ 'Note\'s main content' | trans }}">
|
|
|
|
{% if extra.parent is defined %}
|
|
|
|
<em class="note-replies-parent" title="{{'Reply with depth' | trans}} {{ extra.depth }}" tabindex="0">
|
|
|
|
{{'in reply to' | trans}} {{ extra.parent | raw }}
|
|
|
|
</em>
|
|
|
|
{% endif %}
|
2022-02-07 06:37:04 +09:00
|
|
|
{{ block('note_text', 'cards/blocks/note.html.twig') }}
|
|
|
|
{{ block('note_attachments', 'cards/blocks/note.html.twig') }}
|
|
|
|
{{ block('note_links', 'cards/blocks/note.html.twig') }}
|
|
|
|
</section>
|
|
|
|
</div>
|
2022-02-09 01:13:46 +09:00
|
|
|
{{ block('note_complementary', 'cards/blocks/note.html.twig') }}
|
2022-02-07 06:37:04 +09:00
|
|
|
</article>
|
2022-02-08 10:26:25 +09:00
|
|
|
|
2022-02-10 03:49:34 +09:00
|
|
|
{% if replies is defined %}
|
|
|
|
{{ block('note_replies', 'cards/blocks/note.html.twig') }}
|
|
|
|
{% endif %}
|
2022-02-07 06:37:04 +09:00
|
|
|
{% endmacro note_vanilla %}
|
|
|
|
|
|
|
|
{% macro note_compact(note) %}
|
|
|
|
{% set actor = note.getActor() %}
|
|
|
|
{% set nickname = actor.getNickname() %}
|
|
|
|
{% set fullname = actor.getFullname() %}
|
|
|
|
{% set actor_uri = actor.getUri() %}
|
|
|
|
{% set actor_url = actor.getUrl() %}
|
|
|
|
{% set mention = mention(actor) %}
|
|
|
|
|
|
|
|
<article class="h-entry hentry note" lang={{ note.getLanguageLocale() }}>
|
|
|
|
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }}
|
|
|
|
<div class="note-wrapper">
|
|
|
|
<header class="note-info">
|
|
|
|
<div class="note-info-start">
|
|
|
|
{{ block('note_author', 'cards/blocks/note.html.twig') }}
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<section role="dialog" class="e-content entry-content note-content">
|
|
|
|
<small class="note-conversation-info">
|
|
|
|
<a href="{{ note.getConversationUrl() }}"
|
|
|
|
class="note-conversation-url">{{ 'in conversation' | trans }}</a>
|
|
|
|
<a href="{{ note.getUrl() }}"
|
|
|
|
class="note-url">{{ note.getModified() | ago }}</a>
|
|
|
|
</small>
|
|
|
|
<hr>
|
|
|
|
{{ block('note_text', 'cards/blocks/note.html.twig') }}
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{% endmacro note_compact %}
|