Properly split user browsing page into two columns

This commit is contained in:
Xevion
2022-03-27 05:06:40 -05:00
parent bd35d40c48
commit beceed0095
4 changed files with 29 additions and 20 deletions

View File

@@ -3,28 +3,32 @@
{% block content %}
<div class="content-inner">
<div class="user-list">
{% for user in users %}
<div class="user-box">
<div class="user-box-top">
{% for user_row in users|batch(2, '&nbsp;') %}
<div class="user-list-row">
{% for user in user_row %}
<div class="user-box">
<div class="user-box-top">
<span class="user-box-username">
<a href="{{ url_for('main.user', username=user.username) }}">{{ user.name }}</a>
</span>
{% with seen_text = user.get_last_seen() %}
{% if seen_text == 'Online now!' %}
<span class="user-box-timestamp online">{{ seen_text }}</span>
{% else %}
<span class="user-box-timestamp offline">{{ seen_text }}</span>
{% endif %}
{% endwith %}
</div>
<div class="user-box-bottom">
<div class="user-box-img">
<img src="{{ url_for('static', filename='default_photo.png') }}"
alt="{{ user.username }}'s Profile Picture">
{% with seen_text = user.get_last_seen() %}
{% if seen_text == 'Online now!' %}
<span class="user-box-timestamp online">{{ seen_text }}</span>
{% else %}
<span class="user-box-timestamp offline">{{ seen_text }}</span>
{% endif %}
{% endwith %}
</div>
<div class="user-box-bottom">
<div class="user-box-img">
<img src="{{ url_for('static', filename='default_photo.png') }}"
alt="{{ user.username }}'s Profile Picture">
</div>
<p class="user-box-minibio">{{ user.about_me }}</p>
</div>
</div>
<p class="user-box-minibio">{{ user.about_me }}</p>
</div>
{% endfor %}
</div>
{% endfor %}
</div>