Author page

This commit is contained in:
Mouse Reeve 2020-09-30 16:20:50 -07:00
parent 7582540fe9
commit 6e1c116329
2 changed files with 18 additions and 31 deletions

View file

@ -1,8 +1,8 @@
{% extends 'layout.html' %} {% extends 'layout.html' %}
{% load fr_display %} {% load fr_display %}
{% block content %} {% block content %}
<div class="content-container"> <div class="block">
<h2>{{ author.display_name }}</h2> <h2 class="title">{{ author.display_name }}</h2>
{% if author.bio %} {% if author.bio %}
<p> <p>
@ -11,18 +11,9 @@
{% endif %} {% endif %}
</div> </div>
<div class="content-container"> <div class="block">
<h2>Books by {{ author.display_name }}</h2> <h3 class="title is-4">Books by {{ author.display_name }}</h3>
<div class="book-grid row shrink wrap"> {% include 'snippets/book_tiles.html' with books=books %}
{% for book in books %}
<div class="book-preview">
<a href="/book/{{ book.id }}">
{% include 'snippets/book_cover.html' with book=book %}
</a>
{% include 'snippets/shelve_button.html' with book=book %}
</div>
{% endfor %}
</div>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -1,22 +1,18 @@
<div class="tile is-ancestor"> <div class="columns">
<div class="tile is-vertical"> {% for book in books %}
<div class="tile"> {% if forloop.counter0|divisibleby:"4" %}
{% for book in books %} </div>
{% if forloop.counter0|divisibleby:"5" %} <div class="columns">
</div>
<div class="tile">
{% endif %} {% endif %}
<div class="tile is-parent is-vertical"> <div class="column is-narrow">
<article class="tile is-child box"> <div class="box">
<a href="/book/{{ book.id }}"> <a href="/book/{{ book.id }}">
{% include 'snippets/book_cover.html' with book=book %} {% include 'snippets/book_cover.html' with book=book %}
</a> </a>
{% include 'snippets/rate_action.html' with user=request.user book=book %} {% include 'snippets/rate_action.html' with user=request.user book=book %}
{% include 'snippets/shelve_button.html' with book=book %} {% include 'snippets/shelve_button.html' with book=book %}
</article>
</div>
{% endfor %}
</div> </div>
</div> </div>
{% endfor %}
</div> </div>