Factor out book series info into separate template

This commit is contained in:
Bart Schuurmans 2024-03-23 19:35:24 +01:00
parent 0282e20b89
commit 2d2ccd51df
9 changed files with 12 additions and 27 deletions

View file

@ -0,0 +1,3 @@
{% if book.series %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}

View file

@ -9,8 +9,7 @@
{% if book.authors.exists %} {% if book.authors.exists %}
{% blocktrans trimmed with path=book.local_path title=book|book_title %} {% blocktrans trimmed with path=book.local_path title=book|book_title %}
<a href="{{ path }}">{{ title }} <a href="{{ path }}">{{ title }}</a>
</a>
by by
{% endblocktrans %}&nbsp;{% include 'snippets/authors.html' with book=book limit=3 %} {% endblocktrans %}&nbsp;{% include 'snippets/authors.html' with book=book limit=3 %}
@ -18,10 +17,7 @@ by
<a href="{{ book.local_path }}">{{ book|book_title }}</a> <a href="{{ book.local_path }}">{{ book|book_title }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endcache %} {% endcache %}
{% endspaceless %} {% endspaceless %}

View file

@ -18,8 +18,6 @@ commented on <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endwith %} {% endwith %}

View file

@ -18,8 +18,6 @@ quoted <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endwith %} {% endwith %}

View file

@ -20,8 +20,6 @@ finished reading <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endspaceless %} {% endspaceless %}

View file

@ -20,8 +20,6 @@ started reading <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}} {%if book.series_number %}#{{book.series_number}}) {% endif %}
{% endif %}
{% endspaceless %} {% endspaceless %}

View file

@ -18,8 +18,6 @@ reviewed <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endwith %} {% endwith %}

View file

@ -20,9 +20,7 @@ stopped reading <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endspaceless %} {% endspaceless %}

View file

@ -20,8 +20,6 @@ wants to read <a href="{{ book_path }}">{{ book }}</a>
{% endif %} {% endif %}
{% if book.series %} {% include 'snippets/book_series.html' with book=book %}
({{book.series}}{%if book.series_number %}, #{{book.series_number}}{% endif %})
{% endif %}
{% endspaceless %} {% endspaceless %}