2021-01-29 12:05:53 -05:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-27 16:43:17 -05:00
|
|
|
{% load i18n %}
|
2020-03-16 20:09:45 -04:00
|
|
|
{% load humanize %}
|
2020-12-12 21:25:04 -05:00
|
|
|
{% load bookwyrm_tags %}
|
2021-01-29 12:29:59 -05:00
|
|
|
|
2021-02-28 13:00:36 -05:00
|
|
|
{% block title %}{{ user.display_name }}{% endblock %}
|
|
|
|
|
2021-01-29 12:29:59 -05:00
|
|
|
{% block content %}
|
2021-01-29 12:05:53 -05:00
|
|
|
<header class="block">
|
|
|
|
{% block header %}{% endblock %}
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{# user bio #}
|
2020-09-29 16:39:44 -04:00
|
|
|
<div class="block">
|
|
|
|
<div class="columns">
|
2021-02-27 14:53:36 -05:00
|
|
|
<div class="column is-two-fifths">
|
2021-02-27 16:43:17 -05:00
|
|
|
{% include 'user/user_preview.html' with user=user %}
|
2020-03-16 20:09:45 -04:00
|
|
|
</div>
|
|
|
|
|
2021-03-04 17:27:49 -05:00
|
|
|
{% if user.summary %}
|
2021-02-27 14:53:36 -05:00
|
|
|
<div class="column box has-background-white-bis content">
|
|
|
|
{{ user.summary | to_markdown | safe }}
|
2020-03-16 20:09:45 -04:00
|
|
|
</div>
|
2021-03-04 17:27:49 -05:00
|
|
|
{% endif %}
|
2020-03-16 20:09:45 -04:00
|
|
|
</div>
|
2021-01-29 14:44:04 -05:00
|
|
|
{% if not is_self and request.user.is_authenticated %}
|
2021-02-23 15:10:54 -05:00
|
|
|
{% include 'snippets/follow_button.html' with user=user %}
|
2020-03-16 20:09:45 -04:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if is_self and user.follower_requests.all %}
|
|
|
|
<div class="follow-requests">
|
2021-02-27 16:43:17 -05:00
|
|
|
<h2>{% trans "Follow Requests" %}</h2>
|
2020-03-16 20:09:45 -04:00
|
|
|
{% for requester in user.follower_requests.all %}
|
|
|
|
<div class="row shrink">
|
|
|
|
<p>
|
2021-03-07 13:24:46 -05:00
|
|
|
<a href="{{ requester.local_path }}">{{ requester.display_name }}</a> ({{ requester.username }})
|
2020-03-16 20:09:45 -04:00
|
|
|
</p>
|
|
|
|
{% include 'snippets/follow_request_buttons.html' with user=requester %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-02-01 14:34:08 -05:00
|
|
|
{% with user|username as username %}
|
2021-03-31 12:50:16 -04:00
|
|
|
{% if 'user/'|add:username|add:'/books' not in request.path and 'user/'|add:username|add:'/shelf' not in request.path %}
|
2021-02-01 14:34:08 -05:00
|
|
|
<nav class="tabs">
|
|
|
|
<ul>
|
2021-02-03 20:02:04 -05:00
|
|
|
{% url 'user-feed' user|username as url %}
|
2021-02-01 14:34:08 -05:00
|
|
|
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
|
2021-02-27 16:43:17 -05:00
|
|
|
<a href="{{ url }}">{% trans "Activity" %}</a>
|
2021-02-01 14:34:08 -05:00
|
|
|
</li>
|
2021-02-10 14:48:49 -05:00
|
|
|
{% if is_self or user.goal.exists %}
|
2021-02-01 14:34:08 -05:00
|
|
|
{% now 'Y' as year %}
|
2021-02-03 20:02:04 -05:00
|
|
|
{% url 'user-goal' user|username year as url %}
|
2021-02-01 14:34:08 -05:00
|
|
|
<li{% if url in request.path %} class="is-active"{% endif %}>
|
2021-02-27 16:43:17 -05:00
|
|
|
<a href="{{ url }}">{% trans "Reading Goal" %}</a>
|
2021-02-01 14:34:08 -05:00
|
|
|
</li>
|
2021-02-10 14:48:49 -05:00
|
|
|
{% endif %}
|
2021-03-07 11:42:30 -05:00
|
|
|
{% if is_self or user.list_set.exists %}
|
2021-02-03 20:02:04 -05:00
|
|
|
{% url 'user-lists' user|username as url %}
|
2021-02-01 14:34:08 -05:00
|
|
|
<li{% if url in request.path %} class="is-active"{% endif %}>
|
2021-02-27 16:43:17 -05:00
|
|
|
<a href="{{ url }}">{% trans "Lists" %}</a>
|
2021-02-01 14:34:08 -05:00
|
|
|
</li>
|
2021-02-10 14:48:49 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if user.shelf_set.exists %}
|
2021-02-03 20:02:04 -05:00
|
|
|
{% url 'user-shelves' user|username as url %}
|
2021-02-01 14:34:08 -05:00
|
|
|
<li{% if url in request.path %} class="is-active"{% endif %}>
|
2021-03-31 12:22:23 -04:00
|
|
|
<a href="{{ url }}">{% trans "Books" %}</a>
|
2021-02-01 14:34:08 -05:00
|
|
|
</li>
|
2021-02-10 14:48:49 -05:00
|
|
|
{% endif %}
|
2021-02-01 14:34:08 -05:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2020-03-16 20:09:45 -04:00
|
|
|
|
2021-01-29 12:05:53 -05:00
|
|
|
{% block panel %}{% endblock %}
|
|
|
|
|
|
|
|
{% endblock %}
|