Fix: use title if available instead of description

This commit is contained in:
Aroy-Art 2024-06-26 15:32:44 +02:00
parent cbc9fd7db7
commit 7716359e0b
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -70,10 +70,20 @@
{% endif %}
<a href='{% url "sites:submission" submission.submission_hash %}' class="stretched-link"></a>
<div class="overlay p-2 text-center">
{% if submission.content_object.description|length > 64 %}
<p>{{ submission.content_object.description|html_to_text|slice:"0:64"|add:"..." }}</p>
{% if submission.content_object.title %}
{% if submission.content_object.title|length > 64 %}
<p title="{{ submission.content_object.title }}">{{ submission.content_object.title|slice:"0:64"|add:"..." }}</p>
{% else %}
<p title="{{ submission.content_object.title }}">{{ submission.content_object.title }}</p>
{% endif %}
{% else %}
<p>{{ submission.content_object.description|html_to_text }}</p>
{% if submission.content_object.description|length > 64 %}
<p>{{ submission.content_object.description|html_to_text|slice:"0:64"|add:"..." }}</p>
{% else %}
<p>{{ submission.content_object.description|html_to_text }}</p>
{% endif %}
{% endif %}
<a href="{% url 'sites:artist_profile' submission.author.user_hash %}" class="z-2">
{% if submission.category.name == "furaffinity" %}