Skip to content

Commit

Permalink
Add author born/death years to search results
Browse files Browse the repository at this point in the history
For it to be simpler to discern between authors that share names, add
their birth and death years to the list.

With both years set, displayed `(1970-2024)`
Dead authors with no set birth year are displayed `(-1970)`.
Currently alive ones are displayed `(1970-)`
  • Loading branch information
tkbremnes committed Nov 20, 2024
1 parent 6184567 commit b0d090e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bookwyrm/templates/search/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<li class="">
<a href="{{ author.local_path }}" class="author" itemprop="author" itemscope itemtype="https://schema.org/Thing">
<span itemprop="name">{{ author.name }}</span>
{% if author.born or author.died %}
<span>({{ author.born|date:"Y" }}-{{ author.died|date:"Y" }})</span>
{% endif %}
</a>
</li>
{% endfor %}
Expand Down

0 comments on commit b0d090e

Please sign in to comment.