Fixes book links

This commit is contained in:
Mouse Reeve 2022-01-06 09:58:10 -08:00
parent ee301afa61
commit ee1fd05430

View File

@ -16,53 +16,61 @@
<p class="subtitle notification has-background-primary-light"> <p class="subtitle notification has-background-primary-light">
{% blocktrans trimmed with site_name=site.name %} {% blocktrans trimmed with site_name=site.name %}
{{ site_name }} is part of <em>BookWyrm</em>, a network of independent, self-directed communities for readers. {{ site_name }} is part of <em>BookWyrm</em>, a network of independent, self-directed communities for readers.
While you can interact seemlessly with users anywhere in the <a href="https://joinbookwyrm.com/instances/" target="_blank">BookWyrm network</a>, this community is unique. While you can interact seemlessly with users anywhere in the <a href="https://joinbookwyrm.com/instances/" target="_blank">BookWyrm network</a>, this community is unique.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<div class="columns"> <div class="columns">
{% if top_rated %}
<div class="column is-one-third is-flex"> <div class="column is-one-third is-flex">
<div class="media notification"> <div class="media notification">
<div class="media-left"> <div class="media-left">
<a href="{{ book.local_path }}"> <a href="{{ top_rated.local_path }}">
{% include 'snippets/book_cover.html' with book=top_rated cover_class='is-h-m' size='medium' aria='show' %} {% include 'snippets/book_cover.html' with book=top_rated cover_class='is-h-m' size='medium' aria='show' %}
</a> </a>
</div> </div>
<div class="media-content"> <div class="media-content">
{% blocktrans trimmed with title=top_rated|book_title book_path=book.local_path site_name=site.name rating=top_rated.rating|floatformat:1 %} {% blocktrans trimmed with title=top_rated|book_title book_path=top_rated.local_path site_name=site.name rating=top_rated.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. <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 %} {% endblocktrans %}
</div> </div>
</div> </div>
</div> </div>
{% endif %}
{% if wanted %}
<div class="column is-one-third is-flex"> <div class="column is-one-third is-flex">
<div class="media notification"> <div class="media notification">
<div class="media-left"> <div class="media-left">
<a href="{{ book.local_path }}"> <a href="{{ wanted.local_path }}">
{% include 'snippets/book_cover.html' with book=wanted cover_class='is-h-m' size='medium' aria='show' %} {% include 'snippets/book_cover.html' with book=wanted cover_class='is-h-m' size='medium' aria='show' %}
</a> </a>
</div> </div>
<div class="media-content"> <div class="media-content">
{% blocktrans trimmed with title=wanted|book_title book_path=book.local_path site_name=site.name %} {% blocktrans trimmed with title=wanted|book_title book_path=wanted.local_path site_name=site.name %}
More {{ site_name }} users want to read <a href="{{ book_path }}"><em>{{ title }}</em></a>. More {{ site_name }} users want to read <a href="{{ book_path }}"><em>{{ title }}</em></a>.
{% endblocktrans %} {% endblocktrans %}
</div> </div>
</div> </div>
</div> </div>
{% endif %}
{% if controversial %}
<div class="column is-one-third is-flex"> <div class="column is-one-third is-flex">
<div class="media notification"> <div class="media notification">
<div class="media-left"> <div class="media-left">
<a href="{{ book.local_path }}"> <a href="{{ controversial.local_path }}">
{% include 'snippets/book_cover.html' with book=controversial cover_class='is-h-m' size='medium' aria='show' %} {% include 'snippets/book_cover.html' with book=controversial cover_class='is-h-m' size='medium' aria='show' %}
</a> </a>
</div> </div>
<div class="media-content"> <div class="media-content">
{% blocktrans trimmed with title=controversial|book_title book_path=book.local_path site_name=site.name %} {% blocktrans trimmed with title=controversial|book_title book_path=controversial.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 }}. <a href="{{ book_path }}"><em>{{ title }}</em></a> has the most divisive ratings of any book on {{ site_name }}.
{% endblocktrans %} {% endblocktrans %}
</div> </div>
</div> </div>
</div> </div>
{% endif %}
</div> </div>
<p> <p>