-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixes #1309
- Loading branch information
Showing
3 changed files
with
84 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,51 @@ | ||
{# Intended to be used with a django tag: avatar_tags.avatar #} | ||
{% with av_size=av_size|default:"w-9 h-9" av_show_name=av_show_name|default:False av_title=av_title|default:av_name %} | ||
{% with av_size=av_size|default:"w-9 h-9" av_title=av_title|default:av_name %} | ||
{% with av_alt=av_alt|default:av_name av_icon_size=av_icon_size|default:"text-3xl" %} | ||
<a {% if av_href and av_is_link %}href="{{ av_href }}"{% endif %}> | ||
<div class="w-min text-center flex flex-col justify-center items-center"> | ||
<div | ||
class="{{ av_size }} bg-gray-300 dark:bg-slate flex items-center justify-center relative rounded-lg" | ||
title="{{ av_title }}{% if av_is_new %} - NEW!{% endif %}"> | ||
{% if av_image_url %} | ||
<img src="{{ av_image_url }}" | ||
alt="{{ av_alt }}" | ||
class=" | ||
rounded-lg h-full w-full object-cover mx-auto | ||
<div class="flex gap-x-2 items-center hover:bg-gray-100 dark:hover:bg-black rounded-lg"> | ||
<a {% if av_href and av_is_link %}href="{{ av_href }}"{% endif %}> | ||
<div class="w-min text-center flex flex-col justify-center items-center"> | ||
<div | ||
class="{{ av_size }} bg-gray-300 dark:bg-slate flex items-center justify-center relative rounded-lg" | ||
title="{{ av_title }}"> | ||
{% if av_image_url %} | ||
<img src="{{ av_image_url }}" | ||
alt="{{ av_alt }}" | ||
class=" | ||
rounded-lg h-full w-full object-cover mx-auto | ||
" | ||
/> | ||
{% else %} | ||
<i | ||
class=" | ||
{{ av_icon_size }} | ||
align-middle fas fa-user text-white dark:text-white/60 | ||
" | ||
/> | ||
{% else %} | ||
<i | ||
></i> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</a> | ||
{% if av_avatar_type == "wide" %} | ||
<div class="flex flex-col leading-tight min-w-[15rem]"> | ||
<div class="text-black dark:text-white"> | ||
{{ av_name }} | ||
</div> | ||
<div | ||
class=" | ||
{{ av_icon_size }} | ||
align-middle fas fa-user text-white dark:text-white/60 | ||
{% if av_contributor_label|lower == 'maintainer' %} | ||
text-orange | ||
{% elif av_contributor_label|lower == 'new contributor' %} | ||
text-green | ||
{% elif av_contributor_label|lower == 'contributor' %} | ||
text-gray-400 | ||
{% endif %} | ||
font-bold text-sm | ||
" | ||
></i> | ||
{% endif %} | ||
> | ||
{{ av_contributor_label }} | ||
</div> | ||
</div> | ||
{% if av_show_name %} | ||
<span class="text-xs">{{ av_name }}</span> | ||
{% endif %} | ||
</div> | ||
</a> | ||
{% endif %} | ||
</div> | ||
{% endwith %} | ||
{% endwith %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters