moviewyrm/bookwyrm/templates/user/user_layout.html

99 lines
3.5 KiB
HTML
Raw Normal View History

2021-01-29 17:05:53 +00:00
{% extends 'layout.html' %}
2020-03-17 00:09:45 +00:00
{% load humanize %}
2020-12-13 02:25:04 +00:00
{% load bookwyrm_tags %}
2021-01-29 17:29:59 +00:00
{% block content %}
2021-01-29 17:05:53 +00:00
<header class="block">
{% block header %}{% endblock %}
</header>
{# user bio #}
2020-09-29 20:39:44 +00:00
<div class="block">
<div class="columns">
<div class="column is-narrow">
<div class="media">
<div class="media-left">
2020-12-31 01:36:35 +00:00
<a href="{{ user.local_path }}">
2020-09-29 20:39:44 +00:00
{% include 'snippets/avatar.html' with user=user large=True %}
2020-11-06 20:00:00 +00:00
</a>
2020-09-29 20:39:44 +00:00
</div>
<div class="media-content">
<p>{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}</p>
2020-11-06 20:00:00 +00:00
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
2020-09-29 20:39:44 +00:00
<p>Joined {{ user.created_date | naturaltime }}</p>
<p>
2020-12-31 01:36:35 +00:00
<a href="{{ user.local_path }}/followers">{{ user.followers.count }} follower{{ user.followers.count | pluralize }}</a>,
<a href="{{ user.local_path }}/following">{{ user.following.count }} following</a>
2020-11-06 20:00:00 +00:00
</p>
2020-09-29 20:39:44 +00:00
</div>
</div>
2020-03-17 00:09:45 +00:00
</div>
2020-09-29 20:39:44 +00:00
<div class="column">
{% if user.summary %}
<div class="columns">
<div class="column is-narrow">
<span class="icon icon-quote-open"></span>
</div>
<div class="column">
<blockquote>{{ user.summary | to_markdown | safe }}</blockquote>
</div>
</div>
2020-09-29 20:39:44 +00:00
{% endif %}
2020-03-17 00:09:45 +00:00
</div>
</div>
2021-01-29 19:44:04 +00:00
{% if not is_self and request.user.is_authenticated %}
2021-01-25 22:03:18 +00:00
<div class="field has-addons">
<div class="control">
{% include 'snippets/follow_button.html' with user=user %}
</div>
<div class="control">
{% include 'snippets/user_options.html' with user=user class="is-small" %}
</div>
</div>
2020-03-17 00:09:45 +00:00
{% endif %}
{% if is_self and user.follower_requests.all %}
<div class="follow-requests">
<h2>Follow Requests</h2>
{% for requester in user.follower_requests.all %}
<div class="row shrink">
<p>
{% include 'snippets/username.html' with user=requester show_full=True %}
</p>
{% include 'snippets/follow_request_buttons.html' with user=requester %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
2021-02-01 19:34:08 +00:00
{% with user|username as username %}
{% if 'user/'|add:username|add:'/shelf' not in request.path and 'user/'|add:username|add:'/shelves' not in request.path %}
<nav class="tabs">
<ul>
{% url 'user-feed' request.user|username as url %}
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">Activity</a>
</li>
{% now 'Y' as year %}
{% url 'user-goal' request.user|username year as url %}
<li{% if url in request.path %} class="is-active"{% endif %}>
<a href="{{ url }}">Reading Goal</a>
</li>
{% url 'user-lists' request.user|username as url %}
<li{% if url in request.path %} class="is-active"{% endif %}>
<a href="{{ url }}">Lists</a>
</li>
{% url 'user-shelves' request.user|username as url %}
<li{% if url in request.path %} class="is-active"{% endif %}>
<a href="{{ url }}">Shelves</a>
</li>
</ul>
</nav>
{% endif %}
{% endwith %}
2020-03-17 00:09:45 +00:00
2021-01-29 17:05:53 +00:00
{% block panel %}{% endblock %}
{% endblock %}