make avatar prettier

This commit is contained in:
2026-05-21 22:38:16 +03:00
parent 13667d5f6c
commit 84ee969e7a
3 changed files with 37 additions and 7 deletions

View File

@@ -110,6 +110,12 @@
{%- endcall -%}
{%- endmacro %}
{% macro avatar(url) -%}
<div class="avatar-container">
<img src="{{url}}" class="avatar">
</div>
{%- endmacro %}
{% macro full_post(
post, render_sig=true, is_latest=false,
show_toolbar=true, is_editing=false, thread=none,
@@ -124,7 +130,7 @@
{%- set can_reply = (is_logged_in()) and (not thread.locked or is_mod()) -%}
<div class="usercard plank even contrast-bg minimal no-shadow">
<div class="usercard-inner">
<img src="{{post.avatar_path}}" class="avatar">
{{avatar(post.avatar_path)}}
<div class="usercard-rest">
<a href="{{url_for('users.user_page', username=post.username)}}">{{post.display_name if post.display_name else post.username}}</a>
<abbr title="mention">@{{post.username}}</abbr>

View File

@@ -1,4 +1,4 @@
{%- from 'common/macros.html' import subheader, timestamp, pager -%}
{%- from 'common/macros.html' import subheader, timestamp, pager, avatar -%}
{%- extends 'base.html' -%}
{%- block title -%}{{ target_user.get_readable_name() }}'s profile{%- endblock -%}
{%- set stats = target_user.get_post_stats() -%}
@@ -41,7 +41,7 @@
<div class="userpage-usercard">
<div class="usercard plank even contrast-bg minimal no-shadow">
<div class="usercard-inner">
<img src="{{target_user.get_avatar_url()}}" class="avatar">
{{- avatar(target_user.get_avatar_url()) -}}
</div>
</div>
<div class="plank even minimal no-shadow user-stats">