forked from mirrors/bookwyrm
6c629be667
Works on #25
65 lines
2.1 KiB
HTML
65 lines
2.1 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 %}
|
|
{% if not request.user in user.followers.all %}
|
|
<form action="/follow/{{ user.username }}" method="post">
|
|
{% csrf_token %}
|
|
<input type="submit" value="Follow"></input>
|
|
</form>
|
|
{% else %}
|
|
<form action="/unfollow/{{ user.username }}" method="post">
|
|
{% csrf_token %}
|
|
<input type="submit" value="Unfollow"></input>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if is_self %}
|
|
<div class="interaction">
|
|
<a href="/user/{{ user.localname }}/edit">Edit profile</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div>
|
|
<h2>Followers</h2>
|
|
{% for follower in user.followers.all %}
|
|
<div>
|
|
<a href="{{ follower.actor }}">{{ follower.username }}</a>
|
|
{% if not request.user in follower.followers.all %}
|
|
<form action="/follow/" method="post">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="user" value="{{ follower.id }}"></input>
|
|
<input type="submit" value="Follow"></input>
|
|
</form>
|
|
{% else %}
|
|
<form action="/unfollow/" method="post">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="user" value="{{ follower.id }}"></input>
|
|
<input type="submit" value="Unfollow"></input>
|
|
</form>
|
|
{% endif %}
|
|
</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 %}
|