[extensions-web] user menu: Make the user avatar widget link to your profile



commit 8230905c2432e18c28d5e8e629f8c90b660e2173
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 26 01:25:13 2012 -0300

    user menu: Make the user avatar widget link to your profile

 sweettooth/static/css/template.css |   18 +++++++++++-------
 sweettooth/templates/usermenu.html |    9 +++++----
 2 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/sweettooth/static/css/template.css b/sweettooth/static/css/template.css
index aa0f0b0..c0bba31 100644
--- a/sweettooth/static/css/template.css
+++ b/sweettooth/static/css/template.css
@@ -122,32 +122,36 @@ a:visited {
     right: 0;
     top: -10px;
     margin: 32px 0 0 0;
-    padding: 8px 0 0 0;
     min-width: 140px;
     border-radius: 10px;
 }
-#global_domain_bar .user_popup a {
+#global_domain_bar .user_popup a.text {
     color: #fff;
     text-decoration: none;
     display: block;
     padding: 3px 16px;
 }
-#global_domain_bar .user_settings a:hover {
+#global_domain_bar .user_settings a.text:hover {
     background: rgba(100%, 100%, 100%, 0.2);
 }
+#global_domain_bar .user_settings ul {
+    margin: 14px 0;
+}
 #global_domain_bar .user_settings li {
     list-style-type: none;
     margin-left: 0;
 }
-#global_domain_bar ul, #global_domain_bar .avatar {
-    display: inline-block;
-}
 #global_domain_bar .avatar {
+    display: block;
+    margin: 14px auto 0 auto;
+    width: 70px;
     background-color: #fff;
     background-size: contain;
     border: 2px solid #8b8b8b;
     border-radius: 5px;
-    margin-left: 16px;
+}
+#global_domain_bar .avatar:hover {
+    border: 2px solid #bbbbbb;
 }
 
 
diff --git a/sweettooth/templates/usermenu.html b/sweettooth/templates/usermenu.html
index a41c0c7..a832d24 100644
--- a/sweettooth/templates/usermenu.html
+++ b/sweettooth/templates/usermenu.html
@@ -1,11 +1,12 @@
 {% if request.user.is_authenticated %}
 <div class="user_settings user_popup">
   {% load gravatar %}
-  <img class="avatar" src="{% gravatar_url request request.user.email %}">
+  <a class="avatar" href="{% url auth-profile user=request.user.username %}" title="Profile">
+    <img src="{% gravatar_url request request.user.email %}">
+  </a>
   <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 %}">Website Settings</a></li>
-    <li><a href="{% url auth-logout %}">Log Out</a></li>
+    <li><a class="text" href="{% url auth-settings user=request.user.username %}">Website Settings</a></li>
+    <li><a class="text" href="{% url auth-logout %}">Log Out</a></li>
   </ul>
 </div>
 {% else %}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]