Files
runnerspace/templates/pages/user.html
Xevion fd35443a9a Revamp all model relationships to use backref attributes properly
- Fix new post form not including a CSRF token
- Removed some old leftover comment profanity validation, changed to validate_on_submit() for first time
- Include rest of pluralize macro work with this commit + used pluralizing logic where there once was none
2022-03-29 18:12:07 -05:00

37 lines
1.6 KiB
HTML

{% extends 'layouts/index.html' %}
{% block content %}
<div class="profile-title">
<span class="profile-username">{{ user.name }}</span>
{% if current_user.is_admin or current_user == user %}
<a href="{{ url_for('main.edit_user', username=current_user.username) }}"><i class="fas fa-pencil-alt fa-sm" style="padding-bottom: 3px; padding-left: 0.5em;"></i></a>
{% endif %}
{% with seen_text = user.get_last_seen() %}
{% if seen_text == 'Online now!' %}
<span class="profile-timestamp online">{{ seen_text }}</span>
{% else %}
<span class="profile-timestamp offline" title="{{ user.last_seen }}">{{ seen_text }}</span>
{% endif %}
{% endwith %}
</div>
<div class="profile-lower">
<div class="profile-left">
<img class="profile-picture" src="{{ url_for('static', filename='default_photo.png') }}"
alt="{{ user.username }}'s Profile Picture">
<div class="profile-details">
<span title="{{ user.time_registered }}">Registered {{ user.get_registration_delta() }} ago</span><br>
{# 0 likes<br>#}
{% with post_count = user.get_post_count() %}
{{ post_count }} post{{ post_count|pluralize() }}<br>
{% endwith %}
</div>
</div>
<div class="profile-bio">
<p>
<strong>About me:</strong><br>
{{ user.display_about() }}
</p>
</div>
</div>
{% endblock %}