Add basic user browsing page

- Needs pagination
- Needs some style fixing
- Somewhat empty, fixes up next
This commit is contained in:
Xevion
2022-03-27 03:36:43 -05:00
parent 677abe3d65
commit 0609a2a86a
6 changed files with 120 additions and 45 deletions

View File

@@ -1 +1,25 @@
{% extends 'layouts/index.html' %}
{% block content %}
<div class="content-inner">
<div class="user-list">
{% for user in users %}
<div class="user-box">
<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 %}
<br>
<img class="user-box-img" src="{{ url_for('static', filename='default_photo.png') }}"
alt="{{ user.username }}'s Profile Picture">
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@@ -3,7 +3,7 @@
{% block content %}
<div class="content-inner">
<div class="profile-title">
<span class="profile-username">{{ user.username }}</span>
<span class="profile-username">{{ user.name }}</span>
{% with seen_text = user.get_last_seen() %}
{% if seen_text == 'Online now!' %}
<span class="profile-timestamp online">{{ seen_text }}</span>
@@ -17,8 +17,8 @@
<img class="profile-picture" src="{{ url_for('static', filename='default_photo.png') }}" alt="{{ user.username }}'s Profile Picture">
<div class="profile-details">
Registered {{ user.get_registration_delta() }} ago<br>
67 likes<br>
14 posts<br>
0 likes<br>
0 posts<br>
</div>
</div>
<div class="profile-bio">