From cda1568db5c08a0fc8ddb832c8e42f60fbda31f3 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Sun, 13 Feb 2022 22:31:04 +0000 Subject: [PATCH] [TEMPLATES][Cards][Blocks] Provide both actor uri and url, as well as full mention guidance --- templates/cards/blocks/note.html.twig | 4 ++-- templates/cards/blocks/profile.html.twig | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/templates/cards/blocks/note.html.twig b/templates/cards/blocks/note.html.twig index 18bf758fb3..eab6141fa0 100644 --- a/templates/cards/blocks/note.html.twig +++ b/templates/cards/blocks/note.html.twig @@ -94,12 +94,12 @@ {% block note_author %} {# Microformat's h-card properties indicates a face icon is a "u-logo" #} + title="{% trans %} %nickname%'s profile {% endtrans %}"> {% if fullname is not null %}{{ fullname }}{% else %}{{ nickname }}{% endif %} - {{ mention }} + {{ mention }} {% endblock note_author %} diff --git a/templates/cards/blocks/profile.html.twig b/templates/cards/blocks/profile.html.twig index 4280c6cd69..62a85375ea 100644 --- a/templates/cards/blocks/profile.html.twig +++ b/templates/cards/blocks/profile.html.twig @@ -1,3 +1,4 @@ +{% set actor_fullname = actor.getFullname() %} {% set actor_nickname = actor.getNickname() %} {% set actor_avatar = actor.getAvatarUrl() %} {% set actor_avatar_dimensions = actor.getAvatarDimensions() %} @@ -19,14 +20,14 @@ width="{{ actor_avatar_dimensions['width'] }}" height="{{ actor_avatar_dimensions['height'] }}">
- + - {{ actor_nickname }} + title="{% trans %} %actor_nickname%'s profile {% endtrans %}"> + {% if actor_fullname is not null %}{{ actor_fullname }}{% else %}{{ actor_nickname }}{% endif %} {% if not actor_is_local %} - {{ mention }} + {{ mention }} {% endif %}