moviewyrm/fedireads/templates/user.html
2020-03-16 17:45:56 -07:00

66 lines
1.9 KiB
HTML

{% extends 'layout.html' %}
{% block content %}
<div id="sidebar">
<div class="user-profile">
<h2>
{% include 'snippets/avatar.html' with user=user %}
{% if user.name %}{{ user.name }}{% endif %}
<small>{{ user.username }}</small>
</h2>
{% if user.summary %}
<blockquote>{{ user.summary | safe }}</blockquote>
{% endif %}
{% if not is_self %}
{% include 'snippets/follow_button.html' with user=user %}
{% endif %}
{% if is_self %}
<div class="interaction">
<a href="/user-edit/">Edit profile</a>
</div>
{% endif %}
</div>
{% if is_self and user.follower_requests.all %}
<div>
<h2>Follow Requests</h2>
{% for requester in user.follower_requests.all %}
<div>
{% include 'snippets/username.html' with user=requester show_full=True %}
{% include 'snippets/follow_request_buttons.html' with user=requester %}
</div>
{% endfor %}
</div>
{% endif %}
<div>
<h2>Followers</h2>
{% for follower in user.followers.all %}
<div>
{% include 'snippets/username.html' with user=follower show_full=True %}
{% include 'snippets/follow_button.html' with user=follower %}
</div>
{% endfor %}
</div>
<div>
<h2>Following</h2>
{% for following in user.following.all %}
<div>
{% include 'snippets/username.html' with user=following show_full=True %}
{% include 'snippets/follow_button.html' with user=following %}
</div>
{% endfor %}
</div>
</div>
<div id="content">
{% for shelf in shelves %}
<div>
<h2>{{ shelf.name }}</h2>
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
</div>
{% endfor %}
</div>
{% endblock %}