Adds shelf preview to user page

This commit is contained in:
Mouse Reeve
2020-09-29 19:44:00 -07:00
parent e1a6df54c1
commit cc58d0321d
2 changed files with 34 additions and 45 deletions

View File

@ -2,7 +2,25 @@
{% block content %}
<div class="block">
{% include 'user_header.html' with user=user %}
{% include 'user_header.html' with user=user %}
</div>
<div class="block">
<h2 class="title">Shelves</h2>
<div class="columns">
{% for shelf in shelves %}
<div class="column is-narrow">
<h3>{{ shelf.name }}
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.remote_id }}">See all {{ shelf.size }}</a>)</small>{% endif %}</h3>
<div class="is-mobile field is-grouped">
{% for book in shelf.books %}
{% include 'snippets/book_cover.html' with book=book size="medium" %}
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<small><a href="/user/{{ user.localname }}/shelves">See all {{ shelf_count }} shelves</a></small>
</div>
<div>