mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Design tweaks
This commit is contained in:
parent
c01e0aa5b9
commit
f878938fff
2 changed files with 8 additions and 3 deletions
|
@ -479,6 +479,7 @@ async def outbox_by_public_id(
|
|||
.where(
|
||||
models.InboxObject.ap_type == "Like",
|
||||
models.InboxObject.activity_object_ap_id == maybe_object.ap_id,
|
||||
models.InboxObject.is_deleted.is_(False),
|
||||
)
|
||||
.options(joinedload(models.InboxObject.actor))
|
||||
.order_by(models.InboxObject.ap_published_at.desc())
|
||||
|
@ -496,6 +497,7 @@ async def outbox_by_public_id(
|
|||
.filter(
|
||||
models.InboxObject.ap_type == "Announce",
|
||||
models.InboxObject.activity_object_ap_id == maybe_object.ap_id,
|
||||
models.InboxObject.is_deleted.is_(False),
|
||||
)
|
||||
.options(joinedload(models.InboxObject.actor))
|
||||
.order_by(models.InboxObject.ap_published_at.desc())
|
||||
|
|
|
@ -270,28 +270,31 @@
|
|||
|
||||
{% if likes or shares %}
|
||||
<div style="display: flex;column-gap: 20px;margin:20px 0;">
|
||||
{% if likes %}
|
||||
<div style="flex: 0 1 50%;max-width: 50%;">Likes
|
||||
<div style="display: flex;column-gap: 20px;row-gap:20px;flex-wrap: wrap;margin-top:20px;">
|
||||
{% for like in likes %}
|
||||
<a href="{{ like.actor.url }}" title="{{ like.actor.handle }}" style="height:50px;" rel="noreferrer">
|
||||
<a href="{% if is_admin %}{{ url_for("admin_profile") }}?actor_id={{ like.actor.ap_id }}{% else %}{{ like.actor.url }}{% endif %}" title="{{ like.actor.handle }}" style="height:50px;" rel="noreferrer">
|
||||
<img src="{{ like.actor.resized_icon_url }}" alt="{{ like.actor.handle}}" style="max-width:50px;">
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div style="width:50px;text-align:center;">And {{ object.likes_count - 10 }} more.</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if shares %}
|
||||
<div style="flex: 0 1 50%;max-width: 50%;">Shares
|
||||
<div style="display: flex;column-gap: 20px;row-gap:20px;flex-wrap: wrap;margin-top:20px;">
|
||||
{% for share in shares %}
|
||||
<a href="{{ share.actor.url }}" title="{{ share.actor.handle }}" style="height:50px;" rel="noreferrer">
|
||||
<a href="{% if is_admin %}{{ url_for("admin_profile") }}?actor_id={{ like.actor.ap_id }}{% else %}{{ like.actor.url }}{% endif %}" title="{{ share.actor.handle }}" style="height:50px;" rel="noreferrer">
|
||||
<img src="{{ share.actor.resized_icon_url }}" alt="{{ share.actor.handle}}" style="max-width:50px;">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue