cover: List:

- Reduce Padding around covers.
- Remove `content` which is applying too extensive default styles.
This commit is contained in:
Fabien Basmaison 2021-04-24 14:24:25 +02:00
parent 9ea91d8e7c
commit 75a69988e4

View file

@ -18,18 +18,29 @@
{% else %} {% else %}
<ol start="{{ items.start_index }}"> <ol start="{{ items.start_index }}">
{% for item in items %} {% for item in items %}
<li class="block pb-3"> <li class="block mb-5">
<div class="card"> <div class="card">
<div class="card-content columns p-0 pr-2 mb-0 is-mobile"> {% with book=item.book %}
<div class="column is-narrow pt-0 pb-0"> <div
<a href="{{ item.book.local_path }}">{% include 'snippets/book_cover.html' with book=item.book size="medium" %}</a> class="
card-content p-0 mb-0
columns is-mobile is-gapless
"
>
<div class="column">
<a href="{{ item.book.local_path }}" aria-hidden="true">
{% include 'snippets/book_cover.html' %}
</a>
</div>
<div class="column is-9-mobile is-10-tablet ml-3">
<span>{% include 'snippets/book_titleby.html' %}</span>
{% include 'snippets/stars.html' with rating=item.book|rating:request.user %}
{% include 'snippets/shelve_button/shelve_button.html' %}
</div>
</div> </div>
<div class="column is-flex-direction-column is-align-items-self-start"> {% endwith %}
<span>{% include 'snippets/book_titleby.html' with book=item.book %}</span>
{% include 'snippets/stars.html' with rating=item.book|rating:request.user %}
{% include 'snippets/shelve_button/shelve_button.html' with book=item.book %}
</div>
</div>
<div class="card-footer has-background-white-bis is-align-items-baseline"> <div class="card-footer has-background-white-bis is-align-items-baseline">
<div class="card-footer-item"> <div class="card-footer-item">
<div> <div>
@ -66,7 +77,7 @@
{% include "snippets/pagination.html" with page=items %} {% include "snippets/pagination.html" with page=items %}
</section> </section>
<section class="column is-one-quarter content"> <section class="column is-one-quarter">
<h2>{% trans "Sort List" %}</h2> <h2>{% trans "Sort List" %}</h2>
<form name="sort" action="{% url 'list' list.id %}" method="GET" class="block"> <form name="sort" action="{% url 'list' list.id %}" method="GET" class="block">
<label class="label" for="id_sort_by">{% trans "Sort By" %}</label> <label class="label" for="id_sort_by">{% trans "Sort By" %}</label>
@ -108,24 +119,27 @@
<p>{% trans "No books found" %}</p> <p>{% trans "No books found" %}</p>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% for book in suggested_books %}
{% if book %} {% if suggested_books|length > 0 %}
<div class="block columns is-mobile"> {% for book in suggested_books %}
<div class="column is-narrow"> <div class="columns is-mobile is-gapless">
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=book size="small" %}</a> <a class="column" href="{{ book.local_path }}" aria-hidden="true">
</div> {% include 'snippets/book_cover.html' with book=book %}
<div class="column"> </a>
<p>{% include 'snippets/book_titleby.html' with book=book %}</p>
<form name="add-book" method="post" action="{% url 'list-add-book' %}"> <div class="column is-9-mobile is-8-tablet ml-3">
{% csrf_token %} <p>{% include 'snippets/book_titleby.html' with book=book %}</p>
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="list" value="{{ list.id }}"> <form class="mt-1" name="add-book" method="post" action="{% url 'list-add-book' %}">
<button type="submit" class="button is-small is-link">{% if list.curation == 'open' or request.user == list.user %}{% trans "Add" %}{% else %}{% trans "Suggest" %}{% endif %}</button> {% csrf_token %}
</form> <input type="hidden" name="book" value="{{ book.id }}">
</div> <input type="hidden" name="list" value="{{ list.id }}">
</div> <button type="submit" class="button is-small is-link">{% if list.curation == 'open' or request.user == list.user %}{% trans "Add" %}{% else %}{% trans "Suggest" %}{% endif %}</button>
</form>
</div>
</div>
{% endfor %}
{% endif %} {% endif %}
{% endfor %}
{% endif %} {% endif %}
</section> </section>
</div> </div>