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

View file

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

View file

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

View file

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