mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Adds author bios
This commit is contained in:
parent
964c56079c
commit
36c8b29f3e
2 changed files with 10 additions and 0 deletions
|
@ -4,6 +4,10 @@
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div>
|
<div>
|
||||||
<h2>{{ author.data.name }}</h2>
|
<h2>{{ author.data.name }}</h2>
|
||||||
|
{% if author.data.bio %}
|
||||||
|
<blockquote>{{ author.data.bio | author_bio }}
|
||||||
|
</blockquote>
|
||||||
|
{% endif %}
|
||||||
{% for book in books %}
|
{% for book in books %}
|
||||||
<div class="book-preview">
|
<div class="book-preview">
|
||||||
{% include 'snippets/book.html' with book=book size=large description=True %}
|
{% include 'snippets/book.html' with book=book size=large description=True %}
|
||||||
|
|
|
@ -26,3 +26,9 @@ def description_format(description):
|
||||||
description = description.split('----------')[0]
|
description = description.split('----------')[0]
|
||||||
|
|
||||||
return description.strip()
|
return description.strip()
|
||||||
|
|
||||||
|
@register.filter(name='author_bio')
|
||||||
|
def bio_format(bio):
|
||||||
|
''' clean up OL author bios '''
|
||||||
|
bio = bio.split('\n')
|
||||||
|
return bio[0].strip()
|
||||||
|
|
Loading…
Reference in a new issue