Merge pull request #702 from mouse-reeve/book-page-display

Book page display
This commit is contained in:
Mouse Reeve 2021-03-07 08:43:47 -08:00 committed by GitHub
commit 283bfe8d6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 15 deletions

View file

@ -26,7 +26,7 @@ class Book(ActivityObject):
librarythingKey: str = ''
goodreadsKey: str = ''
cover: Image = field(default_factory=lambda: {})
cover: Image = None
type: str = 'Book'

View file

@ -35,7 +35,7 @@
</div>
<div class="columns">
<div class="column is-narrow">
<div class="column is-one-fifth">
{% include 'snippets/book_cover.html' with book=book size=large %}
{% include 'snippets/rate_action.html' with user=request.user book=book %}
{% include 'snippets/shelve_button/shelve_button.html' %}
@ -93,7 +93,7 @@
</section>
</div>
<div class="column">
<div class="column is-three-fifths">
<div class="block">
<h3 class="field is-grouped">
{% include 'snippets/stars.html' with rating=rating %}
@ -201,7 +201,7 @@
</div>
</div>
<div class="column is-narrow">
<div class="column is-one-fifth">
{% if book.subjects %}
<section class="content block">
<h2 class="title is-5">{% trans "Subjects" %}</h2>
@ -217,7 +217,7 @@
<section class="content block">
<h2 class="title is-5">{% trans "Places" %}</h2>
<ul>
{% for place in book.subject_placess %}
{% for place in book.subject_places %}
<li>{{ place }}</li>
{% endfor %}
</ul>
@ -254,8 +254,8 @@
<div>
{% include 'snippets/username.html' with user=rating.user %}
</div>
<div class="field is-grouped mb-0">
<div>{% trans "rated it" %}</div>
<div class="is-flex">
<p class="mr-1">{% trans "rated it" %}</p>
{% include 'snippets/stars.html' with rating=rating.rating %}
</div>
<div>

View file

@ -79,7 +79,7 @@
aria-controls="navbar-dropdown"
>
{% include 'snippets/avatar.html' with user=request.user %}
{% include 'snippets/username.html' with user=request.user anchor=false %}
<span class="ml-2">{% include 'snippets/username.html' with user=request.user anchor=false %}</span>
</a>
<ul class="navbar-dropdown" id="navbar-dropdown">
<li>

View file

@ -6,8 +6,7 @@
<div class="no-cover book-cover">
<img class="book-cover" src="/static/images/no_cover.jpg" alt="No cover">
<div>
<p>{{ book.title }}</p>
<p>({{ book.edition_info }})</p>
<p>{{ book.alt_text }}</p>
</div>
</div>
{% endif %}

View file

@ -67,4 +67,4 @@
</div>
</form>
</div>
{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete-readthrough" controls_uid=readthrough.id %}
{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete-readthrough" controls_uid=readthrough.id no_body=True %}

View file

@ -1,9 +1,7 @@
{% spaceless %}
{% load bookwyrm_tags %}
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %}
class="user ml-1"
>
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %}>
{{ user.display_name }}
</a>

View file

@ -1 +0,0 @@
from . import *