Skip to content

Commit 842fd50

Browse files
authored
fix: site dropdown event propagation (#1175)
1 parent 3ecb2d0 commit 842fd50

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/unfold/static/unfold/css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/unfold/templates/unfold/helpers/site_icon.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22

33
{% if site_icon %}
44
<div class="shrink-0">
5-
<a href="{% url "admin:index" %}">
6-
{% if site_icon.light and site_icon.dark %}
7-
<img src="{{ site_icon.dark }}" alt="{% trans 'Home' %}" class="h-8 hidden dark:block"/>
5+
<{% if site_dropdown %}span{% else %}a href="{% url "admin:index" %}"{% endif %}>
6+
{% if site_icon.light and site_icon.dark %}
7+
<img src="{{ site_icon.dark }}" alt="{% trans 'Home' %}" class="h-8 hidden dark:block"/>
88

9-
<img src="{{ site_icon.light }}" alt="{% trans 'Home' %}" class="block h-8 dark:hidden" />
10-
{% else %}
11-
<img src="{{ site_icon }}" class="h-8" alt="{% trans 'Home' %}" />
12-
{% endif %}
13-
</a>
9+
<img src="{{ site_icon.light }}" alt="{% trans 'Home' %}" class="block h-8 dark:hidden" />
10+
{% else %}
11+
<img src="{{ site_icon }}" class="h-8" alt="{% trans 'Home' %}" />
12+
{% endif %}
13+
</{% if site_dropdown %}span{% else %}a{% endif %}>
1414
</div>
1515
{% else %}
16-
<a href="{% url "admin:index" %}" class="bg-primary-600 flex h-8 items-center justify-center rounded text-white text-xs w-8">
17-
<span class="material-symbols-outlined md-18">{% if site_symbol %}{{ site_symbol }}{% else %}settings{% endif %}</span>
18-
</a>
16+
<{% if site_dropdown %}span{% else %}a href="{% url "admin:index" %}"{% endif %} class="bg-primary-600 flex h-8 items-center justify-center rounded shrink-0 text-white text-xs w-8">
17+
<span class="material-symbols-outlined md-18">{% if site_symbol %}{{ site_symbol }}{% else %}settings{% endif %}</span>
18+
</{% if site_dropdown %}span{% else %}a{% endif %}>
1919
{% endif %}
2020

21-
<div class="flex flex-col grow min-w-0">
22-
<div class="text-font-important-light leading-normal tracking-tight dark:text-font-important-dark *:leading-none {% if site_subheader %}xl:text-sm{% else %}xl:text-base{% endif %}">
21+
<div class="flex flex-col gap-0.5 grow justify-center min-w-0">
22+
<div class="text-font-important-light leading-normal tracking-tight dark:text-font-important-dark *:leading-none *:truncate {% if site_subheader %}xl:text-sm{% else %}xl:text-base{% endif %}">
2323
{{ branding }}
2424
</div>
2525

2626
{% if site_subheader %}
27-
<div class="font-normal leading-normal text-font-subtle-light text-xs truncate dark:text-font-subtle-dark">
27+
<div class="font-normal text-font-subtle-light text-xs leading-none dark:text-font-subtle-dark">
2828
{{ site_subheader }}
2929
</div>
3030
{% endif %}

0 commit comments

Comments
 (0)