Create a macro for profile links and use it on the welcome and profile display pages
This commit is contained in:
@@ -18,3 +18,13 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_link(profile) %}
|
||||
<a href="{% if profile %}{{ url_for('display_profile', username=profile.user.username) }}{% else %}#{% endif %}" class="ui profile">
|
||||
{% if profile and profile.builtin_avatar %}
|
||||
<img src="{{ url_for('static', filename='avatars/' + profile.builtin_avatar + '.svg') }}" alt="" class="ui circular avatar image">
|
||||
{% endif %}
|
||||
<div class="display name">{{ profile.display_name }}</div>
|
||||
<div class="handle">{{ profile }}</div>
|
||||
</a>
|
||||
{% endmacro %}
|
||||
|
Reference in New Issue
Block a user