Merge remote-tracking branch 'upstream/main' into images-django-imagekit

This commit is contained in:
Joachim
2021-06-19 19:32:56 +02:00
171 changed files with 3674 additions and 2175 deletions

View File

@ -1,35 +1,47 @@
{% extends 'layout.html' %}
{% load i18n %}{% load bookwyrm_tags %}{% load humanize %}{% load utilities %}
{% load i18n %}{% load bookwyrm_tags %}{% load humanize %}{% load utilities %}{% load layout %}
{% block title %}{{ book|book_title }}{% endblock %}
{% block opengraph_images %}
{% include 'snippets/opengraph_images.html' with image=book.preview_image %}
{% endblock %}
{% block content %}
{% with user_authenticated=request.user.is_authenticated can_edit_book=perms.bookwyrm.edit_book %}
<div class="block" itemscope itemtype="https://schema.org/Book">
<div class="columns is-mobile">
<div class="column">
<h1 class="title">
<span itemprop="name">
{{ book.title }}{% if book.subtitle %}:
<small>{{ book.subtitle }}</small>
{% endif %}
</span>
{% if book.series %}
<meta itemprop="isPartOf" content="{{ book.series }}">
<meta itemprop="volumeNumber" content="{{ book.series_number }}">
<small class="has-text-grey-dark">
({{ book.series }}
{% if book.series_number %} #{{ book.series_number }}{% endif %})
</small>
<br>
{% endif %}
<h1 class="title" itemprop="name">
{{ book.title }}
</h1>
{% if book.subtitle or book.series %}
<p class="subtitle title is-5">
{% if book.subtitle %}
<meta
itemprop="alternativeHeadline"
content="{{ book.subtitle | escape }}"
>
<span class="has-text-weight-bold">
{{ book.subtitle }}
</span>
{% endif %}
{% if book.series %}
<meta itemprop="isPartOf" content="{{ book.series | escape }}">
<meta itemprop="volumeNumber" content="{{ book.series_number }}">
({{ book.series }}{% if book.series_number %} #{{ book.series_number }}{% endif %})
{% endif %}
</p>
{% endif %}
{% if book.authors %}
<h2 class="subtitle">
{% trans "by" %} {% include 'snippets/authors.html' with book=book %}
</h2>
<div class="subtitle">
{% trans "by" %} {% include 'snippets/authors.html' with book=book %}
</div>
{% endif %}
</div>
@ -37,7 +49,7 @@
<div class="column is-narrow">
<a href="{{ book.id }}/edit">
<span class="icon icon-pencil" title="{% trans "Edit Book" %}" aria-hidden=True></span>
<span>{% trans "Edit Book" %}</span>
<span class="is-hidden-mobile">{% trans "Edit Book" %}</span>
</a>
</div>
{% endif %}
@ -85,7 +97,7 @@
<div class="column is-three-fifths">
<div class="block">
<h3
<div
class="field is-grouped"
itemprop="aggregateRating"
itemscope
@ -103,7 +115,7 @@
{% plural %}
({{ review_count }} reviews)
{% endblocktrans %}
</h3>
</div>
{% with full=book|book_description itemprop='abstract' %}
{% include 'snippets/trimmed_text.html' %}
@ -181,7 +193,7 @@
<p>{% trans "You don't have any reading activity for this book." %}</p>
{% endif %}
{% for readthrough in readthroughs %}
{% include 'snippets/readthrough.html' with readthrough=readthrough %}
{% include 'book/readthrough.html' with readthrough=readthrough %}
{% endfor %}
</section>
<hr aria-hidden="true">