[TEMPLATES][Cards][Blocks] Provide both actor uri and url, as well as full mention guidance

This commit is contained in:
Diogo Peralta Cordeiro 2022-02-13 22:31:04 +00:00
parent 1f2638d15a
commit cda1568db5
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
2 changed files with 7 additions and 6 deletions

View File

@ -94,12 +94,12 @@
{% block note_author %}
{# Microformat's h-card properties indicates a face icon is a "u-logo" #}
<a href="{{ actor_url }}" class="note-author-url u-url" role="doc-credit"
title="{{ nickname }}{{ '\'s profile' | trans }}">
title="{% trans %} %nickname%'s profile {% endtrans %}">
{% if fullname is not null %}{{ fullname }}{% else %}{{ nickname }}{% endif %}
</a>
<small class="note-author-uri" title="{{ 'Author related permalinks' | trans }}">
<a href="{{ actor_uri }}" class="u-url" title="{{ nickname }} {{ '\'s permalink' | trans }}">{{ mention }}</a>
<a href="{{ actor_uri }}" class="u-url" title="{% trans %} %nickname%'s permalink {% endtrans %}">{{ mention }}</a>
</small>
{% endblock note_author %}

View File

@ -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'] }}">
<section>
<a class="profile-info-url" href="{{ actor_uri }}">
<a class="profile-info-url" href="{{ actor_url }}">
<strong class="profile-info-url-nickname"
title="{% trans %} %actor_nickname%'s nickname {% endtrans %}">
{{ actor_nickname }}
title="{% trans %} %actor_nickname%'s profile {% endtrans %}">
{% if actor_fullname is not null %}{{ actor_fullname }}{% else %}{{ actor_nickname }}{% endif %}
</strong>
{% if not actor_is_local %}
<span class="profile-info-url-remote">
{{ mention }}
<a href="{{ actor_uri }}" class="u-url" title="{% trans %} %actor_nickname%'s permalink {% endtrans %}">{{ mention }}</a>
</span>
{% endif %}
</a>