Adds very simple author pages
This commit is contained in:
parent
0f1240ca1f
commit
964c56079c
5 changed files with 36 additions and 3 deletions
15
fedireads/templates/author.html
Normal file
15
fedireads/templates/author.html
Normal 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 %}
|
||||
|
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue