Refactors user pages

This commit is contained in:
Mouse Reeve
2021-01-29 09:05:53 -08:00
parent 6ccf7841e1
commit 24af288c52
5 changed files with 41 additions and 34 deletions

View File

@ -1,18 +1,17 @@
{% extends 'layout.html' %}
{% extends 'user/user_layout.html' %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">
{% if is_self %}Your
{% else %}
{% include 'snippets/username.html' with user=user possessive=True %}
{% endif %}
followers
</h1>
</div>
{% include 'snippets/user_header.html' with user=user %}
{% block header %}
<h1 class="title">
{% if is_self %}Your
{% else %}
{% include 'snippets/username.html' with user=user possessive=True %}
{% endif %}
followers
</h1>
{% endblock %}
{% block panel %}
<div class="block">
<h2 class="title">Followers</h2>
{% for followers in followers %}
@ -34,5 +33,4 @@
<div>{{ user|username }} has no followers</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,18 +1,17 @@
{% extends 'layout.html' %}
{% extends 'user/user_layout.html' %}
{% load bookwyrm_tags %}
{% block content %}
<div class="block">
<h1 class="title">
Users following
{% if is_self %}you
{% else %}
{% include 'snippets/username.html' with user=user %}
{% endif %}
</h1>
</div>
{% include 'snippets/user_header.html' with user=user %}
{% block header %}
<h1 class="title">
Users following
{% if is_self %}you
{% else %}
{% include 'snippets/username.html' with user=user %}
{% endif %}
</h1>
{% endblock %}
{% block panel %}
<div class="block">
<h2 class="title">Following</h2>
{% for follower in user.following.all %}
@ -34,5 +33,4 @@
<div>{{ user|username }} isn't following any users</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends 'layout.html' %}
{% block content %}
{% extends 'user/user_layout.html' %}
{% block header %}
<div class="columns">
<div class="column">
<h1 class="title">User profile</h1>
@ -15,8 +15,9 @@
</div>
{% endif %}
</div>
{% endblock %}
{% include 'snippets/user_header.html' with user=user %}
{% block panel %}
{% if user.bookwyrm_user %}
<div class="block">
<h2 class="title">Shelves</h2>

View File

@ -1,5 +1,12 @@
{% extends 'layout.html' %}
{% load humanize %}
{% load bookwyrm_tags %}
<header class="block">
{% block header %}{% endblock %}
</header>
{% block content %}
{# user bio #}
<div class="block">
<div class="columns">
<div class="column is-narrow">
@ -60,3 +67,6 @@
{% endif %}
</div>
{% block panel %}{% endblock %}
{% endblock %}