Skip to content

Commit 421ee23

Browse files
authored
fix: display header image width (#696)
1 parent fbb179e commit 421ee23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/unfold/templates/unfold/helpers/display_header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<span class="flex gap-4 items-center">
44
{% if value.3 and value.3.path %}
55
<span class="bg-center bg-cover bg-white flex font-medium justify-center overflow-hidden dark:bg-gray-900 dark:border-gray-700 {% if value.3.squared %}rounded-sm{% else %}rounded-full{% endif %}{% if not value.3.borderless %} border{% endif %}{% if not value.3.width or not value.3.height %} h-8 max-w-8 min-w-8{% endif %}">
6-
<img loading="lazy" src="{{ value.3.path }}" class="object-cover" {% if value.3.width %}width="{{ value.3.width }}"{% endif %} {% if value.3.height %}height="{{ value.3.height }}"{% endif %} alt="{% trans "Record picture" %}" />
6+
<img loading="lazy" src="{{ value.3.path }}" class="max-w-none object-cover" {% if value.3.width %}width="{{ value.3.width }}"{% endif %} {% if value.3.height %}height="{{ value.3.height }}"{% endif %} alt="{% trans "Record picture" %}" />
77
</span>
88
{% elif value.2 %}
99
<span class="bg-white border flex font-medium h-8 justify-center items-center rounded-full text-xs uppercase w-8 dark:bg-gray-900 dark:border-gray-700">

src/unfold/templates/unfold/helpers/fieldset_row.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</div>
5353
{% endif %}
5454
{% else %}
55-
<div class="{% if adminform.model_admin.compressed_fields %}lg:min-w-48 lg:mt-2{% endif %}">
55+
<div class="{% if adminform.model_admin.compressed_fields %}lg:min-w-48 lg:mt-2 lg:w-48{% endif %}">
5656
{{ field.label_tag }}
5757
</div>
5858

0 commit comments

Comments
 (0)