moviewyrm/bookwyrm/templates/user/user.html
2021-01-29 09:28:00 -08:00

74 lines
2.1 KiB
HTML

{% extends 'user/user_layout.html' %}
{% block header %}
<div class="columns">
<div class="column">
<h1 class="title">User profile</h1>
</div>
{% if is_self %}
<div class="column is-narrow">
<a href="/preferences/profile">
<span class="icon icon-pencil" title="Edit profile">
<span class="is-sr-only">Edit profile</span>
</span>
</a>
</div>
{% endif %}
</div>
{% endblock %}
{% block panel %}
{% if user.bookwyrm_user %}
<div class="block">
<h2 class="title">Shelves</h2>
<div class="columns">
{% for shelf in shelves %}
<div class="column is-narrow">
<h3>{{ shelf.name }}
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">See all {{ shelf.size }}</a>)</small>{% endif %}</h3>
<div class="is-mobile field is-grouped">
{% for book in shelf.books %}
<div class="control">
<a href="{{ book.local_path }}">
{% include 'snippets/book_cover.html' with book=book size="medium" %}
</a>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<small><a href="{{ user.local_path }}/shelves">See all {{ shelf_count }} shelves</a></small>
</div>
{% endif %}
{% if goal %}
<div class="block">
<h2 class="title">{% now 'Y' %} Reading Goal</h2>
{% include 'snippets/goal_progress.html' with goal=goal %}
</div>
{% elif user == request.user %}
<div class="block">
<h2 class="title is-4"><a href="{{ user.local_path }}/goal/{% now 'Y' %}">Set a reading goal for {% now 'Y' %}</a></h2>
</div>
{% endif %}
<div>
<div class="block">
<h2 class="title">User Activity</h2>
</div>
{% for activity in activities %}
<div class="block" id="feed">
{% include 'snippets/status.html' with status=activity %}
</div>
{% endfor %}
{% if not activities %}
<div class="block">
<p>No activities yet!</a>
</div>
{% endif %}
{% include 'snippets/pagination.html' with page=activities path=user.local_path anchor="#feed" %}
</div>
{% endblock %}