bookwyrm-mastodon/bookwyrm/templates/user/user.html

75 lines
2.1 KiB
HTML
Raw Normal View History

2021-01-29 12:05:53 -05:00
{% extends 'user/user_layout.html' %}
2021-01-29 12:05:53 -05:00
{% block header %}
2020-11-10 16:39:37 -05:00
<div class="columns">
<div class="column">
<h1 class="title">User profile</h1>
</div>
{% if is_self %}
<div class="column is-narrow">
2021-01-12 15:05:30 -05:00
<a href="/edit-profile">
2021-01-14 17:13:23 -05:00
<span class="icon icon-pencil" title="Edit profile">
2020-11-10 16:39:37 -05:00
<span class="is-sr-only">Edit profile</span>
</span>
</a>
</div>
{% endif %}
</div>
2021-01-29 12:05:53 -05:00
{% endblock %}
2020-11-10 16:39:37 -05:00
2021-01-29 12:05:53 -05:00
{% block panel %}
2021-01-24 19:13:26 -05:00
{% if user.bookwyrm_user %}
2020-09-29 22:44:00 -04:00
<div class="block">
<h2 class="title">Shelves</h2>
<div class="columns">
{% for shelf in shelves %}
<div class="column is-narrow">
<h3>{{ shelf.name }}
2020-12-30 20:36:35 -05:00
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">See all {{ shelf.size }}</a>)</small>{% endif %}</h3>
2020-09-29 22:44:00 -04:00
<div class="is-mobile field is-grouped">
{% for book in shelf.books %}
2020-09-30 00:45:59 -04:00
<div class="control">
2020-12-30 20:36:35 -05:00
<a href="{{ book.local_path }}">
2020-09-30 00:45:59 -04:00
{% include 'snippets/book_cover.html' with book=book size="medium" %}
</a>
</div>
2020-09-29 22:44:00 -04:00
{% endfor %}
</div>
</div>
{% endfor %}
</div>
2020-12-30 20:36:35 -05:00
<small><a href="{{ user.local_path }}/shelves">See all {{ shelf_count }} shelves</a></small>
2020-09-29 16:17:29 -04:00
</div>
2021-01-24 19:13:26 -05:00
{% endif %}
2020-01-26 15:14:27 -05:00
2021-01-16 15:39:51 -05:00
{% 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 %}
2020-03-16 19:10:59 -04:00
<div>
2020-09-29 16:17:29 -04:00
<div class="block">
<h2 class="title">User Activity</h2>
</div>
2020-03-16 19:10:59 -04:00
{% for activity in activities %}
<div class="block" id="feed">
2020-03-16 19:10:59 -04:00
{% include 'snippets/status.html' with status=activity %}
2020-01-29 18:10:32 -05:00
</div>
{% endfor %}
2020-03-16 20:09:45 -04:00
{% if not activities %}
2020-09-30 12:00:33 -04:00
<div class="block">
2020-03-16 20:09:45 -04:00
<p>No activities yet!</a>
</div>
{% endif %}
2020-11-11 13:43:47 -05:00
{% include 'snippets/pagination.html' with page=activities path=user.local_path anchor="#feed" %}
2020-01-26 15:14:27 -05:00
</div>
2020-01-29 18:10:32 -05:00
2020-01-26 15:14:27 -05:00
{% endblock %}