diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index f385e629..087f8d75 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -555,6 +555,35 @@ ol.ordered-list li::before { padding: 0 0.75em; } +/* Breadcrumbs + ******************************************************************************/ + +.books-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); + gap: 2em; + align-items: end; + justify-items: center; +} + +.books-grid > .is-big { + grid-column: span 2; + grid-row: span 2; + justify-self: stretch; +} + +.books-grid .book-cover { + width: 100%; +} + +.books-grid .book-title { + --height-basis: 1.35rem; + display: block; + margin-top: 0.5rem; + line-height: var(--height-basis); + min-height: calc(2 * var(--height-basis)); +} + /* Dimensions * @todo These could be in rem. ******************************************************************************/ diff --git a/bookwyrm/templates/annual_summary/layout.html b/bookwyrm/templates/annual_summary/layout.html new file mode 100644 index 00000000..602fd752 --- /dev/null +++ b/bookwyrm/templates/annual_summary/layout.html @@ -0,0 +1,152 @@ +{% extends 'layout.html' %} +{% load i18n %} +{% load static %} + + +{% block title %}{% blocktrans %}{{ year }} in the books{% endblocktrans %}{% endblock %} + +{% block content %} +
{% trans "That’s great!" %}
+ ++ {% blocktrans %}That makes an average of {{ pages_average }} pages per book.{% endblocktrans %} +
+ + {% if no_page_number %} +{% blocktrans %}({{ no_page_number }} books don’t have pages){% endblocktrans %}
+ {% endif %} ++ + {{ book_pages_lowest.title }} + +
+ {% if book_pages_lowest.authors.exists %} +{% trans "by" %} + {% include 'snippets/authors.html' with book=book_pages_lowest %} +
+ {% endif %} ++ {% with pages=book_pages_lowest.pages %} + {% blocktrans %}{{ pages }} pages{% endblocktrans%} + {% endwith %} +
++ + {{ book_pages_highest.title }} + +
+ {% if book_pages_highest.authors.exists %} +{% trans "by" %} + {% include 'snippets/authors.html' with book=book_pages_highest %} +
+ {% endif %} ++ {% with pages=book_pages_highest.pages %} + {% blocktrans %}{{ pages }} pages{% endblocktrans%} + {% endwith %} +
++ + {{ book_rating_highest.book.title }} + +
+ {% if book_rating_highest.book.authors.exists %} +{% trans "by" %} + {% include 'snippets/authors.html' with book=book_rating_highest.book %} +
+ {% endif %} ++ {% with rating=book_rating_highest.rating|floatformat %} + {% blocktrans %}Your rating: {{ rating }}{% endblocktrans%} + {% endwith %} +
+