diff --git a/fedireads/settings.py b/fedireads/settings.py index d0d225704..8dc8eb7c9 100644 --- a/fedireads/settings.py +++ b/fedireads/settings.py @@ -28,6 +28,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django.contrib.humanize', 'fedireads', ] diff --git a/fedireads/static/format.css b/fedireads/static/format.css index 34b3c1425..4ecfc51de 100644 --- a/fedireads/static/format.css +++ b/fedireads/static/format.css @@ -16,6 +16,7 @@ h2 { background-color: #B2DBBF; padding: 0.5rem 0.2rem; margin-bottom: 1rem; + height: 1rem; } #top-bar { @@ -51,18 +52,21 @@ h2 { #feed, #content, #sidebar { display: flex; flex-direction: column; - margin: 0 1rem 0 0; + margin: 0 1rem 1rem 0; } #sidebar { min-width: 20rem; + margin-right: 0; } .user-pic { width: 2rem; height: auto; border-radius: 50%; - vertical-align: middle; + vertical-align: top; + position: relative; + bottom: 0.5em; } .book-preview { @@ -72,7 +76,6 @@ h2 { .book-preview img { float: left; margin-right: 1em; - margin-bottom: 1em; } .book-cover.small { @@ -110,3 +113,23 @@ blockquote { clear: both; margin-top: 1rem; } + +table { + border-collapse: collapse; + margin: 1em; +} +tr { + vertical-align: top; +} + +tr:nth-child(even) { + background-color: #DDD; +} + +th { + font-weight: bold; +} +th, td { + padding: 1em; + text-align: left; +} diff --git a/fedireads/templates/book.html b/fedireads/templates/book.html index 97ea521dd..1ebf0e48b 100644 --- a/fedireads/templates/book.html +++ b/fedireads/templates/book.html @@ -1,4 +1,5 @@ {% extends 'layout.html' %} +{% load fr_display %} {% block content %}
@@ -6,13 +7,14 @@

{{ book.data.title }}

by {{ book.authors.first.data.name }} - {{ rating }} stars + {{ rating | stars }} {{ rating }}
{{ book.data.description }}

Leave a review

+ {% csrf_token %} {{ review_form.as_p }} @@ -27,7 +29,7 @@ {% for review in reviews %}

{{ review.name }} - {{ review.rating }} stars, by {{ review.user.username }} + {{ review.rating | stars }} stars, by {{ review.user.username }}

{{ review.review_content }}
diff --git a/fedireads/templates/feed.html b/fedireads/templates/feed.html index 96c8dbdb3..45b09d28a 100644 --- a/fedireads/templates/feed.html +++ b/fedireads/templates/feed.html @@ -1,4 +1,5 @@ {% extends 'layout.html' %} +{% load fr_display %} {% block content %}