book description formatting

This commit is contained in:
Mouse Reeve 2020-01-29 01:25:56 -08:00
parent c5d0e02166
commit 77bab24834
4 changed files with 18 additions and 15 deletions

View file

@ -3,7 +3,6 @@
margin: 0;
padding: 0;
line-height: 1.3em;
overflow: auto;
font-family: sans-serif;
font-weight: normal;
}
@ -22,7 +21,7 @@ h2 {
#main, header > div {
margin: 0 auto;
display: flex;
flex-flow: row wrap;
flex-direction: row;
max-width: 75rem;
width: 100%;
}
@ -55,7 +54,13 @@ h2 {
#sidebar {
display: flex;
flex-direction: column;
flex-grow: 1;
min-width: 20rem;
}
#feed, #content {
display: flex;
flex-direction: column;
margin: 0 1rem 0 0;
}
.user-pic {
@ -80,17 +85,10 @@ h2 {
height: auto;
}
#feed, #content {
display: flex;
flex-direction: column;
flex-grow: 3;
}
#content > div, #feed > div, #sidebar > div {
background-color: #EFEFEF;
margin: 1rem auto;
margin: 1rem 0 1rem 1rem;
padding: 1rem;
width: 90%;
}
.review-form textarea {
@ -104,3 +102,7 @@ h2 {
small {
display: block;
}
blockquote {
white-space: pre-wrap;
}

View file

@ -7,6 +7,7 @@
<h1>{{ book.data.title }}</h1>
by {{ book.authors.first.data.name }}
{{ rating }} stars
<blockquote>{{ book.data.description }}</blockquote>
</div>
<h3>Leave a review</h3>

View file

@ -82,7 +82,7 @@
<a href="{{ activity.book.openlibrary_key }}">{{ activity.book.data.title }}</a>
by
<a href="" class="author">{{ activity.book.authors.first.data.name }}</a>
<blockquote>{{ book.data.description }}</blockquote>
<blockquote>{{ activity.book.data.description }}</blockquote>
</p>
</div>
{% elif activity.fedireads_type == 'Review' %}
@ -95,7 +95,7 @@
<a href="{{ activity.book.openlibrary_key }}">{{ activity.book.data.title }}</a>
by
<a href="" class="author">{{ activity.book.authors.first.data.name }}</a>
<blockquote>{{ book.data.description }}</blockquote>
<blockquote>{{ activity.book.data.description }}</blockquote>
</p>
<h3>{{ activity.name }}</h3>

View file

@ -25,8 +25,8 @@ def home(request):
)
user_books = models.Book.objects.filter(shelves__user=request.user).all()
recent_books = models.Book.objects.order_by(
'added_date'
)[:5]
'-added_date'
)[:5]
following = models.User.objects.filter(
Q(followers=request.user) | Q(id=request.user.id)