mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
More compact likes/boosts diplay on permalink page
This commit is contained in:
parent
7a41c14167
commit
ba1bfe4943
1 changed files with 20 additions and 7 deletions
|
@ -15,6 +15,17 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
{% macro display_actor_icon(follower, size=50) -%}
|
||||||
|
{% if follower and follower.id %}
|
||||||
|
<a href="{{follower | url_or_id | get_url }}" style="width:65px;padding-left:15px;padding-bottom:15px;text-decoration:none;padding:0;margin:0;height:65px;">
|
||||||
|
{% if not follower.icon %}
|
||||||
|
<img class="actor-icon" title="@{{ follower.preferredUsername }}@{{ follower | url_or_id | get_url | domain }}" src="/static/nopic.png" style="width:{{ size }}px;border-radius:2px;margin:0;padding:0">
|
||||||
|
{% else %}
|
||||||
|
<img class="actor-icon" title="@{{ follower.preferredUsername }}@{{ follower | url_or_id | get_url | domain }}" src="{{ follower.icon.url | get_actor_icon_url(size) }}" style="width:{{ size }}px;border-radius:2px;">{% endif %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro display_actor_oneline(follower) -%}
|
{% macro display_actor_oneline(follower) -%}
|
||||||
{% if follower and follower.id %}
|
{% if follower and follower.id %}
|
||||||
<span class="actor-inline">
|
<span class="actor-inline">
|
||||||
|
@ -385,18 +396,20 @@
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
{% if likes or shares %}
|
{% if likes or shares %}
|
||||||
<aside style="padding-top:20px;" class="pure-g">
|
<aside style="padding-top:20px;">
|
||||||
{% if likes %}
|
{% if likes %}
|
||||||
<div class="pure-u-1-2">
|
<h4 style="font-weight:normal"><strong>{{ likes|length }}</strong> like{% if (likes | length) > 1 %}s{% endif %}</h4>
|
||||||
<h4 style="font-weight:normal"><strong>{{ likes|length }}</strong> like{% if (likes | length) > 1 %}s{% endif %}</h4>{% for like in likes %}
|
<div style="display:flex;flex-wrap:wrap;">
|
||||||
{{ display_actor_inline(like) }}
|
{% for like in likes %}
|
||||||
|
{{ display_actor_icon(like) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if shares %}
|
{% if shares %}
|
||||||
<div class="pure-u-1-2">
|
<h4 style="font-weight:normal"><strong>{{ shares|length }}</strong> boost{% if (shares|length) > 1 %}s{% endif %}</h4>
|
||||||
<h4 style="font-weight:normal"><strong>{{ shares|length }}</strong> boost{% if (shares|length) > 1 %}s{% endif %}</h4>{% for boost in shares %}
|
<div style="display:flex;flex-wrap:wrap;">
|
||||||
{{ display_actor_inline(boost) }}
|
{% for boost in shares %}
|
||||||
|
{{ display_actor_icon(boost) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue