diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index 9488f0d7c..3841aac8c 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -29,6 +29,40 @@ body { min-width: 75% !important; } +/** Utilities not covered by Bulma + ******************************************************************************/ + +@media only screen and (max-width: 768px) { + .is-sr-only-mobile { + border: none !important; + clip: rect(0, 0, 0, 0) !important; + height: 0.01em !important; + overflow: hidden !important; + padding: 0 !important; + position: absolute !important; + white-space: nowrap !important; + width: 0.01em !important; + } + + .m-0-mobile { + margin: 0 !important; + } +} + +.button.is-transparent { + background-color: transparent; +} + +.card.is-stretchable { + display: flex; + flex-direction: column; + height: 100%; +} + +.card.is-stretchable .card-content { + flex-grow: 1; +} + /** Shelving ******************************************************************************/ @@ -257,3 +291,53 @@ body { height: 150px; } } + +/* Book preview table + ******************************************************************************/ + +.book-preview td { + vertical-align: middle; +} + +@media only screen and (max-width: 768px) { + table.is-mobile, + table.is-mobile tbody { + display: block; + } + + table.is-mobile tr { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + border-top: 1px solid #dbdbdb; + } + + table.is-mobile td { + display: block; + box-sizing: border-box; + flex: 1 0 100%; + order: 2; + border-bottom: 0; + } + + table.is-mobile td.book-preview-top-row { + order: 1; + flex-basis: auto; + } + + table.is-mobile td[data-title]:not(:empty)::before { + content: attr(data-title); + display: block; + font-size: 0.75em; + font-weight: bold; + } + + table.is-mobile td:empty { + padding: 0; + } + + table.is-mobile th, + table.is-mobile thead { + display: none; + } +} diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index 34558f8de..8ab613216 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -245,7 +245,36 @@
- {% for review in reviews %} + {% if request.user.is_authenticated %} + + {% endif %} + + {% for review in statuses %}
- {% include 'snippets/pagination.html' with page=reviews path=book.local_path anchor="#reviews" %} + {% include 'snippets/pagination.html' with page=statuses path=request.path anchor="#reviews" %}
diff --git a/bookwyrm/templates/directory/directory.html b/bookwyrm/templates/directory/directory.html index 430e85394..2fa8a5aea 100644 --- a/bookwyrm/templates/directory/directory.html +++ b/bookwyrm/templates/directory/directory.html @@ -41,7 +41,7 @@
{% for user in users %}
-
+
-
+
{% if user.summary %} {{ user.summary | to_markdown | safe | truncatechars_html:40 }} {% else %} {% endif %}
-