Fix the follower/following page layout

This commit is contained in:
Thomas Sileo 2018-06-23 12:01:31 +02:00
parent 5ce3d57faf
commit a43a946f5d
2 changed files with 23 additions and 7 deletions

View file

@ -9,8 +9,24 @@
<div id="followers"> <div id="followers">
{% for follower in followers_data %} {% for follower in followers_data %}
{{ utils.display_actor(follower) }} <div style="height: 100px;">
{{ utils.display_actor_inline(follower, size=80) }}
</div>
{% endfor %} {% endfor %}
{% for follower in followers_data %}
<div style="height: 100px;">
{{ utils.display_actor_inline(follower, size=80) }}
</div>
{% endfor %}
{% for follower in followers_data %}
<div style="height: 100px;">
{{ utils.display_actor_inline(follower, size=80) }}
</div>
{% endfor %}
</div> </div>
</div> </div>

View file

@ -1,10 +1,10 @@
{% macro display_actor_inline(follower) -%} {% macro display_actor_inline(follower, size=50) -%}
<a class="actor-box" href="{{follower.url}}" style="clear:both;"> <a class="actor-box" href="{{follower.url}}" style="clear:both;">
<span style="float:left;padding-right:15px;"> <span style="float:left;padding-right:15px;">
{% if not follower.icon %} {% if not follower.icon %}
<img class="actor-icon" src="/static/nopic.png" style="width:50px"> <img class="actor-icon" src="/static/nopic.png" style="width:{{ size }}px">
{% else %} {% else %}
<img class="actor-icon" src="{{ follower.icon.url }}" style="width:50px;">{% endif %} <img class="actor-icon" src="{{ follower.icon.url }}" style="width:{{ size }}px;">{% endif %}
</span> </span>
<div class="actor-inline"> <div class="actor-inline">
<div style="font-weight:bold">{{ follower.name or follower.preferredUsername }}</div> <div style="font-weight:bold">{{ follower.name or follower.preferredUsername }}</div>
@ -80,9 +80,9 @@
{% else %} {% else %}
<a class ="bar-item" href="{{ item.activity.object.url }}">permalink</a> <a class ="bar-item" href="{{ item.activity.object.url }}">permalink</a>
{% if item.meta.count_reply %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_reply }} replies</a>{% endif %} {% if item.meta.count_reply %}<a class ="bar-item" href="{{ item.activity.object.url }}"><strong>{{ item.meta.count_reply }}</strong> replies</a>{% endif %}
{% if item.meta.count_boost %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_boost }} boosts</a>{% endif %} {% if item.meta.count_boost %}<a class ="bar-item" href="{{ item.activity.object.url }}"><strong>{{ item.meta.count_boost }}</strong> boosts</a>{% endif %}
{% if item.meta.count_like %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_like }} likes</a>{% endif %} {% if item.meta.count_like %}<a class ="bar-item" href="{{ item.activity.object.url }}"><strong>{{ item.meta.count_like }}</strong> likes</a>{% endif %}
{% endif %} {% endif %}
{% if ui and session.logged_in %} {% if ui and session.logged_in %}