2020-02-11 01:32:03 -05:00
|
|
|
{% extends 'layout.html' %}
|
2021-02-27 17:22:39 -05:00
|
|
|
{% load i18n %}
|
2021-05-11 18:14:42 -04:00
|
|
|
{% load markdown %}
|
2021-05-10 20:24:10 -04:00
|
|
|
{% load humanize %}
|
2021-02-28 13:00:36 -05:00
|
|
|
|
|
|
|
{% block title %}{{ author.name }}{% endblock %}
|
|
|
|
|
2020-02-11 01:32:03 -05:00
|
|
|
{% block content %}
|
2020-09-30 19:20:50 -04:00
|
|
|
<div class="block">
|
2021-02-23 16:04:24 -05:00
|
|
|
<div class="columns is-mobile">
|
2020-12-22 12:26:40 -05:00
|
|
|
<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-30 20:36:35 -05:00
|
|
|
<a href="{{ author.local_path }}/edit">
|
2021-05-18 13:45:51 -04:00
|
|
|
<span class="icon icon-pencil" title="{% trans 'Edit Author' %}" aria-hidden="True"></span>
|
|
|
|
<span>{% trans "Edit Author" %}</span>
|
2020-12-22 12:26:40 -05:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-16 20:33:53 -04:00
|
|
|
|
2021-05-24 06:36:48 -04:00
|
|
|
<div class="block columns" itemscope itemtype="https://schema.org/Person">
|
2021-05-23 15:17:14 -04:00
|
|
|
<meta itemprop="name" content="{{ author.name }}">
|
|
|
|
|
|
|
|
{% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id %}
|
2021-05-10 20:24:10 -04:00
|
|
|
<div class="column is-narrow">
|
|
|
|
<div class="box">
|
|
|
|
<dl>
|
|
|
|
{% if author.aliases %}
|
|
|
|
<div class="is-flex">
|
|
|
|
<dt class="mr-1">{% trans "Aliases:" %}</dt>
|
2021-05-24 06:36:48 -04:00
|
|
|
{% for alias in author.aliases %}
|
|
|
|
<dd itemprop="alternateName" content="{{alias}}">
|
|
|
|
{{alias}}{% if not forloop.last %},{% endif %}
|
|
|
|
</dd>
|
|
|
|
{% endfor %}
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if author.born %}
|
|
|
|
<div class="is-flex">
|
|
|
|
<dt class="mr-1">{% trans "Born:" %}</dt>
|
2021-05-23 15:17:14 -04:00
|
|
|
<dd itemprop="birthDate">{{ author.born|naturalday }}</dd>
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-05-23 14:25:42 -04:00
|
|
|
{% if author.died %}
|
2021-05-10 20:24:10 -04:00
|
|
|
<div class="is-flex">
|
|
|
|
<dt class="mr-1">{% trans "Died:" %}</dt>
|
2021-05-23 15:17:14 -04:00
|
|
|
<dd itemprop="deathDate">{{ author.died|naturalday }}</dd>
|
2021-05-10 20:24:10 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</dl>
|
2021-05-06 11:24:05 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.wikipedia_link %}
|
2021-05-24 06:36:48 -04:00
|
|
|
<p class="mt-1">
|
|
|
|
<a itemprop="sameAs" href="{{ author.wikipedia_link }}" rel=”noopener” target="_blank">
|
2021-05-23 15:17:14 -04:00
|
|
|
{% trans "Wikipedia" %}
|
|
|
|
</a>
|
|
|
|
</p>
|
2021-05-10 20:24:10 -04:00
|
|
|
{% endif %}
|
2021-05-24 06:36:48 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.openlibrary_key %}
|
2021-05-24 06:36:48 -04:00
|
|
|
<p class="mt-1">
|
|
|
|
<a itemprop="sameAs" href="https://openlibrary.org/authors/{{ author.openlibrary_key }}" target="_blank" rel="noopener">
|
2021-05-23 15:17:14 -04:00
|
|
|
{% trans "View on OpenLibrary" %}
|
|
|
|
</a>
|
2021-05-10 20:24:10 -04:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-24 06:36:48 -04:00
|
|
|
|
2021-05-10 20:24:10 -04:00
|
|
|
{% if author.inventaire_id %}
|
2021-05-24 06:36:48 -04:00
|
|
|
<p class="mt-1">
|
|
|
|
<a itemprop="sameAs" href="https://inventaire.io/entity/{{ author.inventaire_id }}" target="_blank" rel="noopener">
|
2021-05-23 15:17:14 -04:00
|
|
|
{% trans "View on Inventaire" %}
|
|
|
|
</a>
|
2021-05-10 20:24:10 -04:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-22 12:26:40 -05:00
|
|
|
{% endif %}
|
2021-05-10 20:24:10 -04:00
|
|
|
<div class="column">
|
|
|
|
{% if author.bio %}
|
2021-05-11 18:14:42 -04:00
|
|
|
{{ author.bio|to_markdown|safe }}
|
2021-05-10 20:24:10 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-03-16 20:33:53 -04:00
|
|
|
</div>
|
|
|
|
|
2020-09-30 19:20:50 -04:00
|
|
|
<div class="block">
|
2021-02-27 17:22:39 -05:00
|
|
|
<h3 class="title is-4">{% blocktrans with name=author.name %}Books by {{ name }}{% endblocktrans %}</h3>
|
2021-05-10 19:43:40 -04:00
|
|
|
<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 01:32:03 -05:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|