Fix Gravatar profiles showing on hover and add gravatar explanation and profile page for users

This commit is contained in:
badblocks 2025-03-18 14:21:50 -07:00
parent 2451a6c630
commit 4c0db9f842
7 changed files with 79 additions and 10 deletions

View file

@ -0,0 +1,26 @@
{% extends 'base.html' %}
{% load i18n gravatar%}
{% block head_title %}{% trans "Settings" %}{% endblock %}
{% block content %}
<div class="container mx-auto">
<h1 class="text-3xl font-semibold text-center mb-6">{% trans "Profile" %}</h1>
<div class="card card-border bg-base-100 shadow-lg w-4/5 mx-auto">
<div class="card-body">
<div class="mx-auto mb-4">{{ user.email|gravatar:100 }}</div>
<p class="text-center">All profile information is managed through Gravatar.</p>
<p class="text-center mt-4"><a href="https://gravatar.com/profile/" target="_blank" rel="noopener noreferrer" class="btn btn-secondary">Edit Profile on Gravatar</a></p>
<div class="divider"></div>
<h2 class="text-lg font-semibold pt-0">What is Gravatar?</h2>
<p class="mb-4">Gravatar (Globally Recognized Avatar) is a free service that links your email address to a profile picture and, optionally, a profile. Many websites, including this one, use Gravatar to display your avatar and profile automatically.</p>
<h2 class="text-lg font-semibold">How does it work?</h2>
<p class="mb-4">If youve set up a Gravatar, your profile picture will appear here whenever you use your email on supported sites. When someone hovers over or clicks on your avatar, your Gravatar profile will appear if you have one. If you dont have a Gravatar yet, youll see a default image instead.</p>
<h2 class="text-lg font-semibold">Want to update or add a Gravatar?</h2>
<p class="mb-4">Go to Gravatar.com to set up or change your avatar or profile. Your updates will appear here once saved!</p>
</div>
</div>
</div>
{% endblock %}

View file

@ -8,7 +8,7 @@
<h1 class="text-3xl font-bold text-center mb-6">{% trans "Settings" %}</h1>
<div class="card card-border bg-base-100 shadow-lg w-4/5 mx-auto">
<div class="flex flex-col gap-6 w-full mx-auto p-6">
<a href="https://gravatar.com/profile/" target="_blank" rel="noopener noreferrer" class="btn btn-secondary">
<a href="{% url 'profile' %}" class="btn btn-secondary">
{% trans "Profile" %}
</a>
<a href="{% url 'list_friend_codes' %}" class="btn btn-primary">