1
0
Fork 0

Adds very simple author pages

This commit is contained in:
Mouse Reeve 2020-02-10 22:32:03 -08:00
parent 0f1240ca1f
commit 964c56079c
5 changed files with 36 additions and 3 deletions

View file

@ -0,0 +1,15 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div id="content">
<div>
<h2>{{ author.data.name }}</h2>
{% for book in books %}
<div class="book-preview">
{% include 'snippets/book.html' with book=book size=large description=True %}
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View file

@ -3,7 +3,7 @@
<p class="title">
<a href="/book/{{ book.openlibrary_key }}">{{ book.data.title }}</a>
</p>
<p>by <a href="/author/{{ book.author.id }}" class="author">{{ book.authors.first.data.name }}</a></p>
<p>by <a href="/author/{{ book.authors.first.openlibrary_key }}" class="author">{{ book.authors.first.data.name }}</a></p>
{% if rating %}
{{ rating | stars }} {{ rating }}