{# args: { 'type': { 'vanilla_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #} {% macro vanilla_full(args) %} {% set note = args.note %} {% if args.replies is defined %}{% set replies = args.replies %}{% else %}{% set replies = null %}{% endif %} {% if args.extra is defined %}{% set extra = args.extra %}{% else %}{% set extra = null %}{% endif %} {% 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() %}
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }}
{{ block('note_info', 'cards/blocks/note.html.twig') }}
{% if extra.parent is defined %} {{'in reply to' | trans}} {{ extra.parent | raw }} {% endif %} {{ block('note_text', 'cards/blocks/note.html.twig') }} {{ block('note_attachments', 'cards/blocks/note.html.twig') }} {{ block('note_links', 'cards/blocks/note.html.twig') }}
{{ block('note_complementary', 'cards/blocks/note.html.twig') }}
{% if replies is defined %} {{ block('note_replies', 'cards/blocks/note.html.twig') }} {% endif %} {% endmacro vanilla_full %} {# args: { 'type': { 'vanilla_compact' }, 'note': note, ?'extra': { 'foo': bar } } #} {% macro vanilla_compact(args) %} {% set note = args.note %} {% if args.extra is defined %}{% set extra = args.extra %}{% else %}{% set extra = null %}{% endif %} {% 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) %}
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }} {{ block('note_author', 'cards/blocks/note.html.twig') }}
{{ 'in conversation' | trans }} {{ note.getModified() | ago }}
{{ block('note_text', 'cards/blocks/note.html.twig') }}
{% endmacro vanilla_compact %} {# args: { 'type': { 'page_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #} {% macro page_full(args) %} {% set note = args.note %} {% if args.replies is defined %}{% set replies = args.replies %}{% else %}{% set replies = null %}{% endif %} {% if args.extra is defined %}{% set extra = args.extra %}{% else %}{% set extra = null %}{% endif %} {% 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() %}
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }}
{{ block('note_info', 'cards/blocks/note.html.twig') }}
{% if extra.parent is defined %} {{'in reply to' | trans}} {{ extra.parent | raw }} {% endif %} {{ block('note_text', 'cards/blocks/note.html.twig') }} {{ block('note_attachments', 'cards/blocks/note.html.twig') }} {{ block('note_links', 'cards/blocks/note.html.twig') }}
{{ block('note_complementary', 'cards/blocks/note.html.twig') }}
{% if replies is defined %} {{ block('note_replies', 'cards/blocks/note.html.twig') }} {% endif %} {% endmacro page_full %} {# args: { 'type': { 'page_compact' }, 'note': note, ?'extra': { 'foo': bar } } #} {% macro page_compact(args) %} {% set note = args.note %} {% if args.extra is defined %}{% set extra = args.extra %}{% else %}{% set extra = null %}{% endif %} {% 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) %}
{{ block('note_sidebar', 'cards/blocks/note.html.twig') }} {{ block('note_author', 'cards/blocks/note.html.twig') }}
{{ 'in conversation' | trans }} {{ note.getModified() | ago }}
{{ block('note_text', 'cards/blocks/note.html.twig') }}
{% endmacro page_compact %}