update plan list view

This commit is contained in:
krmax44 2022-03-14 15:41:05 +01:00
parent 231ff1cbbc
commit 77556ecf60
No known key found for this signature in database
GPG key ID: 5C499A4F4EC4EE03

View file

@ -1,42 +1,27 @@
{% load thumbnail %} {% load thumbnail %}
<div class="card-columns"> <div class="row">
{% for object in object_list %} {% for object in object_list %}
<div class="card"> <div class="col col-12 col-md-4 d-flex mb-3">
{% if object.image %} <a href="{{ object.get_absolute_url }}" class="d-flex w-100 text-body text-decoration-none">
<a href="{{ object.get_absolute_url }}"> <div class="box-card border-blue w-100 shadow-blue">
{% with picture=object.image %} <div class="box-card-header p-3 bg-blue-20">
<picture> <h3 class="h6 m-0">
{% thumbnail picture 540x0 crop=smart subject_location=picture.subject_location as thumb%}
<source
srcset="{{ thumb.url }}.avif"
type="image/avif"
/>
<img class="card-img-top" loading="lazy" src="{{ thumb.url }}"
{% if picture.default_alt_text %} alt="{{ picture.default_alt_text }}"{% else %} alt=""{% endif %}
>
</picture>
{% endwith %}
</a>
{% endif %}
<div class="card-body">
<h5 class="card-title">
<a href="{{ object.get_absolute_url }}">
{{ object.title }} {{ object.title }}
</a> </h3>
</h5>
<p class="card-text">
{{ object.description|striptags|truncatewords:30 }}
</p>
</div> </div>
<ul class="list-group list-group-flush"> <div class="p-3 tight-margin">
<li class="list-group-item"> {% if object.quote %}
<strong>Status:</strong> <blockquote>
„{{ object.quote|striptags|truncatewords:20 }}“
</blockquote>
{% endif %}
<span class="badge badge-{{ object.get_status_css }}"> <span class="badge badge-{{ object.get_status_css }}">
{{ object.get_status_display }} {{ object.get_status_display }}
</span> </span>
</li> </div>
</ul> </div>
</a>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>