moviewyrm/bookwyrm/templates/author/author.html

85 lines
3 KiB
HTML
Raw Normal View History

2020-02-11 06:32:03 +00:00
{% extends 'layout.html' %}
{% load i18n %}
2021-05-11 22:14:42 +00:00
{% load markdown %}
2021-05-11 00:24:10 +00:00
{% load humanize %}
{% block title %}{{ author.name }}{% endblock %}
2020-02-11 06:32:03 +00:00
{% block content %}
2020-09-30 23:20:50 +00:00
<div class="block">
2021-02-23 21:04:24 +00:00
<div class="columns is-mobile">
<div class="column">
<h1 class="title">{{ author.name }}</h1>
</div>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<div class="column is-narrow">
2020-12-31 01:36:35 +00:00
<a href="{{ author.local_path }}/edit">
<span class="icon icon-pencil" title="{% trans 'Edit Author' %}">
<span class="is-sr-only">{% trans "Edit Author" %}</span>
</span>
</a>
</div>
{% endif %}
</div>
</div>
2021-05-11 00:24:10 +00:00
<div class="block content columns">
{% if author.aliases or author.born or author.died or author.wikipedia_link %}
<div class="column is-narrow">
<div class="box">
<dl>
{% if author.aliases %}
<div class="is-flex">
<dt class="mr-1">{% trans "Aliases:" %}</dt>
<dd itemprop="aliases">{{ author.aliases|join:', ' }}</dd>
</div>
{% endif %}
{% if author.born %}
<div class="is-flex">
<dt class="mr-1">{% trans "Born:" %}</dt>
<dd itemprop="aliases">{{ author.born|naturalday }}</dd>
</div>
{% endif %}
{% if author.aliases %}
<div class="is-flex">
<dt class="mr-1">{% trans "Died:" %}</dt>
<dd itemprop="aliases">{{ author.died|naturalday }}</dd>
</div>
{% endif %}
</dl>
2021-05-11 00:24:10 +00:00
{% if author.wikipedia_link %}
<p><a href="{{ author.wikipedia_link }}" rel=”noopener” target="_blank">{% trans "Wikipedia" %}</a></p>
{% endif %}
{% if author.openlibrary_key %}
<p class="mb-0">
<a href="https://openlibrary.org/authors/{{ author.openlibrary_key }}" target="_blank" rel="noopener">{% trans "View on OpenLibrary" %}</a>
</p>
{% endif %}
{% if author.inventaire_id %}
<p class="mb-0">
<a href="https://inventaire.io/entity/{{ author.inventaire_id }}" target="_blank" rel="noopener">{% trans "View on Inventaire" %}</a>
</p>
{% endif %}
</div>
</div>
{% endif %}
2021-05-11 00:24:10 +00:00
<div class="column">
{% if author.bio %}
2021-05-11 22:14:42 +00:00
{{ author.bio|to_markdown|safe }}
2021-05-11 00:24:10 +00:00
{% endif %}
</div>
</div>
2020-09-30 23:20:50 +00:00
<div class="block">
<h3 class="title is-4">{% blocktrans with name=author.name %}Books by {{ name }}{% endblocktrans %}</h3>
<div class="columns is-multiline is-mobile">
{% for book in books %}
<div class="column is-one-fifth">
{% include 'discover/small-book.html' with book=book %}
</div>
{% endfor %}
</div>
2020-02-11 06:32:03 +00:00
</div>
{% endblock %}