65 lines
3.9 KiB
HTML
65 lines
3.9 KiB
HTML
{% extends 'layout.html' %}
|
|
{% block nav_profile %} active {% endblock %}
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="jumbotron">
|
|
{% if user.profile.profile_pic %}
|
|
<img src="/files/{{ user.profile.profile_pic }}" class="rounded float-left" style="margin-right: 24px; max-height: 100px;"/>
|
|
{% endif %}
|
|
<h1>{% if user.verified %} <i class="fas fa-shield-check" alt="Verified"></i> {% endif %}{{ user.displayname }} <small>on Tweeder</small></h1>
|
|
<h2>
|
|
{% if user.profile.bio %}
|
|
{{ user.profile.bio }}
|
|
{% else %}
|
|
Tweeder user since 1984
|
|
{% endif %}
|
|
</h2>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-6 col-md-4">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 style="display: inline">{{ user.displayname }}' Profile</h4>
|
|
{% if following %}<form action="/unfollow/{{ user.displayname }}" method="POST" style="display: inline; float: right;"><input type="submit" value="Unfollow" class="btn btn-outline-danger btn-sm"/></form> {% else %}<form action="/follow/{{ user.displayname }}" method="POST" style="display:inline; float: right;"><input type="submit" value="Follow" class="btn btn-outline-primary btn-sm"/></form>{% endif %}
|
|
</div>
|
|
<div class="card-body">
|
|
{{ posts|count }} Posts <br />
|
|
{{ user.following|count }} Following
|
|
<hr />
|
|
{% if user.profile.location %} <i class="far fa-fw fa-map-marker"></i> {{ user.profile.location }} <br>{% endif %}
|
|
{% if user.profile.gender %} <i class="far fa-fw fa-transgender-alt"></i> {{ user.profile.gender }} {% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-6 col-md-8" style="float: right;">
|
|
{% if posts %}
|
|
{% for post in posts if not post.hidden %}
|
|
<div class="card" style="word-wrap: break-word; margin-bottom: 16px; width: 100%;">
|
|
<div class="card-header">
|
|
<b>{{ post.poster }}</b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }}
|
|
<span style="float: right">
|
|
{% if logged_in|lower in post.likes %}
|
|
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
|
{% else %}
|
|
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
|
{% endif %}
|
|
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
|
{% if logged_in == post.poster %}
|
|
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
<div class="card-body">
|
|
{{ post.content }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<b>No posts found!</b>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|