feat: show profile photos on B2B classified page
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Added avatar_path photo display for: author avatar, seen-by readers, and Q&A question authors on the classified detail page. Falls back to colored initial circle when no photo is uploaded. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b81f80168e
commit
a0e787fe53
@ -711,7 +711,7 @@
|
|||||||
|
|
||||||
<div class="author-card">
|
<div class="author-card">
|
||||||
<div class="author-avatar">
|
<div class="author-avatar">
|
||||||
{{ (classified.author.name or classified.author.email)[0].upper() }}
|
{% if classified.author.avatar_path %}<img src="{{ url_for('static', filename=classified.author.avatar_path) }}" alt="" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">{% else %}{{ (classified.author.name or classified.author.email)[0].upper() }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="author-info">
|
<div class="author-info">
|
||||||
<div class="author-name">{{ classified.author.name or classified.author.email.split('@')[0] }}</div>
|
<div class="author-name">{{ classified.author.name or classified.author.email.split('@')[0] }}</div>
|
||||||
@ -759,8 +759,8 @@
|
|||||||
{% for read in readers[:20] %}
|
{% for read in readers[:20] %}
|
||||||
<div class="reader-avatar"
|
<div class="reader-avatar"
|
||||||
data-name="{{ read.user.name or read.user.email.split('@')[0] }}{% if current_user.is_authenticated and read.user.id == current_user.id %} (Ty){% endif %}"
|
data-name="{{ read.user.name or read.user.email.split('@')[0] }}{% if current_user.is_authenticated and read.user.id == current_user.id %} (Ty){% endif %}"
|
||||||
style="background: hsl({{ (read.user.id * 137) % 360 }}, 65%, 50%);">
|
style="{% if not read.user.avatar_path %}background: hsl({{ (read.user.id * 137) % 360 }}, 65%, 50%);{% endif %}">
|
||||||
{{ (read.user.name or read.user.email)[0]|upper }}
|
{% if read.user.avatar_path %}<img src="{{ url_for('static', filename=read.user.avatar_path) }}" alt="" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">{% else %}{{ (read.user.name or read.user.email)[0]|upper }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if readers_count > 20 %}
|
{% if readers_count > 20 %}
|
||||||
@ -798,8 +798,8 @@
|
|||||||
{% for q in questions %}
|
{% for q in questions %}
|
||||||
<div class="question-item {% if not q.is_public %}question-hidden{% endif %}" id="question-{{ q.id }}">
|
<div class="question-item {% if not q.is_public %}question-hidden{% endif %}" id="question-{{ q.id }}">
|
||||||
<div class="question-header">
|
<div class="question-header">
|
||||||
<div class="question-avatar" style="background: hsl({{ (q.author_id * 137) % 360 }}, 65%, 50%);">
|
<div class="question-avatar" style="{% if not q.author.avatar_path %}background: hsl({{ (q.author_id * 137) % 360 }}, 65%, 50%);{% endif %}">
|
||||||
{{ (q.author.name or q.author.email)[0]|upper }}
|
{% if q.author.avatar_path %}<img src="{{ url_for('static', filename=q.author.avatar_path) }}" alt="" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">{% else %}{{ (q.author.name or q.author.email)[0]|upper }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="question-meta">
|
<div class="question-meta">
|
||||||
<div class="question-author">
|
<div class="question-author">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user