Updates queries
This commit is contained in:
@ -22,54 +22,60 @@
|
||||
|
||||
<div class="columns">
|
||||
{% if top_rated %}
|
||||
{% with book=top_rated.default_edition rating=top_rated.rating %}
|
||||
<div class="column is-one-third is-flex">
|
||||
<div class="media notification">
|
||||
<div class="media-left">
|
||||
<a href="{{ top_rated.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=top_rated cover_class='is-h-m' size='medium' aria='show' %}
|
||||
<a href="{{ book.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=book cover_class='is-h-m' size='medium' aria='show' %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
{% blocktrans trimmed with title=top_rated|book_title book_path=top_rated.local_path site_name=site.name rating=top_rated.rating|floatformat:1 %}
|
||||
{% blocktrans trimmed with title=book|book_title book_path=book.local_path site_name=site.name rating=rating|floatformat:1 %}
|
||||
<a href="{{ book_path }}"><em>{{ title }}</em></a> is {{ site_name }}'s most beloved book, with an average rating of {{ rating }} out of 5.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if wanted %}
|
||||
{% with book=wanted.default_edition %}
|
||||
<div class="column is-one-third is-flex">
|
||||
<div class="media notification">
|
||||
<div class="media-left">
|
||||
<a href="{{ wanted.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=wanted cover_class='is-h-m' size='medium' aria='show' %}
|
||||
<a href="{{ book.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=book cover_class='is-h-m' size='medium' aria='show' %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
{% blocktrans trimmed with title=wanted|book_title book_path=wanted.local_path site_name=site.name %}
|
||||
{% blocktrans trimmed with title=book|book_title book_path=book.local_path site_name=site.name %}
|
||||
More {{ site_name }} users want to read <a href="{{ book_path }}"><em>{{ title }}</em></a> than any other book.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if controversial %}
|
||||
{% with book=controversial.default_edition %}
|
||||
<div class="column is-one-third is-flex">
|
||||
<div class="media notification">
|
||||
<div class="media-left">
|
||||
<a href="{{ controversial.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=controversial cover_class='is-h-m' size='medium' aria='show' %}
|
||||
<a href="{{ book.local_path }}">
|
||||
{% include 'snippets/book_cover.html' with book=book cover_class='is-h-m' size='medium' aria='show' %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
{% blocktrans trimmed with title=controversial|book_title book_path=controversial.local_path site_name=site.name %}
|
||||
{% blocktrans trimmed with title=book|book_title book_path=book.local_path site_name=site.name %}
|
||||
<a href="{{ book_path }}"><em>{{ title }}</em></a> has the most divisive ratings of any book on {{ site_name }}.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user