2021-08-23 18:54:20 -04:00
{% load i18n %}
2021-05-11 18:14:42 -04:00
{% load markdown %}
2021-08-23 18:54:20 -04:00
{% load interaction %}
2021-01-31 17:03:38 -05:00
< div class = "columns is-multiline" >
{% for list in lists %}
< div class = "column is-one-quarter" >
2021-04-29 15:40:54 -04:00
< div class = "card is-stretchable" >
2021-01-31 17:03:38 -05:00
< header class = "card-header" >
2021-12-04 17:51:18 -05:00
< h4 class = "card-header-title is-clipped" >
< a href = "{{ list.local_path }}" class = "is-clipped" > {{ list.name }}< / a > < span class = "subtitle" > {% include 'snippets/privacy-icons.html' with item=list %}< / span >
2021-01-31 17:03:38 -05:00
< / h4 >
2021-08-24 17:16:22 -04:00
{% if request.user.is_authenticated and request.user|saved:list %}
2021-08-23 18:54:20 -04:00
< 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 17:03:38 -05:00
< / header >
2021-04-24 15:16:30 -04:00
{% with list_books=list.listitem_set.all|slice:5 %}
{% if list_books %}
2021-04-25 09:37:46 -04:00
< div class = "card-image columns is-mobile is-gapless is-clipped" >
2021-04-24 15:16:30 -04:00
{% for book in list_books %}
2021-04-27 08:58:30 -04:00
< a class = "column is-cover" href = "{{ book.book.local_path }}" >
2021-05-24 10:18:05 -04:00
{% include 'snippets/book_cover.html' with book=book.book cover_class='is-h-s' size='small' aria='show' %}
2021-04-24 15:16:30 -04:00
< / a >
{% endfor %}
< / div >
{% endif %}
{% endwith %}
2021-01-31 17:03:38 -05:00
< div class = "card-content is-flex-grow-0" >
2021-05-18 13:55:05 -04:00
< div class = "is-clipped" { % if list . description % } title = "{{ list.description }}" { % endif % } >
2021-03-30 13:19:51 -04:00
{% if list.description %}
{{ list.description|to_markdown|safe|truncatechars_html:30 }}
{% else %}
{% endif %}
< / div >
2021-03-07 13:24:46 -05:00
< p class = "subtitle help" >
{% include 'lists/created_text.html' with list=list %}
< / p >
2021-01-31 17:03:38 -05:00
< / div >
< / div >
< / div >
{% endfor %}
< / div >