[extensions-web] user menu: Add a user avatar widget
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] user menu: Add a user avatar widget
- Date: Wed, 26 Sep 2012 04:30:49 +0000 (UTC)
commit 053946e34240962c201ea0791c90703982e62c00
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Sep 26 01:15:54 2012 -0300
user menu: Add a user avatar widget
sweettooth/static/css/template.css | 10 ++++++++++
sweettooth/templates/usermenu.html | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/static/css/template.css b/sweettooth/static/css/template.css
index 9558428..aa0f0b0 100644
--- a/sweettooth/static/css/template.css
+++ b/sweettooth/static/css/template.css
@@ -139,6 +139,16 @@ a:visited {
list-style-type: none;
margin-left: 0;
}
+#global_domain_bar ul, #global_domain_bar .avatar {
+ display: inline-block;
+}
+#global_domain_bar .avatar {
+ background-color: #fff;
+ background-size: contain;
+ border: 2px solid #8b8b8b;
+ border-radius: 5px;
+ margin-left: 16px;
+}
/* GNOME Header */
diff --git a/sweettooth/templates/usermenu.html b/sweettooth/templates/usermenu.html
index b92fce5..d3511c4 100644
--- a/sweettooth/templates/usermenu.html
+++ b/sweettooth/templates/usermenu.html
@@ -1,5 +1,7 @@
{% if request.user.is_authenticated %}
<div class="user_settings user_popup">
+ {% load gravatar %}
+ <img class="avatar" src="{% gravatar_url request request.user.email %}">
<ul>
<li><a href="{% url auth-profile user=request.user.username %}">Your profile</a></li>
<li><a href="{% url auth-settings user=request.user.username %}">Settings</a></li>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]