-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update avatars. #1317
Merged
Merged
Update avatars. #1317
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinniefalco are there any other contributor types we need to call out beyond Maintainer, New Contributor, and Contributor?