moviewyrm/bookwyrm/templates/snippets/username.html
Fabien Basmaison a05b14c338 [profile] Various HTML fixes:
- Wrap block level elements within block level elements, not inline.
- Avoid empty blocks.
- Change `<hr>` in lists into allowed type of children.
- Fix duplicated ID (some change that was not propagated across the template?).
- Make the anchor optional in the navbar (interactive elements (`a`, `input`, `button`…) should not appear into other interactive elements).
- Remove redundant `role` on main navigation.
- Make the modal a modal with `role="dialog".
- Use `button` instead of form-less `label`.
2021-03-03 20:10:09 +01:00

15 lines
No EOL
330 B
HTML

{% spaceless %}
{% load bookwyrm_tags %}
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %} class="user"
>
{{ user.name|default:user|username }}
</a>
{% if possessive %}'s{% endif %}
{% if show_full and user.name or show_full and user.localname %}
({{ user.username }})
{% endif %}
{% endspaceless %}