diff --git a/fedireads/static/format.css b/fedireads/static/format.css index 1d83af33..b7dfcbb3 100644 --- a/fedireads/static/format.css +++ b/fedireads/static/format.css @@ -312,7 +312,7 @@ button.secondary { .covers-shelf .book-preview:hover img { box-shadow: #F3FFBD 0em 0em 1em 1em; } -.covers-shelf .book-preview img { +.covers-shelf .book-cover { float: none; height: 11rem; width: auto; @@ -332,6 +332,24 @@ button.secondary { display: block; } +.no-cover { + position: relative; +} +.no-cover div { + position: absolute; + padding: 1em; + color: white; + top: 0; + left: 0; + text-align: center; +} +.no-cover .title { + text-transform: uppercase; + margin-bottom: 1em; +} +.book-cover { + width: 180px; +} .book-cover.small { width: 50px; height: auto; diff --git a/fedireads/static/images/no_cover.jpg b/fedireads/static/images/no_cover.jpg index e6fbb3bc..cb460823 100644 Binary files a/fedireads/static/images/no_cover.jpg and b/fedireads/static/images/no_cover.jpg differ diff --git a/fedireads/templates/snippets/book_cover.html b/fedireads/templates/snippets/book_cover.html index 02d1447a..4c7c7c72 100644 --- a/fedireads/templates/snippets/book_cover.html +++ b/fedireads/templates/snippets/book_cover.html @@ -1 +1,11 @@ - +{% if book.cover %} + +{% else %} +
{{ book.title }}
+{{ book.authors.first.name }}
+