From 77bab2483450f5a638c682c222d722b4371e5b77 Mon Sep 17 00:00:00 2001
From: Mouse Reeve
Date: Wed, 29 Jan 2020 01:25:56 -0800
Subject: [PATCH] book description formatting
---
fedireads/static/format.css | 24 +++++++++++++-----------
fedireads/templates/book.html | 1 +
fedireads/templates/feed.html | 4 ++--
fedireads/views.py | 4 ++--
4 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/fedireads/static/format.css b/fedireads/static/format.css
index 7c4f666d2..d5c76c5d5 100644
--- a/fedireads/static/format.css
+++ b/fedireads/static/format.css
@@ -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;
+}
diff --git a/fedireads/templates/book.html b/fedireads/templates/book.html
index c3511a955..97ea521dd 100644
--- a/fedireads/templates/book.html
+++ b/fedireads/templates/book.html
@@ -7,6 +7,7 @@
{{ book.data.title }}
by {{ book.authors.first.data.name }}
{{ rating }} stars
+ {{ book.data.description }}
Leave a review
diff --git a/fedireads/templates/feed.html b/fedireads/templates/feed.html
index dcfea25bf..cb6f7a498 100644
--- a/fedireads/templates/feed.html
+++ b/fedireads/templates/feed.html
@@ -82,7 +82,7 @@
{{ activity.book.data.title }}
by
{{ activity.book.authors.first.data.name }}
- {{ book.data.description }}
+ {{ activity.book.data.description }}
{% elif activity.fedireads_type == 'Review' %}
@@ -95,7 +95,7 @@
{{ activity.book.data.title }}
by
{{ activity.book.authors.first.data.name }}
- {{ book.data.description }}
+ {{ activity.book.data.description }}
{{ activity.name }}
diff --git a/fedireads/views.py b/fedireads/views.py
index 563dd1d4a..55c603b8c 100644
--- a/fedireads/views.py
+++ b/fedireads/views.py
@@ -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)