Skip to content

Conversation

lanjelot
Copy link
Collaborator

@lanjelot lanjelot commented Mar 17, 2021

Now pulls the user's avatar from gravatar (which is based on the user's email md5 hash). If gravatar doesn't have a match then we pull a colored image from https://eu.ui-avatars.com/ containing the first 2 letters of the user's username. Also you can now mouse-over the avatar image to display the full username (thx to the title attribute in the <img tag), so I removed the usernames from the podium since they looked a bit crooked anyway.

On the Player Ranking page I made the left hand side more compact by removing the second h5 header and card-body div, so now there's only one h5 the All Time Ranking h5, and the 2 tables are now inside the same card-body div. It works but tbh i have no idea what i'm doing when it comes to html/css.

<td>
<a href="{% url 'ctfpad:users-detail' member.id %}">{{member.username}}</a>
</td>
<td style="text-align: center;"><img height="20px" width="25px" src="{{member.country_flag_url}}" alt="{{member.country}}" class="rounded-circle"></td>
<td style="text-align: center;"><img height="25px" width="25px" src="{{member.country_flag_url}}" alt="{{member.country}}" class="rounded-circle"></td>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the country flag image looked slightly oval before...

@hugsy hugsy merged commit 58f8005 into hugsy:master Mar 17, 2021
@lanjelot lanjelot deleted the auto-avatar branch March 17, 2021 17:43
@hugsy hugsy added this to the 0.1 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants