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%} {{ object.title }}
<source </h3>
srcset="{{ thumb.url }}.avif" </div>
type="image/avif" <div class="p-3 tight-margin">
/> {% if object.quote %}
<img class="card-img-top" loading="lazy" src="{{ thumb.url }}" <blockquote>
{% if picture.default_alt_text %} alt="{{ picture.default_alt_text }}"{% else %} alt=""{% endif %} „{{ object.quote|striptags|truncatewords:20 }}“
> </blockquote>
</picture> {% endif %}
{% endwith %} <span class="badge badge-{{ object.get_status_css }}">
</a> {{ object.get_status_display }}
{% endif %} </span>
<div class="card-body"> </div>
<h5 class="card-title"> </div>
<a href="{{ object.get_absolute_url }}"> </a>
{{ object.title }}
</a>
</h5>
<p class="card-text">
{{ object.description|striptags|truncatewords:30 }}
</p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<strong>Status:</strong>
<span class="badge badge-{{ object.get_status_css }}">
{{ object.get_status_display }}
</span>
</li>
</ul>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>