2021-01-29 17:05:53 +00:00
|
|
|
{% extends 'user/user_layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2020-02-24 15:23:14 +00:00
|
|
|
|
2021-02-28 18:00:36 +00:00
|
|
|
{% block title %}{{ user.name }}{% endblock %}
|
|
|
|
|
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-01-29 17:28:00 +00:00
|
|
|
<a href="/preferences/profile">
|
2021-01-14 22:13:23 +00:00
|
|
|
<span class="icon icon-pencil" title="Edit profile">
|
2021-02-28 02:48:10 +00:00
|
|
|
<span class="is-sr-only">{% trans "Edit profile" %}</span>
|
2020-11-10 21:39:37 +00:00
|
|
|
</span>
|
|
|
|
</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-02-28 02:48:10 +00:00
|
|
|
<h2 class="title">{% trans "Shelves" %}</h2>
|
2020-09-30 02:44:00 +00:00
|
|
|
<div class="columns">
|
|
|
|
{% for shelf in shelves %}
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<h3>{{ shelf.name }}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">{% blocktrans with size=shelf.size %}See 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 }}">
|
2020-09-30 04:45:59 +00:00
|
|
|
{% include 'snippets/book_cover.html' with book=book size="medium" %}
|
|
|
|
</a>
|
|
|
|
</div>
|
2020-09-30 02:44:00 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-02-28 02:48:10 +00:00
|
|
|
<small><a href="{{ user.local_path }}/shelves">{% blocktrans %}See all {{ shelf_count }} shelves{% endblocktrans %}</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>
|
|
|
|
{% elif user == request.user %}
|
|
|
|
<div class="block">
|
2021-02-28 02:48:10 +00:00
|
|
|
{% now 'Y' as year %}
|
|
|
|
<h2 class="title is-4"><a href="{{ user.local_path }}/goal/{{ year }}">{% blocktrans %}Set a reading goal for {{ year }}{% endblocktrans %}</a></h2>
|
2021-01-16 20:39:51 +00:00
|
|
|
</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">
|
|
|
|
<a class="icon icon-rss" target="_blank" href="{{ user.local_path }}/rss">
|
2021-02-28 02:48:10 +00:00
|
|
|
<span class="is-sr-only">{% 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-01-13 17:42:54 +00:00
|
|
|
<div class="block" id="feed">
|
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 %}
|