{% load daguerre i18n %}
{# We're gonna do some logic to get the right thumbnail size here. It's gonna be messy. #} {# Start by cropping the image. #} {% adjust video.thumbnail_path width=640 height=360 adjustment="crop" as image %} {# If the both dimensions are larger than the space, switch to fill. #} {% if image.width == 640 and image.height == 360 %} {% adjust video.thumbnail_path width=640 height=360 adjustment="fill" as image %} {# If one dimension is larger than the space, switch to fit. #} {% elif image.width == 640 or image.height == 360 %} {% adjust video.thumbnail_path width=640 height=360 adjustment="fit" as image %} {% endif %}

{{ video.name }}

{{ video.description|safe|truncatewords:40 }}

{% trans "Watch Video" %}