|
|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
{% load thumbnail %} |
|
|
|
|
{% load static %} |
|
|
|
|
{% load data_liked from data_liked %} |
|
|
|
|
|
|
|
|
|
@ -8,9 +9,11 @@ |
|
|
|
|
> |
|
|
|
|
<a class="courses__preview" href="{% if course.status == 0 %}{% url 'course_edit' course.id %}{% else %}{% url 'course' course.id %}?next={{ request.get_full_path }}{% endif %}"> |
|
|
|
|
{% if course.cover %} |
|
|
|
|
<img width="300px" height="170px" class="courses__pic" src="{{ course.cover.image.url }}"/> |
|
|
|
|
{% thumbnail course.cover.image "300x170" crop="center" as im %} |
|
|
|
|
<img class="courses__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> |
|
|
|
|
{% endthumbnail %} |
|
|
|
|
{% else %} |
|
|
|
|
<img width="300px" height="170px" class="courses__pic" src="{% static 'img/no_cover.png' %}"/> |
|
|
|
|
<img class="courses__pic" src="{% static 'img/no_cover.png' %}" width="300px" height="170px"/> |
|
|
|
|
{% endif %} |
|
|
|
|
<div class="courses__view">Подробнее</div> |
|
|
|
|
{% if course.is_featured %} |
|
|
|
|
@ -86,4 +89,4 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|