2021-04-30 15:40:47 +00:00
|
|
|
{% extends 'user/layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-05-11 22:14:42 +00:00
|
|
|
{% load utilities %}
|
2020-02-24 15:23:14 +00:00
|
|
|
|
2021-03-06 21:11:44 +00:00
|
|
|
{% block title %}{{ user.display_name }}{% endblock %}
|
2021-02-28 18:00:36 +00:00
|
|
|
|
2021-01-29 17:05:53 +00:00
|
|
|
{% block header %}
|
2021-02-23 21:04:24 +00:00
|
|
|
<div class="columns is-mobile">
|
2020-11-10 21:39:37 +00:00
|
|
|
<div class="column">
|
2021-02-28 18:00:36 +00:00
|
|
|
<h1 class="title">{% trans "User Profile" %}</h1>
|
2020-11-10 21:39:37 +00:00
|
|
|
</div>
|
|
|
|
{% if is_self %}
|
|
|
|
<div class="column is-narrow">
|
2021-04-30 15:40:47 +00:00
|
|
|
<a href="{% url 'prefs-profile' %}">
|
2021-05-18 17:45:51 +00:00
|
|
|
<span class="icon icon-pencil" title="Edit profile" aria-hidden="true"></span>
|
|
|
|
<span>{% trans "Edit profile" %}</span>
|
2020-11-10 21:39:37 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-01-29 17:05:53 +00:00
|
|
|
{% endblock %}
|
2020-11-10 21:39:37 +00:00
|
|
|
|
2021-01-29 17:05:53 +00:00
|
|
|
{% block panel %}
|
2021-01-25 00:13:26 +00:00
|
|
|
{% if user.bookwyrm_user %}
|
2020-09-30 02:44:00 +00:00
|
|
|
<div class="block">
|
2021-03-31 16:22:23 +00:00
|
|
|
<h2 class="title">
|
2021-04-30 15:40:47 +00:00
|
|
|
{% include 'user/shelf/books_header.html' %}
|
2021-03-31 16:22:23 +00:00
|
|
|
</h2>
|
2021-06-14 22:27:37 +00:00
|
|
|
<div class="columns is-mobile scroll-x">
|
2020-09-30 02:44:00 +00:00
|
|
|
{% for shelf in shelves %}
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<h3>{{ shelf.name }}
|
2021-03-31 16:22:23 +00:00
|
|
|
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">{% blocktrans with size=shelf.size %}View all {{ size }}{% endblocktrans %}</a>)</small>{% endif %}</h3>
|
2020-09-30 02:44:00 +00:00
|
|
|
<div class="is-mobile field is-grouped">
|
|
|
|
{% for book in shelf.books %}
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="control">
|
2020-12-31 01:36:35 +00:00
|
|
|
<a href="{{ book.local_path }}">
|
2021-04-27 18:53:30 +00:00
|
|
|
{% include 'snippets/book_cover.html' with book=book cover_class='is-h-m is-h-s-mobile' %}
|
2020-09-30 04:45:59 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
2020-09-30 02:44:00 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-03-31 16:54:52 +00:00
|
|
|
<small><a href="{% url 'user-shelves' user|username %}">{% trans "View all books" %}</a></small>
|
2020-09-29 20:17:29 +00:00
|
|
|
</div>
|
2021-01-25 00:13:26 +00:00
|
|
|
{% endif %}
|
2020-01-26 20:14:27 +00:00
|
|
|
|
2021-01-16 20:39:51 +00:00
|
|
|
{% if goal %}
|
|
|
|
<div class="block">
|
|
|
|
<h2 class="title">{% now 'Y' %} Reading Goal</h2>
|
|
|
|
{% include 'snippets/goal_progress.html' with goal=goal %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-03-16 23:10:59 +00:00
|
|
|
<div>
|
2021-02-23 21:04:24 +00:00
|
|
|
<div class="columns is-mobile">
|
2021-02-28 02:48:10 +00:00
|
|
|
<h2 class="title column">{% trans "User Activity" %}</h2>
|
2021-02-10 20:13:07 +00:00
|
|
|
<div class="column is-narrow">
|
2021-05-18 17:45:51 +00:00
|
|
|
<a target="_blank" href="{{ user.local_path }}/rss">
|
|
|
|
<span class="icon icon-rss" aria-hidden="true"></span>
|
|
|
|
<span>{% trans "RSS feed" %}</span>
|
2021-02-10 20:13:07 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
2020-09-29 20:17:29 +00:00
|
|
|
</div>
|
2020-03-16 23:10:59 +00:00
|
|
|
{% for activity in activities %}
|
2021-03-03 14:48:04 +00:00
|
|
|
<div class="block" id="feed-{{ activity.id }}">
|
2021-02-23 21:34:16 +00:00
|
|
|
{% include 'snippets/status/status.html' with status=activity %}
|
2020-01-29 23:10:32 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2020-03-17 00:09:45 +00:00
|
|
|
{% if not activities %}
|
2020-09-30 16:00:33 +00:00
|
|
|
<div class="block">
|
2021-02-28 02:48:10 +00:00
|
|
|
<p>{% trans "No activities yet!" %}</a>
|
2020-03-17 00:09:45 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-11-11 18:43:47 +00:00
|
|
|
|
2021-01-13 17:42:54 +00:00
|
|
|
{% include 'snippets/pagination.html' with page=activities path=user.local_path anchor="#feed" %}
|
2020-01-26 20:14:27 +00:00
|
|
|
</div>
|
2020-01-29 23:10:32 +00:00
|
|
|
|
2020-01-26 20:14:27 +00:00
|
|
|
{% endblock %}
|