moviewyrm/bookwyrm/templates/lists/list_items.html

51 lines
2 KiB
HTML
Raw Normal View History

{% load i18n %}
2021-05-11 22:14:42 +00:00
{% load markdown %}
{% load interaction %}
2021-01-31 22:03:38 +00:00
<div class="columns is-multiline">
{% for list in lists %}
<div class="column is-one-quarter">
2021-04-29 19:40:54 +00:00
<div class="card is-stretchable">
2021-01-31 22:03:38 +00:00
<header class="card-header">
<h4 class="card-header-title">
<a href="{{ list.local_path }}">{{ list.name }}</a> <span class="subtitle">{% include 'snippets/privacy-icons.html' with item=list %}</span>
</h4>
{% if request.user|saved:list %}
<div class="card-header-icon">
{% trans "Saved" as text %}
<span class="icon icon-bookmark has-text-grey" title="{{ text }}">
<span class="is-sr-only">{{ text }}</span>
</span>
</div>
{% endif %}
2021-01-31 22:03:38 +00:00
</header>
{% with list_books=list.listitem_set.all|slice:5 %}
{% if list_books %}
<div class="card-image columns is-mobile is-gapless is-clipped">
{% for book in list_books %}
<a class="column is-cover" href="{{ book.book.local_path }}">
2021-05-24 14:18:05 +00:00
{% include 'snippets/book_cover.html' with book=book.book cover_class='is-h-s' size='small' aria='show' %}
</a>
{% endfor %}
</div>
{% endif %}
{% endwith %}
2021-01-31 22:03:38 +00:00
<div class="card-content is-flex-grow-0">
2021-05-18 17:55:05 +00:00
<div class="is-clipped" {% if list.description %}title="{{ list.description }}"{% endif %}>
{% if list.description %}
{{ list.description|to_markdown|safe|truncatechars_html:30 }}
{% else %}
&nbsp;
{% endif %}
</div>
2021-03-07 18:24:46 +00:00
<p class="subtitle help">
{% include 'lists/created_text.html' with list=list %}
</p>
2021-01-31 22:03:38 +00:00
</div>
</div>
</div>
{% endfor %}
</div>